unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Joshua Branson via Guix-patches via <guix-patches@gnu.org>
To: 56987@debbugs.gnu.org
Cc: Joshua Branson <jbranso@dismail.de>
Subject: [bug#56987] [PATCH] etc: guix-debbugs.el: new file.
Date: Thu,  4 Aug 2022 21:23:10 -0400	[thread overview]
Message-ID: <20220805012310.5999-1-jbranso@dismail.de> (raw)

New users may find the default debbugs commands a little awkward to use.
This patch provides three new functions and documentation that may ease
them into using debbugs and encourages them to close their open bug
reports.

* etc/guix-debbugs.el (debbugs-guix-search, debbugs-my-open-bugs,
debbugs-get-bug-by-id): new procedures.
* doc/contributing.texi (Debbugs User Interfaces): documented the new
emacs procedures and explained how to modify .emacs.d to use them.
---
 doc/contributing.texi | 57 +++++++++++++++++++++++++++++++++++--
 etc/guix-debbugs.el   | 65 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+), 2 deletions(-)
 create mode 100644 etc/guix-debbugs.el

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 02c7c5ae59..683b9bd9d2 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1453,14 +1453,67 @@ issues using @file{debbugs.el}, which you can install with:
 guix install emacs-debbugs
 @end example
 
-For example, to list all open issues on @code{guix-patches}, hit:
+Newcomers may find the default debbugs functions awkward to use.  We
+provide three helper functions that will help you start contributing to
+guix sooner:
+
+@table @asis
+@item @code{M-x debbugs-guix-search}
+to search for guix bugs.
+
+@item @code{M-x debbugs-my-open-bugs}
+to search for your open bug reports.  These are reports that you
+submitted.  Once every six months, run this command, and try to close
+your open bugs.  Or just update the bug report with something like,
+'This is still a bug.  Please do not close this bug.'
+
+@item @code{M-x debbugs-get-bug-by-id}
+to search for bugs by the 5 digit bug number.
+@end table
+
+To start using these guix specific functions, define the variable
+@code{user-mail-address}, and put the following into your
+@code{.emacs.d} (assuming the guix source is located in ~/src/guix/):
+
+@lisp
+(setq user-mail-address "awesomecoder@@gnu.org")
+
+(load-file "~/src/guix/etc/guix-debbugs.el")
+
+(setq smtpmail-smtp-user user-mail-address
+      message-send-mail-function 'smtpmail-send-it
+      send-mail-function 'smtpmail-send-it
+      ;; 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)
+@end lisp
+
+Emacs' debbugs interface is awesome, but in order to use it to its
+fullest potential, you need to set up emacs to send email.  Luckily, the
+previous lines of code set up Emacs to use email for you! Now, go ahead
+and test Emacs' email sending ablities via @code{C-x m}.  For testing
+purposes, send a test email to a friend or to yourself.  To send the
+message, type in @code{C-c C-c}.  Emacs will ask you for your email
+password and optionally offer to save it in the unencrypted file
+@code{~/.authinfo}.  If you would rather save the password to an
+encrypted file (@code{~/.authinfo.gpg}), then please see
+@xref{Overview,,, auth, Emacs auth-source} and optionally set up GPG
+@comment I cannot get the below link to work.  Why?
+agent (@xref{gnupg, gnupg, gnupg, Invoking GPG-AGENT}). If you can send
+the email, then you should be all set to use Emacs's debbugs interface!
+
+Finally, we encourage all potential contributers to occassionally review
+some pending patches. There's quite a few!  You can test to see if the
+patch works for you, and reply to the open bug report.  Here is how you
+might get started finding the pending patches:
 
 @example
 @kbd{C-u} @kbd{M-x} debbugs-gnu @kbd{RET} @kbd{RET} guix-patches @kbd{RET} n y
 @end example
 
 @xref{Top,,, debbugs-ug, Debbugs User Guide}, for more information on
-this nifty tool!
+this nifty tool, like how to close, tag, and merge bug reports!
 
 @node Debbugs Usertags
 @subsection Debbugs Usertags
diff --git a/etc/guix-debbugs.el b/etc/guix-debbugs.el
new file mode 100644
index 0000000000..794489b671
--- /dev/null
+++ b/etc/guix-debbugs.el
@@ -0,0 +1,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

base-commit: d6be56cd09bb6286b51d1efc8981993be2525d87
-- 
2.37.1





             reply	other threads:[~2022-08-05  1:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  1:23 Joshua Branson via Guix-patches via [this message]
2022-08-05  1:32 ` [bug#56987] [PATCH] etc: guix-debbugs.el: new file Joshua Branson via Guix-patches via
2022-08-10 15:16   ` Joshua Branson via Guix-patches via
2022-08-10 16:44 ` Michael Albinus
2022-08-10 20:10 ` jbranso--- via Guix-patches via
2022-08-10 20:24   ` Maxime Devos
2022-08-10 20:39   ` jbranso--- via Guix-patches via
2022-08-10 21:22   ` [bug#56987] Requesting help in assigning copright to Emacs's debbugs jbranso--- via Guix-patches via
2022-08-11 19:51     ` [bug#56987] [PATCH] etc: guix-debbugs.el: new file Joshua Branson via Guix-patches via
     [not found]     ` <304e6f0d877d6b8bb60db051e661edf1@dismail.de>
2022-08-17 20:14       ` [bug#56987] Fwd: [gnu.org #1863422] Joshua Allen Branson GNU EMACS jbranso--- via Guix-patches via
2022-08-18  9:52         ` Michael Albinus
2022-08-22 17:21           ` [bug#56987] [PATCH] etc: guix-debbugs.el: new file Joshua Branson via Guix-patches via
2022-08-11  6:24   ` Michael Albinus
2022-08-11 15:25     ` Joshua Branson via Guix-patches via
2022-08-11 16:06       ` Michael Albinus
2022-08-13 22:49         ` Joshua Branson via Guix-patches via
2022-08-12 19:17       ` jbranso--- via Guix-patches via
2022-10-01 15:39 ` [bug#56987] [PATCH] added *my-open-bugs functions Joshua Branson via Guix-patches via
2022-10-02 12:52   ` Michael Albinus
2022-10-03 20:02   ` jbranso--- via Guix-patches via
2022-10-04 14:15     ` Michael Albinus
2022-10-05 16:41 ` [bug#56987] [PATCH] new functions 'debbugs-gnu-my-open-bugs' and 'debbugs-gnu-guix-search' Joshua Branson via Guix-patches via
2022-10-05 20:10   ` bug#56987: " Michael Albinus
     [not found] <rt-4.2.16-14-g9a593ee-12923-1660753466-248.1863422-5-0@rt.gnu.org>
     [not found] ` <RT-Ticket-1863422@rt.gnu.org>
     [not found]   ` <rt-4.2.16-14-g9a593ee-21845-1660236515-917.1863103-5-0@rt.gnu.org>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220805012310.5999-1-jbranso@dismail.de \
    --to=guix-patches@gnu.org \
    --cc=56987@debbugs.gnu.org \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).