1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| | ;;; package --- Summary -*- lexical-binding: t; -*-
;;; guix-debbugs.el Helpful Debbugs Functions for guix
;;
;; Copyright (C) 2022 Joshua Branson
;;
;; Author: Joshua Branson <jbranso@dismail.de>
;; Maintainer: Joshua Branson <jbranso@dismail.de>
;; Created: August 04, 2022
;; Modified: August 04, 2022
;; Version: 0.0.1
;; Keywords: guix debbugs
;; Homepage: https://git.savannah.gnu.org/git/guix.git
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; The debbugs functions are a little awkward to use. This file provides
;; better and easier to use functions for the guix project. Specifically it
;; provides two new functions:
;;
;; M-x debbugs-guix-search to search for guix bugs
;; M-x debbugs-my-open-bugs to search for my open bug reports.
;; M-x debbugs-get-buy-by-id to open a specific bug by its ID.
;;
;;; Code:
;; setting up debbugs
(require 'debbugs-autoloads)
;; Users need to set up send-mail-function. Otherwise "C" in debbugs-gnu-mode WILL NOT work.
;; eg:
;;
;; (setq user-mail-address "awesomecoder@gnu.org")
;; (load-file "~/src/guix/etc/guix-debbugs.el")
;; (setq message-send-mail-function 'smtpmail-send-it
;; smtpmail-smtp-user user-mail-address
;; ;; customize this variable to suit your smtp email server.
;; smtpmail-smtp-server "smtp.gnu.org"
;; ;; customize this variable to suit your email server's port.
;; smtpmail-smtp-service 587)
;; TODO make this by default only search open bugs AND NOT closed bugs.
(defun debbugs-guix-search ()
(interactive)
(debbugs-gnu-search (read-string "Search String: ") nil nil '("guix" "guix-patches") nil))
;; the bugs that I submitted and that are still open
;; The debbugs database runs once a day. So after I send a bug report
;; and run this command, my latest bug report might not be here. No worries,
;; just wait one day, and it will be there. :)
;;
;; I have noticed that this function works 80% of the time. But after I close bug reports,
;; it seems to stop working for about 1/2 hour. I'm guessing the server's database
;; resets itself after every time that I close a bug report...
(defun debbugs-my-open-bugs ()
(require 'debbugs)
(interactive)
(apply #'debbugs-gnu-bugs (debbugs-get-bugs :submitter "me" :status "open")))
(defalias 'debbugs-get-bug-by-id 'debbugs-gnu-bugs)
(provide 'guix-debbugs)
;;; guix-debbugs.el ends here
|