From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories Date: Sat, 15 Oct 2016 12:38:15 +0200 Message-ID: <871szhsxrc.fsf@gmx.de> References: <8737kuan39.fsf@booking.com> <87zimzke24.fsf@gmx.de> <83int0ebfz.fsf@gnu.org> <87y41vm1nn.fsf@gmx.de> <874m4jrlli.fsf@gmx.de> <87mvi9ll1j.fsf@gmx.de> <8737k08fpe.fsf@gmx.de> <8760owky8n.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476527983 449 195.159.176.226 (15 Oct 2016 10:39:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Oct 2016 10:39:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 24478@debbugs.gnu.org, Ted Zlatanov To: =?UTF-8?Q?=C3=86var_?= =?UTF-8?Q?Arnfj=C3=B6r=C3=B0?= Bjarmason Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 15 12:39:39 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvMN6-0004oe-Hq for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Oct 2016 12:39:20 +0200 Original-Received: from localhost ([::1]:51285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvMMz-0003TO-VB for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Oct 2016 06:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvMMt-0003TG-To for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2016 06:39:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvMMn-0004ws-Sn for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2016 06:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52739) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvMMn-0004wk-PM for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2016 06:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bvMMn-0002GJ-KC for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2016 06:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2016 10:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24478-submit@debbugs.gnu.org id=B24478.14765279088648 (code B ref 24478); Sat, 15 Oct 2016 10:39:01 +0000 Original-Received: (at 24478) by debbugs.gnu.org; 15 Oct 2016 10:38:28 +0000 Original-Received: from localhost ([127.0.0.1]:58928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvMMF-0002FO-P5 for submit@debbugs.gnu.org; Sat, 15 Oct 2016 06:38:28 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:63794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvMMD-0002F4-Kf for 24478@debbugs.gnu.org; Sat, 15 Oct 2016 06:38:26 -0400 Original-Received: from detlef.gmx.de ([87.146.57.45]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LcT2M-1ce4Zr2XTi-00jqfE; Sat, 15 Oct 2016 12:38:17 +0200 In-Reply-To: <8760owky8n.fsf@gmx.de> (Michael Albinus's message of "Thu, 13 Oct 2016 18:30:32 +0200") X-Provags-ID: V03:K0:9eo8+cXsPADrRRGfg4VvYNV+cU3DOegH+fdtPbvkut8NuecgNNA HiYhD/EoEYQ2Z+PNfXEZvdqIt2B9GH4udffMLKP3oNfa/vowdu/bcjP4qAPfzER11BnA0t5 WtDJYbR5a8ypjpTrnupKTGi5EmH2MQ6PRO3LYQoaxBUv6SV5umg0sFyJjwb4nzz8aOIXPqR JkPm3wcotaFqnCaxwT21g== X-UI-Out-Filterresults: notjunk:1;V01:K0:Wmk9b2qcNSk=:woGqjycd3S0NBQF41LcvUY K9ZygdqPaPBl2OQ3JgFYG1gJT7SNADl5zQqzWAZbKdwJ5spqU60FU3GHR/0ge6egjPNn9m64D 041BimOnAi3RdPn1eivuWHkCeuJHc0ZWumCkXJg828fLaDCypAVoHdHaEWsrZXb7A0Gk8Z0mQ JFtbC2hi0eAnHGYQmg/EBZha16O0iECe7lrtW5I8TUMy2lCE/fDE3Zx+3otG8qrYJ29xzvXcn 7aijsve2AZBjN1sYD5If80p+Ckm6eaDAr+C1TC3o/zHl8vWVqmZ4vFEWNcb8aEYv8nyM6/Dw7 z564esvXY2dxp0Cpl12Uo3jMhUD74hW+vEVLGOSpkUDlzrhFMArhL4m+QP6djvXozOFlPijSp Iix2Ui1JNs2kfoXFBcALK4a3RN4zTYsYgwP9AMRh9KeIaRJBWFhnwOSmIt9wdovIl+StV2pi1 zQv1qGk4/N2v3aMhGZ3y4+21gDtP+11ytsC+ScgNFiPfxpJ7GJezLxXxbp++Qt+r3OsKkX88+ fyu3zGGg3tnUU6WphN4rqC9mhZhOi9V3U3HWPoFM09ow24yVnZGZo7wxctV2J0hJQnSFB0SoM xGxp29giBikWdeuedbMEQvXALIvGJ2UeJz3/S1tS8yGW9JEDIZaB8F+6a4pQ9c06Uz/ppV0LU i5wxxJX0EjCVh4D4AqgoZAGidxrH9bjeoHBme36UlSrOrRdBkDUV8MlD7/rQs8AGzYfBUxPPj dPUSdMtFir0BKYKNSIHKDK328brkvXelMxEjgx9s6tO85iYG+aPlMu1MFq3dR3HLN+J/DMMU X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124502 Archived-At: Michael Albinus writes: Hi =C3=86var, >> I.e. their /bin/sh is always bash, as opposed to say the more minimal >> dash shell on Debian. > > Indeed. All the bugs I've quoted were related to bash. Well, I've partly reverted the fix for bug#20446. This shall fix the problem for you. See appended patch. Glenn, you have reported bug#20446. I believe that I haven't reintroduced your problem, but I would appreciate pretty much if you could cross-check this. The point is NOT to set $HISTFILESIZE. Best regards, Michael. --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs-25/lisp/net/tramp-sh.el.~4f406e9813e073b675bb45= 613bf1dd111eec2368~ 2016-10-15 12:34:57.847998549 +0200 --- /home/albinus/src/emacs-25/lisp/net/tramp-sh.el 2016-10-15 12:28:04.562= 663524 +0200 *************** *** 67,85 **** :type 'string) =20=20 ;;;###tramp-autoload ! (defcustom tramp-histfile-override ".tramp_history" "When invoking a shell, override the HISTFILE with this value. When setting to a string, it redirects the shell history to that file. Be careful when setting to \"/dev/null\"; this might result in undesired results when using \"bash\" as shell. =20=20 The value t, the default value, unsets any setting of HISTFILE, ! and sets both HISTFILESIZE and HISTSIZE to 0. If you set this ! variable to nil, however, the *override* is disabled, so the ! history will go to the default storage location, ! e.g. \"$HOME/.sh_history\"." :group 'tramp ! :version "25.1" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))) --- 67,84 ---- :type 'string) =20=20 ;;;###tramp-autoload ! (defcustom tramp-histfile-override t "When invoking a shell, override the HISTFILE with this value. When setting to a string, it redirects the shell history to that file. Be careful when setting to \"/dev/null\"; this might result in undesired results when using \"bash\" as shell. =20=20 The value t, the default value, unsets any setting of HISTFILE, ! and sets HISTSIZE to 0. If you set this variable to nil, ! however, the *override* is disabled, so the history will go to ! the default storage location, e.g. \"$HOME/.sh_history\"." :group 'tramp ! :version "25.2" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))) *************** *** 4113,4119 **** (format "HISTFILE=3D%s" (tramp-shell-quote-argument tramp-histfile-override)) (if tramp-histfile-override ! "HISTFILE=3D'' HISTFILESIZE=3D0 HISTSIZE=3D0" "")) (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) --- 4112,4118 ---- (format "HISTFILE=3D%s" (tramp-shell-quote-argument tramp-histfile-override)) (if tramp-histfile-override ! "HISTFILE=3D'' HISTSIZE=3D0" "")) (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) *************** *** 4885,4891 **** (if tramp-histfile-override (progn (setenv "HISTFILE") - (setenv "HISTFILESIZE" "0") (setenv "HISTSIZE" "0")))) (setenv "PROMPT_COMMAND") (setenv "PS1" tramp-initial-end-of-output) --- 4884,4889 ---- --8<---------------cut here---------------end--------------->8---