all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: Emacs Org mode <emacs-orgmode@gnu.org>
Subject: Re: Automatically escaping single spaces
Date: Tue, 19 Mar 2013 09:20:34 -0600	[thread overview]
Message-ID: <0C7B7610-34DF-47E5-970C-6CBBF3DDC8EF@gmail.com> (raw)
In-Reply-To: <87r4jcvy2v.fsf@gmail.com>

Oops, forgot to reply to the list.

On Mar 18, 2013, at 9:59 PM, Aaron Ecay <aaronecay@gmail.com> wrote:

> Hi Suvayu,
> 
> I’ve had on my list of rainy day ideas for a while writing a function
> for org-export-filter-plain-text-functions that would implement
> something like this.  It should be as simple as doing a text replace,
> either on “. [^ ]” sequences in general or only spaces after a given
> list of abbreviations.  The advantage of the second approach is that it
> could catch the case where “e.g.” is at the end of a line in the org
> document.  (You’d also have to remove the newline: translate “e.g.\nfoo”
> into “e.g.\ foo”).  Another advantage to pre-specifying is that you might
> want a non-breaking space in “Fig.~1” but a breakable space in “e.g.\ foo”;
> so you could keep two lists.

FWIW, You shouldn't have to worry about newlines.  If Emacs is setup properly they should never appear except at sentence boundaries. Which is to say, autofill and fill-paragraph know not to break lines in the middle of a sentence after punctuation.  If the user adds a newline manually you can assume they meant it to be a new sentence.  IIRC the variable at play is `sentence-end-double-space'.

-Ivan

  reply	other threads:[~2013-03-19 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 13:40 Automatically escaping single spaces Suvayu Ali
2013-03-18 16:31 ` Marcin Borkowski
2013-03-19  3:59 ` Aaron Ecay
2013-03-19 15:20   ` Ivan Andrus [this message]
2013-03-19 16:05     ` Rasmus

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

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

  git send-email \
    --in-reply-to=0C7B7610-34DF-47E5-970C-6CBBF3DDC8EF@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.