emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Confusing example in "Advanced configuration" [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]
@ 2017-09-14 14:19 Reuben Thomas
  2017-09-14 14:57 ` Rasmus
  0 siblings, 1 reply; 2+ messages in thread
From: Reuben Thomas @ 2017-09-14 14:19 UTC (permalink / raw)
  To: emacs-orgmode



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.

Is this an example that used to make sense but doesn’t any longer?

Emacs  : GNU Emacs 25.2.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-09-12
Package: Org mode version 9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)
-- 
https://rrt.sc3d.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: Confusing example in "Advanced configuration" [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]
  2017-09-14 14:19 Bug: Confusing example in "Advanced configuration" [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)] Reuben Thomas
@ 2017-09-14 14:57 ` Rasmus
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2017-09-14 14:57 UTC (permalink / raw)
  To: emacs-orgmode

Hi Reuben,

Thank you for your bug report.

Reuben Thomas <rrt@sc3d.org> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-14 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14 14:19 Bug: Confusing example in "Advanced configuration" [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)] Reuben Thomas
2017-09-14 14:57 ` Rasmus

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).