[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 33027f9 17/41: New command `org-refile-reverse' bou
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 33027f9 17/41: New command `org-refile-reverse' bound to C-c C-M-w |
Date: |
Sun, 16 May 2021 04:57:18 -0400 (EDT) |
branch: externals/org
commit 33027f992d2d77853b713f6b1d17e2286d66ef28
Author: Adam Spiers <orgmode@adamspiers.org>
Commit: Bastien <bzg@gnu.org>
New command `org-refile-reverse' bound to C-c C-M-w
* lisp/org-refile.el (org-refile-reverse): New command.
* lisp/org-keys.el (org-mode-map): Bind C-c C-M-w to
`org-refile-reverse'.
* doc/org-manual.org (Refile and Copy): Document
`org-refile-reverse'.
* etc/ORG-NEWS (New command ~org-refile-reverse~ (=C-c C-M-w=)):
Announce the new command.
Link:
https://orgmode.org/list/20200830001047.21362-1-orgmode@adamspiers.org/
---
doc/org-manual.org | 10 ++++++++++
etc/ORG-NEWS | 10 ++++++++++
lisp/org-keys.el | 1 +
lisp/org-refile.el | 11 +++++++++++
4 files changed, 32 insertions(+)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index ab12fa7..a4baf52 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -7246,6 +7246,16 @@ special command:
Copying works like refiling, except that the original note is not
deleted.
+- {{{kbd(C-c C-M-w)}}} (~org-refile-reverse~) ::
+
+ #+kindex: C-c C-M-w
+ #+findex: org-refile-reverse
+ Works like refiling, except that it temporarily toggles how the
+ value of ~org-reverse-note-order~ applies to the current buffer. So
+ if ~org-refile~ would append the entry as the last entry under the
+ target header, ~org-refile-reverse~ will prepend it as the first
+ entry, and vice-versa.
+
** Archiving
:PROPERTIES:
:DESCRIPTION: What to do with finished products.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 669a7c3..b987b7a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -230,6 +230,16 @@ package, to convert pandas Dataframes into orgmode tables:
| 2 | 3 | 6 |
#+end_src
+*** New command ~org-refile-reverse~ (=C-c C-M-w=)
+
+You can now use =C-c C-M-w= to run ~org-refile-reverse~.
+
+It is almost identical to ~org-refile~, except that it temporarily
+toggles how ~org-reverse-note-order~ applies to the current buffer.
+So if ~org-refile~ would append the entry as the last entry under the
+target heading, ~org-refile-reverse~ will prepend it as the first
+entry, and vice-versa.
+
*** New startup options =#+startup: show<n>levels=
These startup options complement the existing =overview=, =content=,
diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index f04f87d..12d6226 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -581,6 +581,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command
names."
(org-defkey org-mode-map (kbd "C-c ;") #'org-toggle-comment)
(org-defkey org-mode-map (kbd "C-c C-w") #'org-refile)
(org-defkey org-mode-map (kbd "C-c M-w") #'org-refile-copy)
+(org-defkey org-mode-map (kbd "C-c C-M-w") #'org-refile-reverse)
(org-defkey org-mode-map (kbd "C-c /") #'org-sparse-tree) ;minor-mode reserved
(org-defkey org-mode-map (kbd "C-c \\") #'org-match-sparse-tree) ;minor-mode r.
(org-defkey org-mode-map (kbd "C-c RET") #'org-ctrl-c-ret)
diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 2900be2..bffad0a 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -383,8 +383,19 @@ the *old* location.")
(let ((org-refile-keep t))
(org-refile nil nil nil "Copy")))
+;;;###autoload
+(defun org-refile-reverse (&optional arg default-buffer rfloc msg)
+ "Refile while temporarily toggling `org-reverse-note-order'.
+So if `org-refile' would append the entry as the last entry under
+the target heading, `org-refile-reverse' will prepend it as the
+first entry, and vice-versa."
+ (interactive "P")
+ (let ((org-reverse-note-order (not (org-notes-order-reversed-p))))
+ (org-refile arg default-buffer rfloc msg)))
+
(defvar org-capture-last-stored-marker)
+
;;;###autoload
(defun org-refile (&optional arg default-buffer rfloc msg)
"Move the entry or entries at point to another heading.
- [elpa] externals/org 7dcb1af 11/41: Improve org-link-plain-re, (continued)
- [elpa] externals/org 7dcb1af 11/41: Improve org-link-plain-re, ELPA Syncer, 2021/05/16
- [elpa] externals/org bfda3cc 13/41: lisp/org.el: Don't let RET indent in source code blocks, ELPA Syncer, 2021/05/16
- [elpa] externals/org 24473b5 15/41: lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports, ELPA Syncer, 2021/05/16
- [elpa] externals/org 8531bb6 09/41: lisp/org.el: Minor aesthetic clean-up, ELPA Syncer, 2021/05/16
- [elpa] externals/org 88fbe21 01/41: Add Luc Pellissier as maintainer for two ob-* files, ELPA Syncer, 2021/05/16
- [elpa] externals/org dd88356 06/41: lisp/org-inlinetask.el: Silent the byte-compiler, ELPA Syncer, 2021/05/16
- [elpa] externals/org 5a0f6c9 07/41: lisp/ox-md.el: Mark some arguments as unused, ELPA Syncer, 2021/05/16
- [elpa] externals/org 99d873b 12/41: lisp/org.el: Fix indenting of planning line, ELPA Syncer, 2021/05/16
- [elpa] externals/org 3f59ea9 20/41: Add a test for known bug in org-element-cache, ELPA Syncer, 2021/05/16
- [elpa] externals/org b183315 21/41: Set org-adapt-indentation explicitly in some tests, ELPA Syncer, 2021/05/16
- [elpa] externals/org 33027f9 17/41: New command `org-refile-reverse' bound to C-c C-M-w,
ELPA Syncer <=
- [elpa] externals/org e53572e 18/41: Fix code typo in 06c064e9, ELPA Syncer, 2021/05/16
- [elpa] externals/org c6d1150 19/41: Fix code typo in 06c064e9 (take 2), ELPA Syncer, 2021/05/16
- [elpa] externals/org f0447de 22/41: Set org-adapt-indentation explicitly in some tests, ELPA Syncer, 2021/05/16
- [elpa] externals/org cbc450d 31/41: lisp/org-list.el: Fix bug wrt updating statistics, ELPA Syncer, 2021/05/16
- [elpa] externals/org 81c7a2d 23/41: lisp/org-agenda.el: Use "09:00" instead of " 9:00", ELPA Syncer, 2021/05/16
- [elpa] externals/org 72894cd 24/41: Allow moving inlinetasks using org-metaup/down, ELPA Syncer, 2021/05/16
- [elpa] externals/org c77066d 32/41: etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled, ELPA Syncer, 2021/05/16
- [elpa] externals/org f63cbd3 34/41: lisp/org.el: Fix bug in `org-sort-remove-invisible', ELPA Syncer, 2021/05/16
- [elpa] externals/org 8f39743 16/41: Use cache in org-up-heading-safe, ELPA Syncer, 2021/05/16
- [elpa] externals/org 83ab852 27/41: etc/ORG-NEWS: Various enhancements, ELPA Syncer, 2021/05/16