Compare commits

...

3 Commits

Author SHA1 Message Date
Ihor Radchenko dba92f72d3
Merge branch 'bugfix' 2024-04-22 16:44:27 +03:00
Ihor Radchenko 0db82ee8f8
org-agenda-manipulate-query: Fix repeated canceled calls
* lisp/org-agenda.el (org-agenda-manipulate-query): When called
multiple times, discarding edits, prevent accumulating trailing + + +
- +{} in the query string.

Reported-by: Carlos Pita <carlosjosepita2@gmail.com>
Link: https://orgmode.org/list/87r1be97xd.fsf@localhost
2024-04-22 16:42:08 +03:00
Ihor Radchenko 037700c411
Update version number for the 9.6.27 release 2024-04-19 10:56:36 +03:00
1 changed files with 8 additions and 0 deletions

View File

@ -8595,6 +8595,14 @@ Negative selection means regexp must not match for selection of an entry."
(org-agenda-redo))
(message "Display now includes inactive timestamps as well"))
((eq org-agenda-type 'search)
;; Previous calls to `org-agenda-manipulate-query' could already
;; add trailing text to the query. Prevent duplicating it.
;; Trim the trailing spaces and +/.
(setq org-agenda-query-string
(replace-regexp-in-string
(rx (or (1+ " ") (seq (1+ " ") (any "+-") (opt "{}"))) eos)
""
org-agenda-query-string))
(org-add-to-string
'org-agenda-query-string
(if org-agenda-last-search-view-search-was-boolean