From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files Date: Mon, 02 Oct 2023 09:59:57 +0200 Message-ID: <87fs2tsbcy.fsf@gmail.com> References: <87pm23d0qd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19880"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66241@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 02 10:01:06 2023 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 1qnDrW-0004xm-94 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Oct 2023 10:01:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnDrG-0005qS-Gm; Mon, 02 Oct 2023 04:00:51 -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 1qnDrB-0005nG-NR for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2023 04:00:45 -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 1qnDrB-00014l-F4 for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2023 04:00:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnDrR-0002WY-Rq for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2023 04:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Oct 2023 08:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66241-submit@debbugs.gnu.org id=B66241.16962336259629 (code B ref 66241); Mon, 02 Oct 2023 08:01:01 +0000 Original-Received: (at 66241) by debbugs.gnu.org; 2 Oct 2023 08:00:25 +0000 Original-Received: from localhost ([127.0.0.1]:35918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnDqq-0002VE-Ml for submit@debbugs.gnu.org; Mon, 02 Oct 2023 04:00:25 -0400 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:49588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnDqo-0002Uw-IU for 66241@debbugs.gnu.org; Mon, 02 Oct 2023 04:00:23 -0400 Original-Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9b2cee55056so561971966b.3 for <66241@debbugs.gnu.org>; Mon, 02 Oct 2023 01:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696233600; x=1696838400; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=M/q50vI5HrSzbZCJ1ukLno9M6Kt9bZAxG5BlXcVCnwc=; b=D88bHTn1kq5f4zT3BzhfuOdTzrtgAbZyJOc1P5H5DNL+XczUbMW8/MpG0akX2L72C3 lxezb8jbJedSfel2Rdu4s1vDOqIOzrb5MByB4WpEqmHqBMdBwqxflN053TK01LRYwEUc sxdqsIkAIjpTnAEeXaLvKLESEmKfAmH3wjWDUqEOxgM49/W3JHXpmSiA/3X75OJ0ik2l m0iIusvSjSQlJ9wh37qQcR/yPg5fPO1ySvZxsssuqEVZo5R22jE7sFIaSrRj2EjpNmNv smT88DNPS7usODc1haMBi2BKy4gx89b5gPeBCSDp0n8u8c1zg/kDm9Mh2P2OB2KR3WtG 1M8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696233600; x=1696838400; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=M/q50vI5HrSzbZCJ1ukLno9M6Kt9bZAxG5BlXcVCnwc=; b=rL6wCig4b5IIkUeczhQrEtSynAQvPyy4Q040PTt/DyQS4I169BGlT8Fzj2rH+DTeOz OcqGV8MkZ+8eJ6jFEUgLEQ2kGxMSXR2+fyD8CYpvJAdF1BB6TAYcIBwRPYJf9QmuylFq iSh3BZiUUGVuRI/ANM10MBaLroIHSlCOtnfYr+WW9wBns9DUqwGq3KPWyK6E8pd3EQSy qGx+IsD57McIqWOfPl2Ityb61xvVwlj/9jynUuVvxIvZEZIWstCs81SEKetQPqZ+r7q0 mg2HlcH95DopS2rM+ZiIS1uxMbVsLyT2YeTbTZs9f4Cw0ephyjerqoyRwpK6GZ905hNg XkFQ== X-Gm-Message-State: AOJu0YwVPyhb6lSGBDOGS5cLdp6/JEsS1zbgQxgkGmt53jsyhtej/78s /BriB8pt72tajXM9Ak13qYGj8m1GV7A= X-Google-Smtp-Source: AGHT+IFWziThRdUir5ttkFLPWy4rOXTV5/kf8LDeuc7fsb3zNlGqxcwRx5haYUYllR68awzLZseTIg== X-Received: by 2002:a17:906:749b:b0:992:c8d7:b66f with SMTP id e27-20020a170906749b00b00992c8d7b66fmr9235570ejl.75.1696233599454; Mon, 02 Oct 2023 00:59:59 -0700 (PDT) Original-Received: from ars3 (ip5f5aefe0.dynamic.kabel-deutschland.de. [95.90.239.224]) by smtp.gmail.com with ESMTPSA id a19-20020a170906275300b0099290e2c163sm16487730ejd.204.2023.10.02.00.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 00:59:58 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Sat, 30 Sep 2023 19:34:31 -0700") 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:271656 Archived-At: On Sat, 30 Sep 2023 at 19:34, Stefan Kangas wrote: > Augusto Stoffel writes: > >> See patch for the rationale. > > Thanks. Could you explain why you think that this should this be the > default value, instead of merely a user customization? The user customization is indeed rather easy: one can add a "-*- mode:" comment at the top of the file. The main issue with that is that the user needs to be aware of the existence of the mode. I wasn't, until recently. The second point is, I see no potential for false-positives, i.e., who would have a file name "authinfo" or "netrc" that is not a credentials file? (Of course this is just a theory which can be disputed.) >>>>From dc0abaff3dcaf9c7f48a8cd18dd045ae4323a030 Mon Sep 17 00:00:00 2001 >> From: Augusto Stoffel >> Date: Wed, 27 Sep 2023 18:35:32 +0200 >> Subject: [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files >> >> * files.el (auto-mode-alist): Match non-hidden authinfo and netrc >> files, since it is reasonable to store passwords in >> ~/.emacs.d/authinfo.gpg or a similarly named file. >> --- >> lisp/files.el | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lisp/files.el b/lisp/files.el >> index b67482a2f74..f2980de4810 100644 >> --- a/lisp/files.el >> +++ b/lisp/files.el >> @@ -3038,7 +3038,7 @@ auto-mode-alist >> ("\\.docbook\\'" . sgml-mode) >> ("\\.com\\'" . dcl-mode) >> ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) >> - ("/\\.\\(authinfo\\|netrc\\)\\'" . authinfo-mode) >> + ("/\\.?\\(authinfo\\|netrc\\)\\'" . authinfo-mode) >> ;; Windows candidates may be opened case sensitively on Unix >> ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) >> ("\\.la\\'" . conf-unix-mode)