From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:1004:224b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12.migadu.com with LMTPS id uKV0GUQDhGQxGQEATFOONw (envelope-from ) for ; Sat, 10 Jun 2023 06:59:48 +0200 Received: from mta0.migadu.com ([2001:41d0:1004:224b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UC9TGUQDhGSlIQAA9RJhRA (envelope-from ) for ; Sat, 10 Jun 2023 06:59:48 +0200 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1686373188; 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; bh=IoBuOXNU4VnERIpFxMpvf7lIScczNvO88KQ1990mNoI=; b=urJo6eRvi58CXw4Mxt2Lgw1qtnmqC/yFehuW7vr1cMs1WJ6DKPoLPXtj7QqAsF6fUPUpoS LR2FBhWTLplxwG3XCqimLVHGjcUR19QBNK2L/kyiXSYNhHyhnllQJ9UsLbsf9VCCCXN6O9 L0IXQtgXjUKuULDoY8E9M85i9x0fdu+7ElE5xGYZZ5RpU3EoUg9WYHG6CPH73n3o49GpEe JcIjMJHQC08frrQW24EErbVUTxjKzMQVFrZcKDXpDnibkfcRnwagkF23qlPacp4fBlrfjP GwYa2PH/GEEOrDXOO0f9nJza8bLJNeKF9IP7xVsMKNWgMqumgSTqCIdIjPjItA== From: Kyle Meyer To: jlicht@fsfe.org Cc: piem@inbox.kyleam.com Subject: Re: [PATCH v2 5/5] Add basic integration for debbugs. In-Reply-To: <20230609124829.29629-6-jlicht@fsfe.org> Date: Sat, 10 Jun 2023 00:59:46 -0400 Message-ID: <87pm63nc8t.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-TUID: niQOQmQLiNxJ 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). > > 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. > +;; Keywords: vc, tools > +;; Package-Requires: ((emacs "26.3")) debbugs.el isn't bundled with Emacs, so Package-Requires should list debbugs too. > +(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.