0

i'd like to be able to programmatically (re-)fill text in a buffer after scaling text with C-x +.

i understand i could add a hook to text-scale-mode-hook, but if i call (frame-width) or (window-width) or (window-body-width) after scaling, it doesn't take the scaling into account and so gives a much higher value than what i would need to set the fill-column to before filling.

it is possible to set the fill column taking scaling into account, or to fill scaled text accurately in another way?

the manual pages on filling and on text-scale don't mention the issue of combining the two things.

user27075
  • 488
  • 3
  • 11
  • Use `window-max-chars-per-line` instead of `window-width` or `window-body-width`? Do you need `frame-width` at all here? – NickD Apr 26 '23 at 01:30

0 Answers0