[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 486ebe118b 2/2: org-refile: Push point to Org mark
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 486ebe118b 2/2: org-refile: Push point to Org mark ring before jumping |
Date: |
Sat, 13 Jul 2024 09:58:43 -0400 (EDT) |
branch: externals/org
commit 486ebe118bc8f281758d4f94d0b4bdff6cd5ac23
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-refile: Push point to Org mark ring before jumping
* lisp/org-refile.el (org-refile):
(org-refile-goto-last-stored): Save position to the Org mark ring if
we are about to jump to a different position.
* etc/ORG-NEWS (~org-refile~ now saves current position to Org mark
ring when jumping to heading): Document the new feature.
Link:
https://orgmode.org/list/CAJcAo8vYLJ3YGH0+nZs1rgtdq2iRKzJ8tuGxJKRD-XyEwEm4FA@mail.gmail.com
---
etc/ORG-NEWS | 7 +++++++
lisp/org-refile.el | 2 ++
2 files changed, 9 insertions(+)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index b2c7067404..27b02fa0e2 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -114,6 +114,13 @@ to dynamically generate the content of the resulting
~<head>~ tag in
the resulting HTML document.
** Miscellaneous
+*** ~org-refile~ now saves current position to Org mark ring when jumping to
heading
+
+When ~org-refile~ is called with =C-u= or =C-u C-u= prefix argument
+(to jump to heading or to jump to the last refiled heading), it saves
+point to Org mark ring before jumping. Then, the user can return back
+via ~org-mark-ring-goto~.
+
*** ~orgtbl-to-generic~ retains special rows when exporting to Org
Previously, special table rows were unconditionally removed when
diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 391e240285..9cf7bc7b48 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -544,6 +544,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(setq nbuf (find-file-noselect file 'nowarn))
(if (and arg (not (equal arg 3)))
(progn
+ (org-mark-ring-push)
(pop-to-buffer-same-window nbuf)
(goto-char (cond (pos)
((org-notes-order-reversed-p) (point-min))
@@ -634,6 +635,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(defun org-refile-goto-last-stored ()
"Go to the location where the last refile was stored."
(interactive)
+ (org-mark-ring-push)
(bookmark-jump (plist-get org-bookmark-names-plist :last-refile))
(message "This is the location of the last refile"))