aboutsummaryrefslogtreecommitdiffstats
path: root/oni-org/oni-org.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2023-03-25 21:39:56 -0700
committerGravatar Tom Willemse2023-03-25 21:39:56 -0700
commit94a7eeef18c0ed35ceffe30c7f261981de80419c (patch)
tree2f25fc255a64bd4bc961949570e2ca29c1b06b2e /oni-org/oni-org.el
parentb468287aa7fc249a7eebbfcc24261fca7ef42631 (diff)
downloademacs-config-94a7eeef18c0ed35ceffe30c7f261981de80419c.tar.gz
emacs-config-94a7eeef18c0ed35ceffe30c7f261981de80419c.zip
[oni-org] Add keybinding to refile items to the top of a heading
Diffstat (limited to 'oni-org/oni-org.el')
-rw-r--r--oni-org/oni-org.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el
index 23a0c8b..3f9850e 100644
--- a/oni-org/oni-org.el
+++ b/oni-org/oni-org.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2023.0320.225105
+;; Version: 2023.0325.213834
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti form-feed)
;; This program is free software; you can redistribute it and/or modify
@@ -777,6 +777,11 @@ After running it once remove it from `org-capture-after-finalize-hook'."
;;; Refile
+(defun oni-org-refile-to-top ()
+ (interactive)
+ (let ((org-reverse-note-order t))
+ (org-refile)))
+
;; Set it up so that I can refile easily and still create new nodes when I
;; refile. Include the file in the outline path so that I can refile into them
;; and create top-level headings.
@@ -791,6 +796,8 @@ After running it once remove it from `org-capture-after-finalize-hook'."
(oni-org-todo-main-file . (:maxlevel . 10))
(oni-org-todo-someday-file . (:maxlevel . 1))))
+(define-key org-mode-map (kbd "C-c C-S-w") #'oni-org-refile-to-top 'remove)
+
;;; Export
(require 'ox-html)
(require 'nxml-mode)