emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 19db45f2cc 2/4: org-agenda-filter-by-category: Fix


From: ELPA Syncer
Subject: [elpa] externals/org 19db45f2cc 2/4: org-agenda-filter-by-category: Fix using truncated category as a filter
Date: Sat, 24 Feb 2024 06:58:46 -0500 (EST)

branch: externals/org
commit 19db45f2cc08923ba82ce5ab76debb93cb27922e
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-agenda-filter-by-category: Fix using truncated category as a filter
    
    * lisp/org-agenda.el (org-agenda-format-item): Do not store truncated
    category in 'org-category property when `org-agenda-prefix-format'
    causes truncation.  This leads to agenda filters assuming truncated
    version of the category as the true value, which is incorrect.
    
    Reported-by: John Mathena <jmmathena@gmail.com>
    Link: 
https://orgmode.org/list/CADywB5Lonxw-t1H7cvK+Au3oWq=EsB=Bthj13pt03MRP-Fn-4w@mail.gmail.com
---
 lisp/org-agenda.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 514359b62f..23ccea9dfd 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6966,6 +6966,7 @@ Any match of REMOVE-RE will be removed from TXT."
                               (file-name-sans-extension
                                (file-name-nondirectory buffer-file-name))
                             "")))
+             (full-category category)
             (category-icon (org-agenda-get-category-icon category))
             (category-icon (if category-icon
                                (propertize " " 'display category-icon)
@@ -7093,7 +7094,9 @@ Any match of REMOVE-RE will be removed from TXT."
        ;; And finally add the text properties
        (remove-text-properties 0 (length rtn) '(line-prefix t wrap-prefix t) 
rtn)
        (org-add-props rtn nil
-         'org-category category
+          ;; CATEGORY might be truncated.  Store the full category in
+          ;; the properties.
+         'org-category full-category
           'tags tags
           'org-priority-highest org-priority-highest
          'org-priority-lowest org-priority-lowest



reply via email to

[Prev in Thread] Current Thread [Next in Thread]