From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#57856: 28.2; bookmark context strings in encrypted files Date: Mon, 19 Sep 2022 11:00:07 +0200 Message-ID: <878rmfkaco.fsf@gmx.de> References: <87bkrfh77i.fsf@gmail.com> <87mtaz8quf.fsf@gnus.org> <877d23h4df.fsf@gmail.com> <87czbv8od3.fsf@gnus.org> <87y1ujsbjp.fsf@gmx.de> <874jx56l2v.fsf@gnus.org> <87mtaxx8s7.fsf@gmx.de> <87leqfzu6j.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="868"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Gustavo Barros , 57856@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 11:31:17 2022 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 1oaD7V-000069-4b for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 11:31:17 +0200 Original-Received: from localhost ([::1]:39868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaD7U-0003sq-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 05:31:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaCeE-0007rG-Nr for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 05:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaCeE-0007iv-AD for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 05:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaCeE-0005LK-3n for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57856 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57856-submit@debbugs.gnu.org id=B57856.166357801720451 (code B ref 57856); Mon, 19 Sep 2022 09:01:02 +0000 Original-Received: (at 57856) by debbugs.gnu.org; 19 Sep 2022 09:00:17 +0000 Original-Received: from localhost ([127.0.0.1]:52387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaCdV-0005Jn-3X for submit@debbugs.gnu.org; Mon, 19 Sep 2022 05:00:17 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:38067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaCdS-0005JV-S1 for 57856@debbugs.gnu.org; Mon, 19 Sep 2022 05:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663578008; bh=bKUqlbnBTdB64paCXfdEagx+pS96szsKc6yTY/moRHk=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=hw+8JazLpf/ixueHk7vp/hCBYpsaBG3y4bkusKqhecN9cEFMsqkVqKjcNXuYOAivB LinYv4FLzRqQ4g9M0fIUqyogIcpxzHOQ/XScFTtJS/FEmRR5k1gTsOtdwlHfTjEfQt 9oaI2ixSBD/O+y7RFb4o9JbVaMDjRb4LpiBAKiaI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.159.44]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1Obh-1pGz7z0M6V-012qRR; Mon, 19 Sep 2022 11:00:08 +0200 In-Reply-To: <87leqfzu6j.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Sep 2022 09:42:44 +0200") X-Provags-ID: V03:K1:0A3lV4TULm7n98YnB30ZlDbhh1V3pzuArmmrxUcfaER8KgfGrIC YdYRht+ujKeI6dEiOcdtcnU2ed8wT4Slc+zrIXkp0S14SNo5yvZJhU30AaFo2vjpnuiiqsV uwrCvbMj94I6lvIs/d/JfosGod8mqOsAsjBJ6JvEvQxQPcA/daI22+YXv0ptqxKtbeO3/pH 0MpFkI5NFuxC/26int73g== X-UI-Out-Filterresults: notjunk:1;V03:K0:yiLzfo9N/+4=:y1ZpKuAUuip2rrI27Qb5UA x/7fYzEt6VLus7MiNpwMWI8QHU5rFauhWmQllcffsh/lmGzhmvPkY/aijGRx78NZmUXZCMzr/ 0xoSDuQrEn+hyGZAY/VqM9haXTdXIGsqLNqEsJyFa6VgQAexB6gSWF6mFvRVGkinL7/294eZE 3icAbdFoVr5pQWctf8mAi+kFoiEuJQ1M7pBb/DuXnNXB4yAhO1EmF0hTdOQbLIQOaPv52VFu7 bztkQi5uED+Iwb/KpnCtFgUCFstf1MccVIg9x9iz2PTx53ZeCLV2a5t0wd0O3+X3PUPdM07q5 FjMv5fc0Voam/u+pUVCXWP8Tz26kOhvgk5kcItPSIOA3YD+oZ+TxHdVygcKaCrCV6E6ObnIdQ K6uiAU3VZR761spu4xoDRQNEoSDNLFkFUs/imAs5NfvDsHPTKmwZ/fm8WatWn1QpbUxM0DcMH 2GTEv26G8r7aAubX5WeRFf4Lwnr5F2+c5bBXweb9OQ9mhrK4yozZV8xiMFRtlFL0xLNiZ8fjl uHab0uywSety+Jmy1EbGweKpDQy3EpYOpnVqlrp4TxUdnqUPQRhrOpDgU6fU9aFmfwjPKCJH9 6oCnKYVhN3fgOlBcW4S0GMgX1ApzhXaVOh9uRpQtlfjQwRexoKPauFMqEseZuDF/Y/vUqPnd1 XNw77e0UapkX34Q9UlMsvvH6939Xh8k9e7EGaLnA769N6UtVqi+6AAVd7KeQUgGg2xOmYP3Hj TbBGQ1V0UI0DvZ7Vetn5gDpMkE07xSMScrBfOOZnu3fvLCuHhHROi5RRwlVaKxj3j629wiDK 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" Xref: news.gmane.io gmane.emacs.bugs:243060 Archived-At: Lars Ingebrigtsen writes: Hi Lars, > 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. Thanks. 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) Similar for other packages. Best regards, Michael.