From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: nbsp and /italics/ Date: Tue, 16 Oct 2012 22:14:24 +0200 Message-ID: <87k3uqcgyn.fsf@pank.iue.private> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TODX8-0002SG-77 for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 16:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TODX7-0004l1-3j for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 16:14:34 -0400 Received: from mailout-eu.gmx.com ([213.165.64.43]:47660) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TODX6-0004kY-Qu for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 16:14:33 -0400 In-Reply-To: (Thomas S. Dye's message of "Sun, 14 Oct 2012 05:59:17 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > #+name: ngz-nbsp > #+begin_src emacs-lisp > (defun ngz-latex-filter-nobreaks (text backend info) > "Ensure \"_\" are properly handled in Beamer/LaTeX export." > (when (memq backend '(e-beamer e-latex)) > (replace-regexp-in-string "=C2=A0" "~" text))) > (add-to-list 'org-export-filter-plain-text-functions > 'ngz-latex-filter-nobreaks) > #+end_src Hmm, I'm intrigued by this and it could solve one of my long standing issue with Org LaTeX export. I write all new sentences with " ", and for stuff like "fig. " I use one space. Pretty consistently. I would love to modify the function to recognize "point one space" as ".~" and "point double space" as ". ". (i.e. no translation). Can anyone think of a clever regexp that recognizes the above pattern? I tried, "\\.[ ]\{1\}" but it didn't work. And without the \{1\} it's too strong. . . Thanks in advance, Rasmus --=20 I almost cut my hair, it was happened just the other day