diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-26 13:23:47 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-26 18:46:34 +0200 |
commit | 91ea3920df85f530a31a80d6ed300d318261aeee (patch) | |
tree | 5a77b679102d20a28e540de4b0a121d6e72b4029 | |
parent | ae73c75fa68520d42f26141152c6ad5d010e2fea (diff) | |
download | org-mode-91ea3920df85f530a31a80d6ed300d318261aeee.tar.gz |
ox-ascii: Fix spurious links
* lisp/ox-ascii.el (org-ascii--unique-links): Fix spurious links.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106667>
-rw-r--r-- | lisp/ox-ascii.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index d6a3ed1..630b7be 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -887,7 +887,13 @@ is a plist used as a communication channel." (gethash link (plist-get info :exported-data))) (not (member footprint seen))) (push footprint seen) link))))) - (org-element-map element 'link unique-link-p info nil nil t))) + (org-element-map (if (eq (org-element-type element) 'section) + element + ;; In a headline, only retrieve links in title + ;; and relative section, not in children. + (list (org-element-property :title element) + (car (org-element-contents element)))) + 'link unique-link-p info nil 'headline t))) (defun org-ascii--describe-links (links width info) "Return a string describing a list of links. |