On 13/03/2025 17:09, Ihor Radchenko wrote:
Alaric Snell-Pym <ala...@snell-pym.org.uk> writes:

Yeah... I've no idea what might be causing that though :-/ The buffer is
in Markdown mode. It's a shame the backtrace is nil so I can't see what
code path is leading to the org parser being invoked there!

M-x toggle-debug-on-error should give you the full backtrace instead of
the warning.

Ahah, that's useful! Thanks!

*investigates*

Hmm, it turns out auto-fill-function is set to org-auto-fill-function in Markdown mode! In fact, that's its *global* value, not buffer-local.

How peculiar...

I have the following in .emacs:

;; Fill mode

(setq-default fill-column 80          ;; Let's avoid going over 80 columns
truncate-lines nil ;; I never want to scroll horizontally
              indent-tabs-mode nil)   ;; Use spaces instead of tabs

;;(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'prog-mode-hook 'turn-off-auto-fill)

No other references to the word "fill" in there. I just tried restarting emacs (shock horror!) and auto-fill-function is now globally nil again - so presumably somewhere in the past, its buffer-local binding in org mode "leaked" into global scope... How could that have happened?!

Thanks,

--
Alaric Snell-Pym   (M0KTN neƩ M7KIT)
http://www.snell-pym.org.uk/alaric/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to