This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Adapted from https://emacs.stackexchange.com/questions/8045/org-refile-to-a-known-fixed-location | |
| (defun my/refile (file headline &optional arg) | |
| "Refile to a specific location. | |
| With a 'C-u' ARG argument, we jump to that location (see | |
| `org-refile'). | |
| Use `org-agenda-refile' in `org-agenda' mode." | |
| (let* ((pos (with-current-buffer (or (get-buffer file) ;Is the file open in a buffer already? | |
| (find-file-noselect file)) ;Otherwise, try to find the file by name (Note, default-directory matters here if it isn't absolute) |