emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "R. Michael Weylandt <michael.weylandt@gmail.com>" <michael.weylandt@gmail.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: Nick Dokos <ndokos@gmail.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: verbatim/code text and line breaks with auto fill mode
Date: Tue, 18 Mar 2014 18:35:14 -0400	[thread overview]
Message-ID: <DF593DCF-6D00-478E-9A21-DCA41DD93630@gmail.com> (raw)
In-Reply-To: <m27g84hotk.fsf@polytechnique.org>



On Mar 8, 2014, at 7:12, Alan Schmitt <alan.schmitt@polytechnique.org> wrote:

> Nick Dokos <ndokos@gmail.com> writes:
> 
>> Alan Schmitt <alan.schmitt@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
> 

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

  parent reply	other threads:[~2014-03-18 22:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 10:45 verbatim/code text and line breaks with auto fill mode Alan Schmitt
2014-03-07 20:50 ` Nick Dokos
2014-03-08  7:58   ` Alan Schmitt
2014-03-08 12:12   ` Alan Schmitt
2014-03-10 11:09     ` Sebastien Vauban
2014-03-10 12:13       ` Nicolas Goaziou
2014-03-13 13:54         ` Bastien
2014-03-13 23:02           ` Nicolas Goaziou
     [not found]             ` <m2vbvhng0o.fsf@polytechnique.org>
2014-03-14 12:19               ` Alan Schmitt
2014-03-21  8:57             ` Bastien
     [not found]               ` <m2k3bnvp8p.fsf@polytechnique.org>
2014-03-21 10:57                 ` Alan Schmitt
2014-03-18 22:35     ` R. Michael Weylandt <michael.weylandt@gmail.com> [this message]
2014-03-24 20:47       ` Michael Weylandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DF593DCF-6D00-478E-9A21-DCA41DD93630@gmail.com \
    --to=michael.weylandt@gmail.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).