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

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

[elpa] externals/debbugs 5647a71 125/311: Make the `t' "tag" command per


From: Stefan Monnier
Subject: [elpa] externals/debbugs 5647a71 125/311: Make the `t' "tag" command persist over reordering
Date: Sun, 29 Nov 2020 18:41:54 -0500 (EST)

branch: externals/debbugs
commit 5647a71548b2613ad4e3dc9c97c8031e6544faa2
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Commit: Lars Magne Ingebrigtsen <larsi@gnus.org>

    Make the `t' "tag" command persist over reordering
---
 debbugs-gnu.el | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 4d7ab24..03a8323 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -956,7 +956,9 @@ Subject fields."
     (forward-line 1)))
 
 (defun debbugs-gnu-toggle-tag ()
-  "Toggle tag of the report in the current line."
+  "Toggle the local tag of the report in the current line.
+If a report is tagged locally, it is presumed to be of little
+interest to you."
   (interactive)
   (save-excursion
     (beginning-of-line)
@@ -969,9 +971,22 @@ Subject fields."
        (add-to-list 'debbugs-gnu-local-tags id)
        (put-text-property
         (+ (point) (- 5 (length (number-to-string id)))) (+ (point) 5)
-        'face 'debbugs-gnu-tagged))))
+        'face 'debbugs-gnu-tagged)
+       (debbugs-gnu--update-tag-face id))))
   (debbugs-gnu-dump-persistency-file))
 
+(defun debbugs-gnu--update-tag-face (id)
+  (dolist (entry tabulated-list-entries)
+    (when (equal (cdr (assq 'id (car entry))) id)
+      (aset (cadr entry) 0
+           (propertize
+            (format "%5d" id)
+            'face
+            ;; Mark tagged bugs.
+            (if (memq id debbugs-gnu-local-tags)
+                'debbugs-gnu-tagged
+              'default))))))
+
 (defun debbugs-gnu-toggle-suppress ()
   "Suppress bugs marked in `debbugs-gnu-suppress-bugs'."
   (interactive)



reply via email to

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