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

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

bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest


From: Michael Albinus
Subject: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest
Date: Mon, 28 Apr 2014 12:07:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Vasilij Schneidermann <address@hidden> writes:

> Hi Michael,

Hi Vasilij,

[pls keep address@hidden in Cc, for the archives]

> I've applied the patch successfully and did a comparision test between
> both Emacs 24.3.1 and 24.3.90. In that test I first open a file from a
> remote host via `C-x C-f /ssh:address@hidden:/path/to/file`, then open a
> shell, do `ssh address@hidden and hit `C-p` to check whether the history
> file has been clobbered.
>
> With Emacs 24.3.1 the test output is:
>
> address@hidden ~]$ exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' 
> /bin/sh
>
> With the patched Emacs 24.3.90 the test output is:
>
> address@hidden ~]$ exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' 
> PS1=\#\$\  PS2='' PS3='' /bin/sh
>
> So, the difference seems to be an extra environment variable set.
> Clobbering on the remote side is not prevented. Perhaps it the changes
> prevent it on the local side? I'm not sure as I've only briefly looked
> at TRAMP internals and didn't understand much.

In the past, *all* Tramp commands were visible in your remote history
file. With my patch, only the very first command is still visible, the
one you have quoted. Tramp cannot avoid this behaviour, because it has
no mean to set the remote environment prior running the very first
command. You could do this yourself by creating a local ~/.ssh/environment
file, containing

HISTFILE=/dev/null

See the ssh(1) manpage for details.

The local history shall be clean, because Tramp sets $HISTFILE locally
prior to calling anything.

> Best regards
> Vasilij

Best regards, Michael.





reply via email to

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