From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12.migadu.com with LMTPS id AIgAGGVMhGSNMgEATFOONw (envelope-from ) for ; Sat, 10 Jun 2023 12:11:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uJIVGGVMhGRzMgAA9RJhRA (envelope-from ) for ; Sat, 10 Jun 2023 12:11:49 +0200 Received: from mail1.fsfe.org (mail1.fsfe.org [217.69.89.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2948B3A7A3 for ; Sat, 10 Jun 2023 12:11:49 +0200 (CEST) From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1686391907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oN94EK+0GlrGNlrDkE+b6ldiXPo7CrdECuhaKM/Foa4=; b=eaShPWlm4KHl8E2xxEfBEeJcc7ocHAqwRzZ/JFgVcfP9C8umRcq3tc6+88YdkEMfFYQgt8 WHxyQoEufBLWKijFKXhczyI5Pg1LVav9h9jrJvG6J4AgTqfvwofoJSgVjG8w+vKTfvuJ4c GSZQRYpKJ8mrZPA6crACvSNsIZz49cY= To: Kyle Meyer Cc: piem@inbox.kyleam.com Subject: Re: [PATCH v2 5/5] Add basic integration for debbugs. In-Reply-To: <87pm63nc8t.fsf@kyleam.com> References: <87pm63nc8t.fsf@kyleam.com> Date: Sat, 10 Jun 2023 12:11:47 +0200 Message-ID: <87bkhnmxss.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: 2948B3A7A3 X-TUID: tn8swvh5tv3+ Kyle Meyer writes: > jlicht@fsfe.org writes: > >> From: Jelle Licht >> >> --- >> piem-debbugs.el | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 66 insertions(+) >> create mode 100644 piem-debbugs.el > > Please also update the Makefile and piem.texi (Enabling integration > libraries). Done in V3, including cleaning up some warnings when running `make'. >> >> diff --git a/piem-debbugs.el b/piem-debbugs.el >> new file mode 100644 >> index 0000000..8757ddd >> --- /dev/null >> +++ b/piem-debbugs.el >> @@ -0,0 +1,66 @@ >> +;;; piem-debbugs.el --- debbugs.el integration for piem -*- lexical-binding: t; -*- >> + >> +;; Copyright all piem contributors >> + >> +;; Author: Kyle Meyer > > I think your info for author instead of mine is more appropriate, since > you're adding this file. Done in V3. >> +;; Keywords: vc, tools >> +;; Package-Requires: ((emacs "26.3")) > > debbugs.el isn't bundled with Emacs, so Package-Requires should list > debbugs too. I looked through the history of the debbugs.el project, and everything we make use of seems to already exist debbugs.el version 0.29. Going back even further than that seemed silly to me, as we already depend on Emacs 26.3. >> +(defgroup piem-debbugs nil >> + "debbugs integration for piem." >> + :group 'piem) >> + >> +(defun piem-debbugs-get-inbox () >> + "Return inbox name from a debbugs buffer." >> + (when (derived-mode-p 'debbugs-gnu-mode) >> + (when-let ((gnu-package (alist-get 'package debbugs-gnu-local-query))) >> + (piem-inbox-by-gnu-package-match gnu-package)))) >> + >> +(defun piem-debbugs-get-mid () >> + "Return the message ID of a debbugs buffer." >> + (when (derived-mode-p 'debbugs-gnu-mode) >> + (let ((msgid (alist-get 'msgid (debbugs-gnu-current-status)))) >> + (when (stringp msgid) >> + (string-trim msgid "<" ">"))))) > > Nice. I haven't tested this out yet, but that looks as clean as I was > hoping it would. Indeed, thanks for the guidance.