From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72735: 31.0.50; [PATCH] Make more bug-reference variables customizeable Date: Tue, 20 Aug 2024 22:39:18 +0300 Message-ID: <49562.951205165$1724182845@news.gmane.org> References: <86wmkbujh5.fsf@gnu.org> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27573"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72735@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 20 21:40:39 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sgUic-000712-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Aug 2024 21:40:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgUiL-0007Cy-2E; Tue, 20 Aug 2024 15:40:21 -0400 Original-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 1sgUiJ-0007Ca-DO for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 15:40:19 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgUiJ-0002hP-4X for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 15:40:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=1N24XwXY/rVfY0R31PoEKWBQ7H+jQF3hDK8VbWof1Uo=; b=Y2QgceFrWkQAMlRd80vj4mGlgVEnvaoSBFX2sgOzGFrac5RYbdNVEqJJbs0tYYPSQPmURxqaWM6w4L3rABwK+hCh5zYb1se/lS+I4JBHmMbAoj1QlAyc9sR767t81YkBrsy59IOk+gzJGxQQc3k4F/bM83lj5P1pf0ZWxbRCZrNQmhp3BKQcGzjDREJibqb+EJFWrL46viNR/b8SPzc21kkD2T10ElszmU/9e3TmUomKs/dYrR/4KBRAa2MF+VDRT06vgNNJV09Cpd1wmI1v0lZKKWWtXDHK1f9Jhr8XJMVCAV7uTRE5R/7uoZ7izDvii00WHCtp0CH8NYATtcbY6g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sgUj0-0004CC-Fq for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 15:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Aug 2024 19:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72735 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72735-submit@debbugs.gnu.org id=B72735.172418281216040 (code B ref 72735); Tue, 20 Aug 2024 19:41:02 +0000 Original-Received: (at 72735) by debbugs.gnu.org; 20 Aug 2024 19:40:12 +0000 Original-Received: from localhost ([127.0.0.1]:33689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgUiB-0004Ad-IG for submit@debbugs.gnu.org; Tue, 20 Aug 2024 15:40:11 -0400 Original-Received: from thaodan.de ([185.216.177.71]:56814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgUi9-0004AA-At for 72735@debbugs.gnu.org; Tue, 20 Aug 2024 15:40:09 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 80A39D00076; Tue, 20 Aug 2024 22:39:19 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1724182759; bh=M53lq8Qw/dfW+miRLSlDVk7yClFDWDz62s09paQKs6U=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YK7xf+zib0mXkDTnu3FpnckHqVml0cMxMOTJbxUw1XiTtZuFE7fWDAnM9oywDi/Gl P0eFOL1MJWNLZie65QSnpr+DwqTxS0laDaR9hEOZyZBL8yXqOi5sDLMKAUfcuwCoyD QtWHg8Y9At1Qcln84GpuoiRjO5kB+9ua3/+NVgDXPC13WVbo8fh2r//OEh7hHDDGhV TmRpswrCd7iz9Xe/eSMBt9zhvmwDUVqtiF3AagNc0pWwMhSIXjxMBh2IMFm6wR4N1h iaxS7h4axcjq9xIZkqLsbq3GeId7uLOs9NYpUx9Y1fKCSX5MuY7Mm33XvYs1lyZYCl SJIv4eUfaLTaBENlLGCSlfDN8eaEDadNtlWDiapWVoRv9dVgo01y/pKod0mnQJHkW1 C2azGLh1R88Fk4Asff6tXG7wm9mSmJg1ydm1uHN1Do5ZTOQFOpSrHJY8gEFFWt8tDu XoW9RhtnAN2KqwfIqoTNk+FTOlNDuYUO1M32rvQltNSx34uZGJox9OhYuadJyEiO0D hTNQJoT9AvVklw6GE6lH2b62wsJHHkw8qNedpAjeZ7jx3bs04oIs2Yq96TcDQ9dPrk W9W28ioG0YJKzLLkUYqc41PFia/788qL/9W/ZR/wDyZHNjGkyxypZlLV9nWV2R2J2s S+UGN1t6xeQGIA43041ALYC4= In-Reply-To: <86wmkbujh5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Aug 2024 21:39:34 +0300") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290468 Archived-At: Eli Zaretskii writes: >> Date: Tue, 20 Aug 2024 18:34:38 +0300 >> From: Bj=C3=B6rn Bidar via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> I noticed that some of the variables that can be modified >> by the user or as mentioned as such were not defined as custom variable. >> These patches to so and correct the group of one of the existing >> defcustom. >>=20 >> The patches don't change any of the existing functionality >> but only document these variables better and make them easier to modify. >> Because of that I set version to Emacs 30.1. Please tell if that's ok. > > The emacs-30 release branch is closed to enhancements, it only > receives bugfix changes and improvements in documentation. Converting > a defvar to a defcustom is not just a documentation change, it > radically changes how the variable is initialized and set. So this is > not appropriate for the release branch. OK I wasn't aware that there's such a difference for existing user that don't use defcustom. > Please see several comments below. > >> * lisp/progmodes/bug-reference.el (bug-reference-url-format): Define as >> custom type. The manual and the documentation string talk like the > ^^ >> variable like is a custom variable. It does make sense to define > ^^ > Our convention is to leave two spaces between sentences in comments, > strings, and commit log messages. There are several places in the > patch where you left only one space. Will fix, in prior changes to the file there were changes with only one spa= ce. >> -(defvar bug-reference-url-format nil >> +(defcustom bug-reference-url-format nil >> "Format used to turn a bug number into a URL. > > I wonder how this makes sense as a defcustom, since this variable must > be file-local, AFAIU. In any case, the doc string should explain the > semantics of the nil value. The doc string says it must be local however I see no reason to not be able to have a global function that returns a default if no setting is found for the file. E.g. it's common to have something like keyword#bugnumber where each keyword would refer to a different bugtracker.=20 >> + :group 'bug-reference) > > This is redundant (here and elsewhere in the patches), since the > package name will supply the group. ok,. >> +FORGE-TYPE is the type of the forge, e.g., gitlab, gitea, >> +sourcehut, or github. > > This leaves it unsaid how these symbols are used, and what symbols are > recognized. Does the original text not say that already? The choices over all the existing symbols which are accepted, if it doesn't make sense to e.g. add a custom symbol to extend the mode than removing the (symbol) choice is good. > Finally, I think this warrants a NEWS entry. Should the news entry explain similarly that the variables can be set with defcustom and have improved documentation? > Thanks.