bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57856: 28.2; bookmark context strings in encrypted files


From: Michael Albinus
Subject: bug#57856: 28.2; bookmark context strings in encrypted files
Date: Mon, 19 Sep 2022 14:16:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi Lars,

> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> Thinking further about, there are also other files which shouldn't
>> expose snippets to bookmarks. Think about .authinfo / .netrc (more
>> general, all files used as auth-sources backend). And perhaps other
>> files.
>>
>> Wouldn't it be better, if packages like Tramp, epa, auth-sources, you
>> name it, could mark files to be excluded from bookmark-make-record? For
>> example, a hook a package could contribute to. In Tramp, we would run
>>
>> (add-hook 'bookmark-inhibit-bookmark-hook #'tramp-crypt-file-name-p)
>
> Yes, that's true, but we don't really have a way to define
> auth-source-file-p except by heuristics -- a netrc file may be called
> anything.
>
> So I'm not sure how that'd look...

auth-source-file-name-p could scan the auth-sources declarations for a
file based backend, and return t for such files. Shouldn't be too hard
to implement (oops, do I offer to volunteer?)

Let's start with bookmark-inhibit-bookmark-hook, adding
tramp-crypt-file-name-p and epa-file-name-p, and see, who else wants to
be added.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]