From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: Feature freeze and Tramp? Date: Wed, 12 May 2004 09:32:48 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8765b2ksm7.fsf@emptyhost.emptydomain.de> References: <87zn8qlleb.fsf@emptyhost.emptydomain.de> <87d65gj5j2.fsf@emptyhost.emptydomain.de> <200405080234.i482YKE24109@raven.dms.auburn.edu> <87wu3n4380.fsf@emptyhost.emptydomain.de> <200405090140.i491eTW28920@raven.dms.auburn.edu> <87n04gzb7h.fsf@emptyhost.emptydomain.de> <200405110249.i4B2nND22278@raven.dms.auburn.edu> <87sme7o2zu.fsf@emptyhost.emptydomain.de> <200405120102.i4C127e12749@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1084347878 18713 80.91.224.253 (12 May 2004 07:44:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 May 2004 07:44:38 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 12 09:44:30 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNoPm-0006Eu-00 for ; Wed, 12 May 2004 09:44:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNoPm-0000RO-00 for ; Wed, 12 May 2004 09:44:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNoKx-0002Qk-9M for emacs-devel@quimby.gnus.org; Wed, 12 May 2004 03:39:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNoKI-0002Ps-Eq for emacs-devel@gnu.org; Wed, 12 May 2004 03:38:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNoGr-0001X7-Fv for emacs-devel@gnu.org; Wed, 12 May 2004 03:35:59 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNoED-0000mW-Bz for emacs-devel@gnu.org; Wed, 12 May 2004 03:32:33 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BNoEC-0004uw-00 for ; Wed, 12 May 2004 09:32:32 +0200 Original-Received: from 213-203-244-156.kunde.vdserver.de ([213.203.244.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 May 2004 09:32:32 +0200 Original-Received: from kai by 213-203-244-156.kunde.vdserver.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 May 2004 09:32:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 70 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:l+ifPwgDzpP1muXNnviHAnwD/No= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23218 Luc Teirlinck writes: > Kai Grossjohann wrote: > > Cool! Thanks for the fix, will incorporate this into Tramp shortly. > > That leaves us with the issue of those three remaining lines which are > still somewhat of a nuisance. They can be completely gotten rid of by > setting tramp-initial-commands to > > ("unset HISTFILE" "unset correct" "unset autocorrect") > > where the order is, of course, important. In other words "unset > HISTFILE" is pushed onto the default value. I have added this. It should be harmless at worst, and useful in many cases. > ("HISTFILE=" "export HISTFILE" "unset correct" "unset autocorrect") > > would, I believe, make the > > "HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE" > > unnecessary, but I am afraid that some shells might not recognize "export". > However, was there any reason to use "HISTFILE=$HOME/.tramp_history; > HISTSIZE=1;" instead of simply using "HISTFILE= ; export HISTFILE" at the > same spot? The initial commands are sent to the login shell, which might be a csh, and a csh doesn't grok export. Therefore, putting export into the initial commands doesn't seem to be right. Bash isn't the only shell grokking HISTFILE and/or HISTSIZE; I think the above construction was made to work with bash and ksh. I'd have to dig it up in the Tramp mailing list archives to find out which shells have been tested. In general, it is difficult to keep track of which shell is active at any one moment, and which commands might cause problems. For instance, I used to have "unset foo >/dev/null; blah", only to find out that some shells fail to execute blah if output from the builtin is redirected... Regarding HISTFILE/HISTSIZE, I could find the following ChangeLog entry: 2001-01-10 Kai Großjohann * tramp.el (tramp-open-connection-setup-interactive-shell): `unset HISTFILE' rather than `set -o history' to turn off the history. Pete Forman says this works on bash1 and bash2, but not for ksh or a Posix sh. He also says there's no way to turn history off for ksh and Posix shells, except by invoking non-interactively. I won't do that, though, because I need the prompts. HISTSIZE isn't mentioned at all, though. Hm. Ah, another entry: 2001-04-13 Kai Großjohann * tramp.el (tramp-open-connection-setup-interactive-shell): Posix shells don't allow you to turn off the history, so we redirect it to an innocuous file and limits that file's size as much as possible. (tramp-find-executable): Be extra careful when searching for executables, include sentinel string to search for. Does this help? Kai