Nick Dokos <ndo...@gmail.com> writes: > Alan Schmitt <alan.schm...@polytechnique.org> writes: > >> Hello, >> >> Is there a way to disable line breaks inside verbatim or code text when >> using auto fill? For instance, if I type the following: >> >> This is an example of a long line when some stuff is code: ~1 + 2 + 3 = >> 6~. >> > > Untested, but you might be able to do something with > auto-fill-inhibit-regexp.
I've continued looking into this, and it seems that what I want is use `fill-nobreak-predicate'. This is what I ended up doing: #+begin_src emacs-lisp (add-hook 'org-mode-hook (lambda () (add-hook 'fill-nobreak-predicate 'org-in-verbatim-emphasis))) #+end_src All the pieces were already there, it just took me a while to put them together ;-) Best, Alan