4

visual-line-mode works fine for line wrapping in eww-mode. However, when I type C-x C-+ / C-x C-- to change the font size, the line wrapping does not adjust accordingly.

Does anyone know how can this be achieved?

  • 1
    eww won't reflow the document unless you reload it. If you want your font size changing commands to reflow the document, you'd need to advise them with a function that runs eww-reload afterwards (which has an optional argument to use a local copy rather than fetching the document again). – DoMiNeLa10 Nov 13 '18 at 18:55
1

Thanks to @DoMiNeLa10's advice. I tried to add a local hook for text-scale-mode, it does work.

(defun my/text-scale-mode-hook ()
  (eww-reload :local))

(add-hook 'eww-mode-hook
          (lambda()
            (add-hook 'text-scale-mode-hook
                      'my/text-scale-mode-hook
                      nil :local)))

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.