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#74946: [PATCH] * lisp/files.el (auto-mode-alist): Include gdbinit too Date: Fri, 20 Dec 2024 10:07:17 +0200 Message-ID: <27915.511820332$1734682106@news.gmane.org> References: <87frml6pkg.fsf@thaodan.de> <86o718ks3b.fsf@gnu.org> <86seqikg23.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="40953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: acorallo@gnu.org, stefankangas@gmail.com, 74946@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 09:08:18 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 1tOY3V-000ARy-FT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 09:08:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOY3K-0007XD-GB; Fri, 20 Dec 2024 03:08:06 -0500 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 1tOY3G-0007Wp-Ky for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 03:08:02 -0500 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 1tOY3G-00058M-CC for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 03:08:02 -0500 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=bQzI4EfdKkbb3ktXMZkT+fyCO+kGNRMWE+fKSMoxM9A=; b=Ig5IWjmu/2DQpN9xWuootyNdPphoZHjXxYBWr3HF1hro6S5TyqeCMlzWapsGaHoGQPWPszC8xl8pFKVNYsG4f27NCiES8F0RguajntGzVB2sxP/wgL342YIKsmtABN5bnkXTX73y3CCpV96tMjM+AZUpyrqCjeNDO6wIAWI2KHzDL2YgT73GqGUcvNgGjMZgkfh2On8iXoBzxsPwlCChG9K9F6qrpQL3+JEiX6qTEr/MlMV60zFVOInmgJpmm0juHkIE6BTXz0/SrvbRsQRwHOyq+yS/PFhvT6bjUyM13s3w0Zq3tEKwNPCjVRueYYApM6+DTsALjDeQ+JmIxpeddQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOY3G-000257-71 for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 03:08:02 -0500 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: Fri, 20 Dec 2024 08:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74946 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74946-submit@debbugs.gnu.org id=B74946.17346820477946 (code B ref 74946); Fri, 20 Dec 2024 08:08:02 +0000 Original-Received: (at 74946) by debbugs.gnu.org; 20 Dec 2024 08:07:27 +0000 Original-Received: from localhost ([127.0.0.1]:41535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOY2h-000245-7g for submit@debbugs.gnu.org; Fri, 20 Dec 2024 03:07:27 -0500 Original-Received: from thaodan.de ([185.216.177.71]:50214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOY2f-00023o-Ey for 74946@debbugs.gnu.org; Fri, 20 Dec 2024 03:07:25 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id C4E63D00072; Fri, 20 Dec 2024 10:07:18 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1734682039; bh=SioC/zhorGQoRRU4f4rAH0qsanVcyOnuL5xSHjrnQlM=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Za+T9RejXexAk6KvvI3M+hvhPBX/I2EtSlzR8v7DQ0tWCdtR6s/wBjYtDXBAtwndG 8v49KJXIfhV7Q/VHfBhUaapj9ZH7Br0lijF3F9wZykg3QmEXTnkGfvidhRCQO/ie8N FEyg/f44Aj1GVxgoaBAQWTqn+uf/AK5To/IIU20kU2vq1qZTddQvTcnbssJX+MrpCH 5cs3PEVggXGJIqcxhBSwntfYpnybbOUKK7g9RL/S52ckI9xCruNDw4VSoh+0cDIN8z hdPcSl7DBqZIv5bvG+LOP2cmzBrIDf/K1kESrxyR4ap8pGIlFTDgXhHz60j6RSVNcu T66mNP9KH3dM0JTK6va9I1RTNG94YPCK8Ci+mUawtg11ju4TGtEWZztFP4cBiDj6Es SeZ9lVgETtXXIjeX6WUcTB8Ci5PkLgmr7RaDps+db5GlFTOCqQJMuNZn7piYhKZnpB MiLrck0MhGhBdV2uEfCggtZhE9ZqU74yKMfG6YWCzYgGG5U9o/3gJ7kahrEjUx3LqU ENmMPg3P2bCF1rgL8GQut+ukZot1ehRmTT/RX7g4XQhO7JNShfQuKbh9Ti1NXLerY2 MCH4SF26eeJHsvAWXQqtd6d5PkpGf63amIDZSAB6Sc/fTozVG1yALwPwY9w9T9VoW7 4HqutcWBWkhuJG8OeNtSKuQM= In-Reply-To: <86seqikg23.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Dec 2024 08:46:12 +0200") 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:297436 Archived-At: Eli Zaretskii writes: >> From: Bj=C3=B6rn Bidar >> Cc: Stefan Kangas , 74946@debbugs.gnu.org, >> acorallo@gnu.org >> Date: Thu, 19 Dec 2024 23:29:00 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > It looks innocent enough, but at this point I'd like to limit changes >> > on the release branch to only really urgent and important ones (or >> > documentation). We have lived with this outdated code for several >> > years (GDB 11.1 was released in 2022), so this change doesn't look >> > urgent to me. >>=20 >> Not really that urgent but to new users of Emacs it would be >> beneficial if things would work out of the box. I thought at first Emacs >> just didn't support the file. > > I understand, but my main worry is the potential unintended > consequences. Regexps are tricky, as we all know. Yeah I get it np. Your call. The risks are low I'd say. >> > Btw, if we want to fix this entry, we should perhaps do a more >> > thorough job. For example, on my system I have files with the >> > following base names: >> > >> > .gdbinit.in >> > .gdbinit >> > _gdbinit (for MS-DOS) >> > gdb.ini (likewise) >>=20 >> Is this a gdbinit file? The extension looks off. > > Yes, gdb.ini is a gdbinit file. But if supporting it is problematic > or causes too many complications, I'm okay with not supporting that > particular file name. I later got that too. The gdb manual states that gdb.ini is the official name of gdb on DOS systems. I think it should be fine as the chance for false-positives in low on this one. >> > gdbinit >> > gdbinit.in >> > SOMETHING-gdbinit >> > .gdbinit.loader >> > gdbinit-history.exp (not a GDB init file) >> > gdbinit.5 (likewise) >> > gdbinit.c (likewise) >> > .gdbinit.py.in (likewise) >> > >> > Should we improve the regexp to DTRT for those additional files, but >> > without false positives? >>=20 >> With Stefan correction all these without extension match. What are the >> official extensions? gdbinit.in sounds like a normal extension for >> gdbinit template in the source but the others such as gdb.ini look off. > > So we should at least allow the ".in" extension? Also, note that the > current regexp doesn't end with a \\' so it could be a partial match > with, say, /foo/bar/gdbinit-but-not-really. I think so yes. In most instances the .in extension should also match the preceding match it I think.