[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/debbugs 6bb1538 298/311: Add support for marking bugs a
From: |
Stefan Monnier |
Subject: |
[elpa] externals/debbugs 6bb1538 298/311: Add support for marking bugs as well |
Date: |
Sun, 29 Nov 2020 18:42:33 -0500 (EST) |
branch: externals/debbugs
commit 6bb1538d56b365d9f40679e58b84653e2b530aff
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add support for marking bugs as well
This makes it easier to save "how far I've gotten" when doing bug
triage, while tags are used to mark a selection of bugs to work on.
---
debbugs-gnu.el | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 57 insertions(+), 7 deletions(-)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 8e74b12..c569990 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -249,6 +249,11 @@ If nil, the value of `send-mail-function' is used instead."
(function :tag "Other function"))
:version "25.1")
+(defcustom debbugs-gnu-compile-command "make -k"
+ "Command to run to compile Emacs."
+ :type 'string
+ :version "28.1")
+
(defcustom debbugs-gnu-suppress-closed t
"If non-nil, don't show closed bugs."
:type 'boolean
@@ -357,9 +362,15 @@ If this is `rmail', use Rmail instead."
(defface debbugs-gnu-tagged '((t (:foreground "red")))
"Face for reports that have been tagged locally.")
+(defface debbugs-gnu-marked '((t (:background "DarkGrey")))
+ "Face for reports that have been tagged locally.")
+
(defvar debbugs-gnu-local-tags nil
"List of bug numbers tagged locally, and kept persistent.")
+(defvar debbugs-gnu-local-marks nil
+ "List of bug numbers marked locally, and kept persistent.")
+
(defvar debbugs-gnu-persistency-file
(expand-file-name (locate-user-emacs-file "debbugs"))
"File name of a persistency store for debbugs variables")
@@ -371,7 +382,9 @@ If this is `rmail', use Rmail instead."
";; -*- emacs-lisp -*-\n"
";; Debbugs tags connection history. Don't change this file.\n\n"
(format "(setq debbugs-gnu-local-tags '%S)"
- (sort (copy-sequence debbugs-gnu-local-tags) #'>)))))
+ (sort (copy-sequence debbugs-gnu-local-tags) #'>))
+ (format "(setq debbugs-gnu-local-marks '%S)"
+ (sort (copy-sequence debbugs-gnu-local-marks) #'>)))))
(defvar debbugs-gnu-current-query nil
"The query object of the current search.
@@ -875,10 +888,13 @@ are taken from the cache instead."
(or subject "")
'face
;; Mark owned bugs.
- (if (and (stringp owner)
- (string-equal owner user-mail-address))
- 'debbugs-gnu-tagged
- 'default))))
+ (cond
+ ((memq id debbugs-gnu-local-marks)
+ 'debbugs-gnu-marked)
+ ((and (stringp owner)
+ (string-equal owner user-mail-address))
+ 'debbugs-gnu-tagged)
+ (t 'default)))))
'append))))
(tabulated-list-init-header)
@@ -994,6 +1010,7 @@ Used instead of `tabulated-list-print-entry'."
(define-key map "s" #'debbugs-gnu-toggle-sort)
(define-key map "t" #'debbugs-gnu-toggle-tag)
+ (define-key map "m" #'debbugs-gnu-toggle-mark)
(define-key map "x" #'debbugs-gnu-toggle-suppress)
(define-key map "/" #'debbugs-gnu-narrow-to-status)
(define-key map "w" #'debbugs-gnu-widen)
@@ -1347,6 +1364,38 @@ interest to you."
'debbugs-gnu-tagged
'default))))))
+(defun debbugs-gnu-toggle-mark ()
+ "Toggle the local mark of the report in the current line.
+If a report is marked locally, it is presumed to be very
+intersting to you."
+ (interactive)
+ (save-excursion
+ (beginning-of-line)
+ (let ((inhibit-read-only t)
+ (id (debbugs-gnu-current-id)))
+ (if (memq id debbugs-gnu-local-marks)
+ (progn
+ (setq debbugs-gnu-local-marks (delq id debbugs-gnu-local-marks))
+ (put-text-property (+ (point) 32) (line-end-position)
+ 'face 'default))
+ (add-to-list 'debbugs-gnu-local-marks id)
+ (put-text-property (+ (point) 32) (line-end-position)
+ 'face 'debbugs-gnu-marked))
+ (debbugs-gnu--update-mark-face id)))
+ (debbugs-gnu-dump-persistency-file))
+
+(defun debbugs-gnu--update-mark-face (id)
+ (dolist (entry tabulated-list-entries)
+ (when (equal (alist-get 'id (car entry)) id)
+ (aset (cadr entry) 3
+ (propertize
+ (alist-get 'subject (car entry))
+ 'face
+ ;; Mark tagged bugs.
+ (if (memq id debbugs-gnu-local-marks)
+ 'debbugs-gnu-marked
+ 'default))))))
+
(defun debbugs-gnu-toggle-suppress ()
"Suppress bugs marked in `debbugs-gnu-suppress-bugs'."
(interactive)
@@ -2378,8 +2427,9 @@ If SELECTIVELY, query the user before applying the patch."
(require 'compile)
(mapc #'kill-process compilation-in-progress)
(compile
- (format
- "cd %s; make -k" (expand-file-name "lisp"
debbugs-gnu-current-directory)))
+ (format "cd %s; %s"
+ debbugs-gnu-current-directory
+ debbugs-gnu-compile-command))
(vc-dir debbugs-gnu-current-directory)
(vc-dir-hide-up-to-date)
(goto-char (point-min))
- [elpa] externals/debbugs 5179be4 222/311: Increase debbugs version to 0.14, (continued)
- [elpa] externals/debbugs 5179be4 222/311: Increase debbugs version to 0.14, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 4a24833 245/311: Fix previous change, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 743f65c 258/311: Allow applying patches selectively, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs ff6784a 273/311: Replace http:// by https:// in debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 36e5d9a 279/311: Add command to show mailboxes for all currently shown reports, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs c3ec95a 282/311: Implement debbugs-gnu-select-current-bugs-with-rmail, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 01c2322 283/311: Release debbugs 0.21, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 1563806 290/311: Release debbugs 0.23, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs dc88f7d 291/311: Autoload debbugs-browse-url., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs cca9282 297/311: Make the debbugs display more compact so that you can read the titles, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 6bb1538 298/311: Add support for marking bugs as well,
Stefan Monnier <=
- [elpa] externals/debbugs 86a7788 220/311: Add "guix-patches" to debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 8aa30e4 227/311: Recognize bugs.gnu.org in debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 17af596 225/311: ; Update author email address in debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 7be84fa 248/311: ; Commit debbugs-ug.info, minor edits in debbugs-gnu.el, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 5bb6e23 254/311: Release debbugs 0.19, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e839f2a 268/311: Add a debbugs-gnu command to check for paperwork when checking in, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 5909433 269/311: * debbugs-gnu.el (debbugs-gnu-search): Make arguments optional., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs a55b603 272/311: ; Further refinement in packages/debbugs/debbugs-ug.texi, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 8c373ce 281/311: Various minor wording changes, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 2efa3a7 284/311: Improve bug id guessing for multi-bug mailboxes, Stefan Monnier, 2020/11/29