[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/debbugs 399edb4 113/311: New command `debbugs-org-regen
From: |
Stefan Monnier |
Subject: |
[elpa] externals/debbugs 399edb4 113/311: New command `debbugs-org-regenerate-status' |
Date: |
Sun, 29 Nov 2020 18:41:52 -0500 (EST) |
branch: externals/debbugs
commit 399edb443803084e3825ce5d9e6737b2edad17a8
Author: bastien1 <bzg@gnu.org>
Commit: bastien1 <bzg@gnu.org>
New command `debbugs-org-regenerate-status'
* debbugs-org.el: Mention `debbugs-org-regenerate-status'
in the comment section.
* debbugs-org.el (debbugs-org-show-reports): Fix typo.
(debbugs-org-regenerate-status): New command.
(debbugs-org-mode-map): Bind it to `C-c # g'.
---
debbugs-org.el | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/debbugs-org.el b/debbugs-org.el
index bde1299..7c4d108 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -84,12 +84,18 @@
;; "C-c # C": Send a debbugs control message
;; "C-c # t": Mark the bug locally as tagged
;; "C-c # d": Show bug attributes
+;; "C-c # g": Regenerate text properties with status
;; The last entry in a TODO record is the link [[Messages]]. If you
;; follow this link, a Gnus ephemeral group is opened presenting all
;; related messages for this bug. Here you could also send debbugs
;; control messages by keystroke "C".
+;; Note that following the [[Messages]] link will only work if you
+;; generated the list of bugs from the current session, or if you hit
+;; C-c # g which will regenerate the text properties containing the
+;; bug status (i.e. the bug number).
+
;; Finally, if you simply want to list some bugs with known bug
;; numbers, call the command
;;
@@ -329,7 +335,7 @@ returned."
;; Properties.
(insert " :PROPERTIES:\n")
- (insert (format " :DEBGUGS_ID: %s\n" id))
+ (insert (format " :DEBBUGS_ID: %s\n" id))
(when merged
(insert
(format
@@ -359,6 +365,24 @@ returned."
(org-overview)
(set-buffer-modified-p nil)))
+(defun debbugs-org-regenerate-status ()
+ "Regenerate the `tabulated-list-id' text property.
+This property is used when following the [Messages] link, so you
+need to regenerate it when opening an .org file after you killed
+the corresponding buffer (e.g. by closing Emacs.)"
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward ":DEBBUGS_ID:[ \t]*\\([0-9]+\\)" nil t)
+ (let* ((bugnum (string-to-number (match-string 1)))
+ (mw (org-entry-get (point) "MERGEDWIDTH"))
+ (tli (list (cons 'id bugnum)
+ (cons 'bug_num bugnum)
+ (cons 'mergedwidth (if mw (string-to-number mw)))))
+ (beg (org-back-to-heading t))
+ (end (org-end-of-subtree t)))
+ (add-text-properties beg end `(tabulated-list-id ,tli))))))
+
(defun debbugs-org-show-next-reports (hits)
"Show next HITS of bug reports."
(with-current-buffer (get-buffer-create "*Org Bugs*")
@@ -382,6 +406,7 @@ returned."
(define-key map (kbd "C-c # t") 'debbugs-gnu-toggle-tag)
(define-key map (kbd "C-c # C") 'debbugs-gnu-send-control-message)
(define-key map (kbd "C-c # d") 'debbugs-gnu-display-status)
+ (define-key map (kbd "C-c # g") 'debbugs-org-regenerate-status)
map)
"Keymap for the `debbugs-org-mode' minor mode.")
- [elpa] externals/debbugs 8dd02c4 082/311: Update the README for the debbugs package., (continued)
- [elpa] externals/debbugs 8dd02c4 082/311: Update the README for the debbugs package., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs f6146fe 088/311: Make sorting respect the current narrowing., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 15b792d 079/311: Remove ChangeLogs; use "bzr log" instead, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 4f825df 084/311: * debbugs-gnu.el (debbugs-gnu-default-severities). Add "serious" to, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 7a3f97a 085/311: Add implemented SOAP function "search_est"., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 4cc71d5 086/311: Add commands to narrow/widen the bug reports., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e794c6c 104/311: Adapt copyright years., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 698e4c8 095/311: * debbugs.el (debbugs-get-usertag): Change parameters to a KEY-VALUE sequence., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 902baa4 106/311: Only keep the strictly necessary *-pkg.el files, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs d11276e 112/311: Update copyright years., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 399edb4 113/311: New command `debbugs-org-regenerate-status',
Stefan Monnier <=
- [elpa] externals/debbugs 792d98f 116/311: * debbugs-org.el (debbugs-org-show-buffer-name): New defvar., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 37eba87 117/311: * debbugs-gnu.el (debbugs-gnu-default-packages): Add new packages., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e27f085 124/311: * packages/debbugs/debbugs-org.el: Miscellanous cleanups., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 6b87b3b 126/311: Update the debbugs tag face when switching it off, too, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 9136369 130/311: Add a lot of Emacs maintainer DWIM, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs da6a351 132/311: Handle blocked bugs in debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs f50bf5d 137/311: New file debbugs-reference.el, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs b021f3b 138/311: * debbugs-ug.texi (Minor Modes): New node., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 1883e24 053/311: * debbugs.el (debbugs-get-bugs): Extend syntax for packages (and, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs a40dc43 076/311: * debbugs-gnu.el (debbugs-gnu-phrase-prompt): New defconst., Stefan Monnier, 2020/11/29