From patchwork Fri Aug 5 01:23:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Branson X-Patchwork-Id: 41277 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2B0BD27BBEA; Fri, 5 Aug 2022 02:24:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6979727BBE9 for ; Fri, 5 Aug 2022 02:24:11 +0100 (BST) Received: from localhost ([::1]:42220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJm4Q-0004GZ-IS for patchwork@mira.cbaines.net; Thu, 04 Aug 2022 21:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJm4I-0004GN-JE for guix-patches@gnu.org; Thu, 04 Aug 2022 21:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJm4I-0006pT-B4 for guix-patches@gnu.org; Thu, 04 Aug 2022 21:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJm4I-0004pP-35 for guix-patches@gnu.org; Thu, 04 Aug 2022 21:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56987] [PATCH] etc: guix-debbugs.el: new file. Resent-From: Joshua Branson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 01:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56987@debbugs.gnu.org Cc: Joshua Branson X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165966262118527 (code B ref -1); Fri, 05 Aug 2022 01:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 01:23:41 +0000 Received: from localhost ([127.0.0.1]:55420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJm3w-0004ol-BL for submit@debbugs.gnu.org; Thu, 04 Aug 2022 21:23:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:57276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJm3q-0004oX-UZ for submit@debbugs.gnu.org; Thu, 04 Aug 2022 21:23:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJm3q-0003uy-QK for guix-patches@gnu.org; Thu, 04 Aug 2022 21:23:34 -0400 Received: from mx1.dismail.de ([78.46.223.134]:29484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJm3n-0006et-AY for guix-patches@gnu.org; Thu, 04 Aug 2022 21:23:34 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id f840d7ac for ; Fri, 5 Aug 2022 03:23:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; s=20190914; bh=sHrcqHAk3A4XQOH2XiQZIroJ65B462eM5sIP4oXqmMk=; b= AJ9Ygdy9/hlUlxM8zI5stV0tfdh/dQ18FJkvZUJYBikeB8BUG1dVRr+rgLSiUqpP pmoFmsks/jtmvekEB08me29RdT9Tl9bVCoWPhS8M9TdSOX5961h2F2C4L4VGPfX3 kNTnAnNfYCB6GaFMz6xtQRGI2dn2ZAgraqjl6bpOvzR4M856i8JTKwZ0B5Vy4iIw f7DJwv6qAeOq9AjRpmvgcHbvB16fd6AcHui6JFGILsmV5bke8n4Pe+2huDMETZ7t oBH8uUg5rAAa5VAMsCTZL3iC5o9QWBb+DrQbIIalrllKkW/SIej2im3kXKpF5l4J Jb+gZHQMGihbEjYkkS2OjQ== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 4c2571d4 for ; Fri, 5 Aug 2022 03:23:27 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 7081679c for ; Fri, 5 Aug 2022 03:23:27 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2eb0c5fb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 Aug 2022 03:23:21 +0200 (CEST) Date: Thu, 4 Aug 2022 21:23:10 -0400 Message-Id: <20220805012310.5999-1-jbranso@dismail.de> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Joshua Branson X-ACL-Warn: , Joshua Branson via Guix-patches X-Patchwork-Original-From: Joshua Branson via Guix-patches via From: Joshua Branson X-getmail-retrieved-from-mailbox: Patches 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 base-commit: d6be56cd09bb6286b51d1efc8981993be2525d87 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 +;; Maintainer: Joshua Branson +;; 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