From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id CBglMxUDEmX1UgAAauVa8A:P1 (envelope-from ) for ; Tue, 26 Sep 2023 00:00:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CBglMxUDEmX1UgAAauVa8A (envelope-from ) for ; Tue, 26 Sep 2023 00:00:53 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 95A0F5ACF6 for ; Tue, 26 Sep 2023 00:00:53 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=OJfi1v46; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695679253; h=from:from:sender:sender: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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=US9L1Uf3Ys7cQ5oE7v9/Qw01s6thwFmzvF2MSAUe+aM=; b=B5P4vxrGwFH1agXAmGxWiazf0FAjoZkxBmWEndPPGekJswJqz+PUPwe4rbTSTsEBmyX9k7 JSRSr6E3dba//h5P3513CE3H4dRJ8CkvzclrXjlEY2nHdCd6wrFFbuyTXrgJG0NucY8v8Q hftxdmTUh6fsA9zrU1NrSKYnDHt+GY1HyKAfZd9JUVMmX4ZMRgpbYB1PjY1fuD81VEkBm1 0d23dBceBICz/LeMO7bZpOe2kKGEatDQeBSPgwbbngmrcE8LRrTHv5AZ+XB5qwv+rahT9o 8R53pV18OsUGqqJhJAqnY7Ml7qOInlJiQmciKSaQLBiuRo9Y0wXnWSGc/9k7eQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=OJfi1v46; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695679253; a=rsa-sha256; cv=none; b=M0J2rsgNuKfyfnxWBkBXHRVjUJU3i70V32rKQnU9CnT+P8R6ejIp7NOy86r+xS2yL1Hh8F zTsHY/If/XztLdztfuszaJicVZY/FFMwNqM9vewyduYSfKfDHBJ+p6GGm5dyLVfZHRz6Y+ ZYiEQ2L+J2yw5SFGRNaGiT2IiBs4HCRzXfVki+Zta6LXRc5IpEk1+Mfmc68OiooZeR4dMM mJ4IpgmoV9yNJknOpZJRGHipVORICN2tiwA7SrKbN3hIUf9YHhUkwbnzxSaAf4sC0FpWi7 MGHM/jZP6Y5HnsWIzo6mgu/SPGPPg7WaSxoWvnB2ZfnOFUOaaQU2SOYMnvVq7g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qktcn-0007AP-CO; Mon, 25 Sep 2023 18:00:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qktcZ-00079B-8r for guix-devel@gnu.org; Mon, 25 Sep 2023 18:00:09 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qktcU-0003KJ-0r for guix-devel@gnu.org; Mon, 25 Sep 2023 18:00:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BE080240103 for ; Mon, 25 Sep 2023 23:59:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1695679195; bh=IbJvTdNtz2hj1j7u7lvSEz9YE1tRGoOQdevD+w+WrGU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=OJfi1v468M18lQ3M5+hI4RwCcyYh4k27OtOt7nsPkS3nkLLR0ZNCHDqqIskRHRrBr E0YTd7gaah3Vjcp72F0j/WviDpX9LOPW9RYMQUGDewqqK5pyY+lt7DCM4CcjbReEUg sm3cCN8Q7lR28NU54qQHneHMH76GWzRbvYPD6rta7t+m5m01h6PEkJDJ6PjZ4ywhar wzFSNw5Ol363Ls8xhJuLgkxnoLfola9dlYEesXyqnynlkATxQiG7L5QTXy1zZIwFw9 npun2qNnDYB8XVW6C35J82y0d841tOixOVw0kAYSE0PW9pClx/yjn/nTuWMSiyhAt0 q2UAtPA542FCQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RvcHH1qpPz6tn4; Mon, 25 Sep 2023 23:59:55 +0200 (CEST) References: <87bke07ccl.fsf@gmail.com> <87zg19udmy.fsf@posteo.de> From: Mekeor Melire To: guix-devel@gnu.org Cc: Maxim Cournoyer Subject: Re: New section to easily reference Debbugs URLs within Emacs Debbugs Date: Mon, 25 Sep 2023 21:53:58 +0000 In-reply-to: <87zg19udmy.fsf@posteo.de> Message-ID: <87v8bxud74.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=mekeor@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.81 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 95A0F5ACF6 X-Spam-Score: -9.81 X-TUID: 98+exQrlRdaC --=-=-= Content-Type: text/plain; format=flowed 2023-09-25 21:27 mekeor@posteo.de: > 2023-09-17 16:51 maxim.cournoyer@gmail.com: > > > Hello, > > Hello Maxim, > > > If you use Emacs and Emacs-Debbugs, you may be interested in > > applying the settings newly documented in the 'Viewing Bugs > > within > > Emacs' section of the manual; see it at the bottom of info > > "(guix) > > The Perfect Setup"). > > > > I hope that's useful, > > Thank you for sharing. The new section is very useful for me. I > have > two things to feed back though. > > > First feedback: I think the new section should instruct to set > the > `bug-reference-url-format'. I.e. we should add this to the > suggested > code snippet: (setq bug-reference-url-format > "https://issues.guix.gnu.org/%s"). Otherwise, the suggested code > snippet results in an error when a bug reference is clicked. See > appendix. > > > Second feedback: It might be nice to write regular-expressions > using > the `rx' macro, but imho writing them as strings is shorter, > unobtrusive and thus preferable for average Guix users. I.e. I'd > suggest to replace the two setq-expressions of code that the new > manual section suggests, with the following S-expressions > respectively: > > (setq bug-reference-bug-regexp "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch > ?#\\|[Ff]ixes:? ?#\\|RFE ?#\\|PR > [+a-z-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\|\\)") > > (setq debbugs-browse-url-regexp > "^https?://\\(?:bugs\\|debbugs\\|issues\\.guix\\)\\.gnu\\.org/+\\(\\(?:cgi/bugreport\\.cgi\\?bug=\\)?\\)\\(?3:[[:digit:]]+\\)$") > > > WDYT? > > > [2. application/emacs-lisp; reproduce-error.el]... Third thought: Use #' for quoting functions consistently. Maybe do some code alignment. Putting all three thoughts together, I'd gather this code suggestion: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=new.el Content-Transfer-Encoding: quoted-printable (require 'bug-reference) (add-hook 'erc-mode-hook #'bug-reference-mode) (add-hook 'gnus-article-mode-hook #'bug-reference-mode) (add-hook 'gnus-mode-hook #'bug-reference-mode) (add-hook 'gnus-summary-mode-hook #'bug-reference-mode) (add-hook 'prog-mode-hook #'bug-reference-prog-mode) (setq bug-reference-bug-regexp "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|[Ff]ixes:? ?#\\|RFE ?#\\|PR [+a-z-= ]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\|\\)") (require 'debbugs) (require 'debbugs-browse) (add-hook 'bug-reference-mode-hook #'debbugs-browse-mode) (add-hook 'bug-reference-prog-mode-hook #'debbugs-browse-mode) (setq debbugs-browse-url-regexp "^https?://\\(?:bugs\\|debbugs\\|issues\\.guix\\)\\.gnu\\.org/+\\(\\(?:cg= i/bugreport\\.cgi\\?bug=3D\\)?\\)\\(?3:[[:digit:]]+\\)$") --=-=-=--