Skip to content

Commit

Permalink
Fix: (org-ql-refile) Use base buffer
Browse files Browse the repository at this point in the history
See #466.
  • Loading branch information
alphapapa committed Nov 7, 2024
1 parent 0e68cc9 commit c95bb8a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 56 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
** 0.8.10-pre

*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.)

** 0.8.9
Expand Down
26 changes: 14 additions & 12 deletions org-ql-find.el
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,20 @@ which see (but only the files are used)."
((and (pred listp) files) files)))
(list files-spec)))))))
(list (org-ql-completing-read buffers-files :prompt "Refile to: "))))
(org-refile nil nil
;; The RFLOC argument:
(list
;; Name
(org-with-point-at marker
(nth 4 (org-heading-components)))
;; File
(buffer-file-name (marker-buffer marker))
;; nil
nil
;; Position
marker)))
(let ((buffer (or (buffer-base-buffer (marker-buffer marker))
(marker-buffer marker))))
(org-refile nil nil
;; The RFLOC argument:
(list
;; Name
(org-with-point-at marker
(nth 4 (org-heading-components)))
;; File
(buffer-file-name buffer)
;; nil
nil
;; Position
marker))))

;;;###autoload
(defun org-ql-find-in-agenda ()
Expand Down
91 changes: 47 additions & 44 deletions org-ql.info
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,9 @@ File: README.info, Node: 0810-pre, Next: 089, Up: Changelog
==============

*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
mistakenly recognized as an Org link (e.g. Bash double-bracket
constructs in a source block). (Thanks to John Wiegley
Expand Down Expand Up @@ -2097,50 +2100,50 @@ Node: Links38955
Node: Tips39642
Node: Changelog39966
Node: 0810-pre40932
Node: 08941297
Node: 08842441
Node: 08743517
Node: 08644745
Node: 08544979
Node: 08445635
Node: 08346087
Node: 08246428
Node: 08146821
Node: 0847244
Node: 07449970
Node: 07350195
Node: 07250929
Node: 07151850
Node: 0752661
Node: 06355527
Node: 06256060
Node: 06156367
Node: 0656937
Node: 05259993
Node: 05160295
Node: 0560720
Node: 04962251
Node: 04862533
Node: 04762882
Node: 04663291
Node: 04563699
Node: 04464060
Node: 04364419
Node: 04264622
Node: 04164783
Node: 0465030
Node: 03269131
Node: 03169534
Node: 0369731
Node: 02373031
Node: 02273265
Node: 02173545
Node: 0273750
Node: 0177828
Node: Notes77929
Node: Comparison with Org Agenda searches78091
Node: org-sidebar78980
Node: License79259
Node: 08941458
Node: 08842602
Node: 08743678
Node: 08644906
Node: 08545140
Node: 08445796
Node: 08346248
Node: 08246589
Node: 08146982
Node: 0847405
Node: 07450131
Node: 07350356
Node: 07251090
Node: 07152011
Node: 0752822
Node: 06355688
Node: 06256221
Node: 06156528
Node: 0657098
Node: 05260154
Node: 05160456
Node: 0560881
Node: 04962412
Node: 04862694
Node: 04763043
Node: 04663452
Node: 04563860
Node: 04464221
Node: 04364580
Node: 04264783
Node: 04164944
Node: 0465191
Node: 03269292
Node: 03169695
Node: 0369892
Node: 02373192
Node: 02273426
Node: 02173706
Node: 0273911
Node: 0177989
Node: Notes78090
Node: Comparison with Org Agenda searches78252
Node: org-sidebar79141
Node: License79420

End Tag Table

Expand Down

0 comments on commit c95bb8a

Please sign in to comment.