Fix: (org-ql-refile) Use base buffer

See #466.
This commit is contained in:
Adam Porter 2024-09-16 13:42:17 -05:00
parent 0e68cc9fac
commit c95bb8a3ef
3 changed files with 62 additions and 56 deletions

View file

@ -556,6 +556,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
** 0.8.10-pre ** 0.8.10-pre
*Fixes* *Fixes*
+ Command ~org-ql-refile~ uses the base buffer when refiling to an indirect buffer. ([[https://github.com/alphapapa/org-ql/issues/466][#466]].)
+ Predicate ~link~ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to [[https://github.com/jwiegley][John Wiegley]] for reporting.) + Predicate ~link~ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to [[https://github.com/jwiegley][John Wiegley]] for reporting.)
** 0.8.9 ** 0.8.9

View file

@ -110,18 +110,20 @@ which see (but only the files are used)."
((and (pred listp) files) files))) ((and (pred listp) files) files)))
(list files-spec))))))) (list files-spec)))))))
(list (org-ql-completing-read buffers-files :prompt "Refile to: ")))) (list (org-ql-completing-read buffers-files :prompt "Refile to: "))))
(org-refile nil nil (let ((buffer (or (buffer-base-buffer (marker-buffer marker))
;; The RFLOC argument: (marker-buffer marker))))
(list (org-refile nil nil
;; Name ;; The RFLOC argument:
(org-with-point-at marker (list
(nth 4 (org-heading-components))) ;; Name
;; File (org-with-point-at marker
(buffer-file-name (marker-buffer marker)) (nth 4 (org-heading-components)))
;; nil ;; File
nil (buffer-file-name buffer)
;; Position ;; nil
marker))) nil
;; Position
marker))))
;;;###autoload ;;;###autoload
(defun org-ql-find-in-agenda () (defun org-ql-find-in-agenda ()

View file

@ -1087,6 +1087,9 @@ File: README.info, Node: 0810-pre, Next: 089, Up: Changelog
============== ==============
*Fixes* *Fixes*
• Command org-ql-refile uses the base buffer when refiling to an
indirect buffer. (#466
(https://github.com/alphapapa/org-ql/issues/466).)
• Predicate link could signal an error when searching text that is • Predicate link could signal an error when searching text that is
mistakenly recognized as an Org link (e.g. Bash double-bracket mistakenly recognized as an Org link (e.g. Bash double-bracket
constructs in a source block). (Thanks to John Wiegley constructs in a source block). (Thanks to John Wiegley
@ -2097,50 +2100,50 @@ Node: Links38955
Node: Tips39642 Node: Tips39642
Node: Changelog39966 Node: Changelog39966
Node: 0810-pre40932 Node: 0810-pre40932
Node: 08941297 Node: 08941458
Node: 08842441 Node: 08842602
Node: 08743517 Node: 08743678
Node: 08644745 Node: 08644906
Node: 08544979 Node: 08545140
Node: 08445635 Node: 08445796
Node: 08346087 Node: 08346248
Node: 08246428 Node: 08246589
Node: 08146821 Node: 08146982
Node: 0847244 Node: 0847405
Node: 07449970 Node: 07450131
Node: 07350195 Node: 07350356
Node: 07250929 Node: 07251090
Node: 07151850 Node: 07152011
Node: 0752661 Node: 0752822
Node: 06355527 Node: 06355688
Node: 06256060 Node: 06256221
Node: 06156367 Node: 06156528
Node: 0656937 Node: 0657098
Node: 05259993 Node: 05260154
Node: 05160295 Node: 05160456
Node: 0560720 Node: 0560881
Node: 04962251 Node: 04962412
Node: 04862533 Node: 04862694
Node: 04762882 Node: 04763043
Node: 04663291 Node: 04663452
Node: 04563699 Node: 04563860
Node: 04464060 Node: 04464221
Node: 04364419 Node: 04364580
Node: 04264622 Node: 04264783
Node: 04164783 Node: 04164944
Node: 0465030 Node: 0465191
Node: 03269131 Node: 03269292
Node: 03169534 Node: 03169695
Node: 0369731 Node: 0369892
Node: 02373031 Node: 02373192
Node: 02273265 Node: 02273426
Node: 02173545 Node: 02173706
Node: 0273750 Node: 0273911
Node: 0177828 Node: 0177989
Node: Notes77929 Node: Notes78090
Node: Comparison with Org Agenda searches78091 Node: Comparison with Org Agenda searches78252
Node: org-sidebar78980 Node: org-sidebar79141
Node: License79259 Node: License79420
 
End Tag Table End Tag Table