Rudy’s OBTF Rudolf Adamkovič

Home / Emacs / Global keymap


Access OBTF headings quickly

Add C-c f to the global-map.

(defun my-org-find-note ()
  (interactive)
  (org-with-file-buffer "~/org/obtf.org"
    (org-with-wide-buffer
     (let ((org-refile-use-outline-path t)
           (org-refile-targets `((nil . (:maxlevel . 999)))))
       (save-mark-and-excursion
         (goto-char
          (let ((pa (org-refile-get-location "Note")))
            (org-refile-check-position pa)
            (nth 3 pa)))
         (let ((current-prefix-arg '(4)) ;; new buffer
               (org-indirect-buffer-display 'current-window))
           ;; NOTE If this is buggy (structural undo), copy and narrow.
           (call-interactively #'org-tree-to-indirect-buffer)))))))
(keymap-global-set "C-c f" #'my-org-find-note)

© 2025 Rudolf Adamkovič under GNU General Public License (GPL) version 3 or later.
Made with Emacs and secret alien technologies of yesteryear.