0

With ruler-mode enabled and using (setq fill-column 72), I still see the fill-column icon in ruler-mode at column 70.

I want to customise fill-column globally or according to major mode. Can one do this and if so, how? I have to set these customisations in elisp.

Have done C-h f setq-default which states that

 The default value of a variable is seen in buffers
 that do not have their own values for the variable.

But I want to change the value even if buffer has its own value for fill-column. Meaning that (setq-default fill-column 72 will not word globally.

2
  • 2
    (1) The variable fill-column is buffer-local, which means that the value can be different in certain buffers depending upon how/where the variable was set -- as such, check the value of fill-column in the buffer with ruler-mode enabled by type C-h v aka M-x describe-variable. (2) If the buffer-local value of fill-column is to your liking, then try manually updating the buffer with ruler-mode enabled by typing C-: aka M-x eval-expression and evaluating (force-mode-line-update t). Then, update the question if need be to include more details if your problem is not fixed.
    – lawlist
    Aug 28, 2022 at 12:49
  • 1
    I think that C-: in @lawlist's otherwise excellent comment (good enough to be an answer) should be M-:. Aug 29, 2022 at 13:32

1 Answer 1

0

(1) The variable fill-column is buffer-local, which means that the value can be different in certain buffers depending upon how/where the variable was set -- as such, check the value of fill-column in the buffer with ruler-mode enabled by typig C-h v aka M-x describe-variable. (2) If the buffer-local value of fill-column is to your liking, then try manually updating the header-line of the buffer with ruler-mode enabled by typing M-: aka M-x eval-expression and evaluating (force-mode-line-update t). [If this answer is insufficient to assist in resolving the issue, then go ahead and update the question to include more details ....]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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