[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode
From: |
Manuel Giraud |
Subject: |
bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode |
Date: |
Mon, 20 Mar 2023 15:15:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Albinus <michael.albinus@gmx.de> writes:
[...]
> (defun my-find-file-hook ()
> (and buffer-file-name
> (member (file-remote-p buffer-file-name 'method) '("doas" "ksu" "su"
> "sudo"))
> (auto-save-mode 0)))
> (add-hook 'find-file-hook 'my-find-file-hook)
Hi Michael,
Thanks for this method, I'll try that.
> @Eli: We have already remote-file-name-inhibit-auto-save-visited. Shall
> we define another user option remote-file-name-inhibit-auto-save, which
> could be used similarly?
It is a good idea and will be more simple for the end user than the hook
you proposed above. That said, I think an important aspect of bug#57395
is to consider what remote/sudo file is "dangerous" and what isn't.
So maybe, it would be better to have an option
'dangerous-file-name-inhibit-auto-save' and have a "piece of code" (so
easy to say 😅) that check whether a file is a dangerous one or not… Or
maybe it is over engineering things.
Best regards,
--
Manuel Giraud
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, (continued)
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/18
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Eli Zaretskii, 2023/03/18
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Eli Zaretskii, 2023/03/18
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Eli Zaretskii, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/20
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Eli Zaretskii, 2023/03/20
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/20
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode,
Manuel Giraud <=
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Eli Zaretskii, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/20
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/19
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/20
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/22
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/23
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/24
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/24
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Michael Albinus, 2023/03/24
- bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode, Manuel Giraud, 2023/03/18