Change `org-toggle-latex-fragment' behaviour
commit1362c2d22b037f43bd9f5a42c01c7ca8300d14cd
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Fri, 27 Feb 2015 23:30:43 +0000 (28 00:30 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Fri, 6 Mar 2015 10:15:33 +0000 (6 11:15 +0100)
tree9af6194551c9fab2e6c042383cfcbea05d1d11e7
parent4fcc7d1a355193db9f8384748fa718b72d8af714
Change `org-toggle-latex-fragment' behaviour

* lisp/org.el (org-remove-latex-fragment-image-overlays): Allow to
  limit overlay removal through optional arguments.  Define a new
  return value.
(org-toggle-latex-fragment): Change behaviour.  Update docstring
accordingly.
(org-format-latex): Update docstring.  Remove overlay when LaTeX
fragment is deleted.

* etc/ORG-NEWS: Signal change.

The new behaviour is the following:

  - With a double prefix argument or with a single prefix argument
    when point is before the first headline, toggle overlays in the
    whole buffer;

  - With a single prefix argument, toggle overlays in the current
    subtree;

  - On latex code, toggle overlay at point;

  - Otherwise, toggle overlays in the current section.

Suggested-by: <kuangdash@163.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95492>
etc/ORG-NEWS
lisp/org.el