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: Lars Ingebrigtsen
Subject: bug#57856: 28.2; bookmark context strings in encrypted files
Date: Mon, 19 Sep 2022 09:42:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Albinus <michael.albinus@gmx.de> writes:

>> Right...  switching off bookmark context lines would go into
>> `epa-file-insert-file-contents' in the gpg case, I think -- where would
>> we do that in the Tramp case?
>
> There is `tramp-handle-insert-file-contents'. Since this is used for
> several Tramp backends, we need a check, whether Tramp encryption is
> active. Something like
>
> (when (tramp-crypt-file-name-p filename)
>    ...)
>
> OTOH, this would expose the "tramp-crypt-" namespace to tramp.el. Hmm,
> maybe I will adapt the solution, but you could start with this.

Looking at how to integrate this (which is always iffy when we're
dealing with several packages), I think this has to be done the other
way.  That is, `bookmark-make-record' has to check whether the file is
encrypted or not, becaues `*insert-file-contents' might not have been
run at all (if this is a new encrypted file, for instance).

So `tramp-crypt-file-name-p' is perfect for that, but there doesn't seem
to be any `epa-file-name-p' (or something equivalent)?  Hm...  OK, that
was trivial to add, so I've now done it this way in Emacs 29.







reply via email to

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