From 94a7eeef18c0ed35ceffe30c7f261981de80419c Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 25 Mar 2023 21:39:56 -0700 Subject: [oni-org] Add keybinding to refile items to the top of a heading --- oni-org/oni-org.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'oni-org') 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 ;; 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) -- cgit v1.2.3-54-g00ecf