GNU bug report logs - #24478
25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories

Previous Next

Package: emacs;

Reported by: Ævar Arnfjörð Bjarmason <avar <at> booking.com>

Date: Tue, 20 Sep 2016 15:27:01 UTC

Severity: normal

Tags: patch

Found in version 25.1

Fixed in version 25.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 24478 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ævar Arnfjörð Bjarmason <avar <at> booking.com>
Cc: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>,
 24478 <at> debbugs.gnu.org
Subject: Re: bug#24478: 25.1;
 Regression in 25.1: .tramp_history files are littered in non-$HOME
 working directories
Date: Thu, 22 Sep 2016 20:02:59 +0200
Ævar Arnfjörð Bjarmason <avar <at> booking.com> writes:

Hi,

> There's a regression in 25.1 introduced by 1e04ea9 (although that seems
> to also have fixed an issue): Now tramp-histfile-override is set to
> ".tramp_history", which is good, but I would expect it to be created in
> $HOME on remote hosts.
>
> Instead when I e.g.:
>
>  1. C-x C-f //ssh:<hostname>:/usr/local/git_tree/sysadmin/
>  2. Run e.g. magit to make a commit
>  3. I end up with:
>
>     $ echo $PWD/.tramp_history
>     /usr/local/git_tree/sysadmin/.tramp_history
>     $ wc -l !$
>     wc -l $PWD/.tramp_history
>     34 /usr/local/git_tree/sysadmin/.tramp_history

Most of the shells I know off use the home directory, when you specify
just the relative file name ".tramp_history".

> From reading https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 and
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731#56 this seems like
> an unintended bug.
>
> Just setting:
>
>     (setq tramp-histfile-override "~/.tramp_history")
>
> Works for me. Now it's always created in ~.

I have thought about this, when I was fixing bug#19731. Unfortunately,
there exist shells which cannot expand "~/". Other shells cannot expand
"$HOME/". So I really don't know a robust default we could offer.

Maybe one should give this problem more emphasis in the Tramp
manual. But who reads manuals?

Best regards, Michael.




This bug report was last modified 8 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.