all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
@ 2023-09-27 16:44 Augusto Stoffel
  2023-10-01  2:34 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Stoffel @ 2023-09-27 16:44 UTC (permalink / raw)
  To: 66241

[-- Attachment #1: Type: text/plain, Size: 30 bytes --]

See patch for the rationale.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-auth-info-mode-for-non-hidden-authinfo-and-netrc.patch --]
[-- Type: text/x-patch, Size: 1081 bytes --]

From dc0abaff3dcaf9c7f48a8cd18dd045ae4323a030 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@gmail.com>
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)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
  2023-09-27 16:44 bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files Augusto Stoffel
@ 2023-10-01  2:34 ` Stefan Kangas
  2023-10-02  7:59   ` Augusto Stoffel
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2023-10-01  2:34 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 66241

Augusto Stoffel <arstoffel@gmail.com> 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?

>>From dc0abaff3dcaf9c7f48a8cd18dd045ae4323a030 Mon Sep 17 00:00:00 2001
> From: Augusto Stoffel <arstoffel@gmail.com>
> 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)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
  2023-10-01  2:34 ` Stefan Kangas
@ 2023-10-02  7:59   ` Augusto Stoffel
  2024-01-10 22:08     ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Stoffel @ 2023-10-02  7:59 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 66241

On Sat, 30 Sep 2023 at 19:34, Stefan Kangas wrote:

> Augusto Stoffel <arstoffel@gmail.com> 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 <arstoffel@gmail.com>
>> 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)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
  2023-10-02  7:59   ` Augusto Stoffel
@ 2024-01-10 22:08     ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2024-01-10 22:08 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 66241-done

Version: 30.1

Augusto Stoffel <arstoffel@gmail.com> writes:

> On Sat, 30 Sep 2023 at 19:34, Stefan Kangas wrote:
>
>> Augusto Stoffel <arstoffel@gmail.com> 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.)

Thanks, that makes sense.  So I installed this patch on master
(c12166de380).

I'm closing this bug report.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-10 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 16:44 bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files Augusto Stoffel
2023-10-01  2:34 ` Stefan Kangas
2023-10-02  7:59   ` Augusto Stoffel
2024-01-10 22:08     ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.