emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] verbatim/code text and line breaks with auto fill mode


From: R. Michael Weylandt <address@hidden>
Subject: Re: [O] verbatim/code text and line breaks with auto fill mode
Date: Tue, 18 Mar 2014 18:35:14 -0400


On Mar 8, 2014, at 7:12, Alan Schmitt <address@hidden> wrote:

> Nick Dokos <address@hidden> writes:
> 
>> Alan Schmitt <address@hidden> 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
> 

Is there an analogue like org-in-inline-src-p? I find the auto-fill breaks 
inline (src_python{.......}) blocks. 

E.g.,

src_python{ 1 + 2 + 3 }

works (is recognized as evaluate-able code) while

src_python{1 + 2 
+3}

doesn't. 

Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]