+ ;; Configure refile
+ (defun my/opened-buffer-files ()
+ "Return the list of org files currently opened in emacs"
+ (delq nil
+ (mapcar (lambda (x)
+ (if (and (buffer-file-name x)
+ (string-match "\\.org$"
+ (buffer-file-name x)))
+ (buffer-file-name x)))
+ (buffer-list))))
+ (setq org-refile-targets `((my/opened-buffer-files :maxlevel . 9)
+ (,(file-expand-wildcards "~/Nextcloud/notes/*.org") :maxlevel . 1)))