Fix: (org-ql-find) Use org-with-point-at

I keep pointing out to other people that they should use
org-with-point-at, but I still have places in my own code where I need
to use it, too!
This commit is contained in:
Adam Porter 2023-09-26 13:41:07 -05:00
parent 8412d1a23d
commit be20dc3d5b
3 changed files with 34 additions and 33 deletions

View file

@ -548,6 +548,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
+ Timestamp predicates are more tolerant of partial input (e.g. preventing errors while the user is typing a query into ~org-ql-find~). + Timestamp predicates are more tolerant of partial input (e.g. preventing errors while the user is typing a query into ~org-ql-find~).
+ Query parser ignores leading whitespace (e.g. preventing errors while the user is typing a query into ~org-ql-find~). + Query parser ignores leading whitespace (e.g. preventing errors while the user is typing a query into ~org-ql-find~).
+ Use of ~org-ql-find~ with ~:query-prefix~ argument prevented selection of results. ([[https://github.com/alphapapa/org-ql/issues/351][#351]]. Thanks to [[https://github.com/danielfleischer][Daniel Fleischer]] for reporting.) + Use of ~org-ql-find~ with ~:query-prefix~ argument prevented selection of results. ([[https://github.com/alphapapa/org-ql/issues/351][#351]]. Thanks to [[https://github.com/danielfleischer][Daniel Fleischer]] for reporting.)
+ Handle narrowed buffers correctly in ~org-ql-find~.
** 0.7.1 ** 0.7.1

View file

@ -83,8 +83,7 @@ single predicate)."
:query-prefix query-prefix :query-prefix query-prefix
:query-filter query-filter :query-filter query-filter
:prompt prompt))) :prompt prompt)))
(with-current-buffer (marker-buffer marker) (org-with-point-at marker
(goto-char marker)
(display-buffer (current-buffer) org-ql-find-display-buffer-action) (display-buffer (current-buffer) org-ql-find-display-buffer-action)
(select-window (get-buffer-window (current-buffer))) (select-window (get-buffer-window (current-buffer)))
(run-hook-with-args 'org-ql-find-goto-hook)))) (run-hook-with-args 'org-ql-find-goto-hook))))

View file

@ -1037,6 +1037,7 @@ File: README.info, Node: 072-pre, Next: 071, Up: Changelog
selection of results. (#351 selection of results. (#351
(https://github.com/alphapapa/org-ql/issues/351). Thanks to Daniel (https://github.com/alphapapa/org-ql/issues/351). Thanks to Daniel
Fleischer (https://github.com/danielfleischer) for reporting.) Fleischer (https://github.com/danielfleischer) for reporting.)
• Handle narrowed buffers correctly in org-ql-find.
 
File: README.info, Node: 071, Next: 07, Prev: 072-pre, Up: Changelog File: README.info, Node: 071, Next: 07, Prev: 072-pre, Up: Changelog
@ -1778,37 +1779,37 @@ Node: Links37257
Node: Tips37944 Node: Tips37944
Node: Changelog38268 Node: Changelog38268
Node: 072-pre39053 Node: 072-pre39053
Node: 07139697 Node: 07139760
Node: 0740510 Node: 0740573
Node: 06343434 Node: 06343497
Node: 06243965 Node: 06244028
Node: 06144270 Node: 06144333
Node: 0644838 Node: 0644901
Node: 05247892 Node: 05247955
Node: 05148192 Node: 05148255
Node: 0548615 Node: 0548678
Node: 04950146 Node: 04950209
Node: 04850428 Node: 04850491
Node: 04750777 Node: 04750840
Node: 04651186 Node: 04651249
Node: 04551594 Node: 04551657
Node: 04451955 Node: 04452018
Node: 04352314 Node: 04352377
Node: 04252517 Node: 04252580
Node: 04152678 Node: 04152741
Node: 0452925 Node: 0452988
Node: 03257026 Node: 03257089
Node: 03157429 Node: 03157492
Node: 0357626 Node: 0357689
Node: 02360926 Node: 02360989
Node: 02261160 Node: 02261223
Node: 02161440 Node: 02161503
Node: 0261645 Node: 0261708
Node: 0165723 Node: 0165786
Node: Notes65824 Node: Notes65887
Node: Comparison with Org Agenda searches65986 Node: Comparison with Org Agenda searches66049
Node: org-sidebar66875 Node: org-sidebar66938
Node: License67154 Node: License67217
 
End Tag Table End Tag Table