forked from mirrors/org-mode
org-open-at-point: Fix opening multiple file links
* lisp/org.el (org-open-at-point): Keep link selection buffer current when looping over links to be opened. Otherwise, opening a link might change current buffer, breaking the code logic. Reported-by: cro cefisso <crocefisso@gmx.com> Link: https://orgmode.org/list/trinity-3a7c01d2-99d9-4b8a-b317-d62c02d75e72-1682242700508@3c-app-mailcom-bs02
This commit is contained in:
parent
14dccff8b3
commit
92f9135b3c
|
@ -8444,7 +8444,10 @@ a link."
|
|||
(dolist (link (if (stringp links) (list links) links))
|
||||
(search-forward link nil links-end)
|
||||
(goto-char (match-beginning 0))
|
||||
(org-open-at-point arg)))))))
|
||||
;; When opening file link, current buffer may be
|
||||
;; altered.
|
||||
(save-current-buffer
|
||||
(org-open-at-point arg))))))))
|
||||
;; On a footnote reference or at definition's label.
|
||||
((or (eq type 'footnote-reference)
|
||||
(and (eq type 'footnote-definition)
|
||||
|
|
Loading…
Reference in New Issue