From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Bug: Confusing example in "Advanced configuration" [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)] Date: Thu, 14 Sep 2017 16:57:18 +0200 Message-ID: <87r2v98h0x.fsf@gmx.us> References: <878thhweez.fsf@sc3d.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsVaB-00084t-58 for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 10:57:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsVa7-00056T-5Z for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 10:57:35 -0400 Received: from [195.159.176.226] (port=59522 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsVa6-000558-VM for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 10:57:31 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dsVZv-0003W9-Rz for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 16:57:19 +0200 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" To: emacs-orgmode@gnu.org Hi Reuben, Thank you for your bug report. Reuben Thomas writes: > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. You don't know how to make a good report? See > > http://orgmode.org/manual/Feedback.html#Feedback > > Your bug report will be posted to the Org mailing list. > ------------------------------------------------------------------------ > > The page http://orgmode.org/manual/Advanced-configuration.html has the following example: > > Here is an example filter that replaces non-breaking spaces ~ in the Org buffer with _ for the LaTeX back-end. > > (defun my-latex-filter-nobreaks (text backend info) > "Ensure \"_\" are properly handled in LaTeX export." > (when (org-export-derived-backend-p backend 'latex) > (replace-regexp-in-string "_" "~" text))) > > (add-to-list 'org-export-filter-plain-text-functions > 'my-latex-filter-nobreaks) > > This is confusing in several ways. First, the replacement is made the > other way around (that is, _ is replaced by ~). Secondly, “_” does not > denote a non-breaking space in org-mode, as far as I can see. Does the > text mean “LaTeX non-breaking spaces”? Finally, underscore has a > particular meaning in Org, namely, subscript. It should be a non-breaking space " " which is displayed like a ruby-colored "_" in (my) Emacs. It was changed to a normal underscore upstream via commit 961cf22823d55. It was then rewritten in 6ce21caac53d376758 to the current form. It is a useful example so we could undo the first part of 6ce21caac53. Alternatively, perhaps discussing a space unicode character becomes a bit too awkward to follow in anything but Emacs so we could also replace something else in the example. Rasmus -- Nothing's wrong with an email that ends in a minor key