Skip to content

Commit

Permalink
Fix: (org-ql-find) Use org-with-point-at
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
alphapapa committed Sep 26, 2023
1 parent c689244 commit 76d202c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 33 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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~).
+ 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.)
+ Handle narrowed buffers correctly in ~org-ql-find~.

** 0.7.1

Expand Down
3 changes: 1 addition & 2 deletions org-ql-find.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ single predicate)."
:query-prefix query-prefix
:query-filter query-filter
:prompt prompt)))
(with-current-buffer (marker-buffer marker)
(goto-char marker)
(org-with-point-at marker
(display-buffer (current-buffer) org-ql-find-display-buffer-action)
(select-window (get-buffer-window (current-buffer)))
(run-hook-with-args 'org-ql-find-goto-hook))))
Expand Down
63 changes: 32 additions & 31 deletions org-ql.info
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@ File: README.info, Node: 072-pre, Next: 071, Up: Changelog
selection of results. (#351
(https://github.com/alphapapa/org-ql/issues/351). Thanks to Daniel
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
Expand Down Expand Up @@ -1778,37 +1779,37 @@ Node: Links37257
Node: Tips37944
Node: Changelog38268
Node: 072-pre39053
Node: 07139697
Node: 0740510
Node: 06343434
Node: 06243965
Node: 06144270
Node: 0644838
Node: 05247892
Node: 05148192
Node: 0548615
Node: 04950146
Node: 04850428
Node: 04750777
Node: 04651186
Node: 04551594
Node: 04451955
Node: 04352314
Node: 04252517
Node: 04152678
Node: 0452925
Node: 03257026
Node: 03157429
Node: 0357626
Node: 02360926
Node: 02261160
Node: 02161440
Node: 0261645
Node: 0165723
Node: Notes65824
Node: Comparison with Org Agenda searches65986
Node: org-sidebar66875
Node: License67154
Node: 07139760
Node: 0740573
Node: 06343497
Node: 06244028
Node: 06144333
Node: 0644901
Node: 05247955
Node: 05148255
Node: 0548678
Node: 04950209
Node: 04850491
Node: 04750840
Node: 04651249
Node: 04551657
Node: 04452018
Node: 04352377
Node: 04252580
Node: 04152741
Node: 0452988
Node: 03257089
Node: 03157492
Node: 0357689
Node: 02360989
Node: 02261223
Node: 02161503
Node: 0261708
Node: 0165786
Node: Notes65887
Node: Comparison with Org Agenda searches66049
Node: org-sidebar66938
Node: License67217

End Tag Table

Expand Down

0 comments on commit 76d202c

Please sign in to comment.