From 037700c4114e2a744dae549eb7cc5129f074f0a7 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 19 Apr 2024 10:56:36 +0300 Subject: [PATCH 1/2] Update version number for the 9.6.27 release --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index f98c58296..6284ed2fd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "26.1")) -;; Version: 9.6.26 +;; Version: 9.6.27 ;; This file is part of GNU Emacs. ;; From 0db82ee8f80e6ef151742e71c247dad4282c1466 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 22 Apr 2024 16:40:33 +0300 Subject: [PATCH 2/2] 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 Link: https://orgmode.org/list/87r1be97xd.fsf@localhost --- lisp/org-agenda.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index c60c2086b..19eb7deb2 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8858,6 +8858,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