Remove duplication of refile target specification for current buffer

This commit is contained in:
Daniel - 2021-04-16 17:34:40 +02:00
parent 77f2dfc0eb
commit 56b1de2844
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 6 additions and 7 deletions

View File

@ -682,13 +682,12 @@ linking to any item."
(find-file-noselect db/org-default-org-file))))
(when (null default-buffer)
(user-error "Current buffer is not associated with a file and `db/org-default-org-file' does not exist; nothing to search through"))
(let* ((org-refile-targets (if arg
`((org-agenda-files :maxlevel . 9)
(,(cl-remove-if-not
#'stringp org-agenda-text-search-extra-files)
:maxlevel . 9)
(nil :maxlevel . 9))
'((nil :maxlevel . 9))))
(let* ((org-refile-targets (append (and arg
`((org-agenda-files :maxlevel . 9)
(,(cl-remove-if-not #'stringp
org-agenda-text-search-extra-files)
:maxlevel . 9)))
'((nil :maxlevel . 9))))
(target-pointer (org-refile-get-location nil default-buffer))
(pom (nth 3 target-pointer)))
(cond