I am learning emacs lisp. One of the things I was playing with was setting variables. So I go and set fill-column to 50 (setq fill-column 60). After this evaluating fill-column does give me 60, but the function fill-paragraph ignores this. How would I go about figuring out why this happens?


Best, Bart


To instrument an Elisp function for debugging, load its source code, put point inside the function, and type M-x edebug-defun. Then, when the function is executed, the debugger will activate automatically.

In your particular case, fill-column becomes buffer local when set (see make-variable-buffer-local). You probably set it in the wrong buffer.

  • I run the code for setting the variable in the buffer I was running fill-paragraph.
    – kasterma
    Oct 26 '10 at 19:13

Or, you could use debug-on-entry ^Hfdebug-on-entry

debug-on-entry is an interactive autoloaded Lisp function.

(debug-on-entry FUNCTION)

Request FUNCTION to invoke debugger each time it is called.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.