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

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

Re: isolating history with buffer-local variables


From: Stefan Monnier
Subject: Re: isolating history with buffer-local variables
Date: Wed, 20 May 2015 17:26:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> So, all up, for a single edit, I could end up with nine or more uncontrolled
> copies or fragments of foo.txt floating around. For normal files, this

To the extent that 9 copies is not fundamentally different from
3 copies, I think that it's OK to require the user to explicitly request
to skip backups/autosaves via something like:

> ;; backup-inhibited: t
> ;; eval: (auto-save-mode 0)

[ I have backup inhibited globally, FWIW.  ]

> to foo.conf to prevent the copies being created, but has no simple control
> over saved rings and histories.

For rings and history, the problem here is the same as for encrypted
files, so once we solve the problem for encrypted files, it can be used
for these confidential-but-not-encrypted files.

> +---------+---------+---------------+---------------+
> |File     |Local FS |Fp Ap Bp Hp Rp |Fe -  Be Hp Rp |
> |loc      +---------+---------------+---------------+
> |         |LAN      |Fp Ap Bp Hp Rp |Fe -  Be Hp Rp |
> |         +---------+---------------+---------------+
> |         |Remote   |Fp Ap Bp Hp Rp |Fe Ap Be Hp Rp |
> +---------+---------+---------------+---------------+
>
> Where:
> F = visited file (on user save)
> A = auto-saves (to ~/.emacs.d/auto-saves)
> B = backups (to ~/.emacs.d/backups)
> H = minibuffer history (et al) (to ~/.emacs.d/.emacs_history via savehist)
> R = kill-ring (et al) (also to ~/.emacs.d/.emacs_history via savehist)

As mentioned, please report a bug w.r.t minibuffer histories so your
private-mode can more easily make sure data doesn't escape this way.

> The results are largely as expected, with the exception of the handling of
> auto-saves on remote machines (the remote encrypted gpg was saved in plain
> text on the local machine). Perhaps this is a bug.

This is very much a severe bug, yes.  Please report it.

>                
> +---------------+-------------------------------+---------------+ 
>                                |            PRIVATE            |       
>                
> +---------------+---------------+---------------+---------------+
>                |plain-text     |plain-text     |encrypted      |encrypted     
>  |
> +----+---------+---------------+---------------+---------------+---------------+

I'm not sure we need to distinguish "encrypted+private" from the "normal
encrypted" files.  I.e. we should treat all encrypted files as private
(at least by default).


        Stefan




reply via email to

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