From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24234 invoked from network); 19 Sep 2003 16:19:12 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Sep 2003 16:19:12 -0000 Received: (qmail 19738 invoked by alias); 19 Sep 2003 16:19:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19102 Received: (qmail 19729 invoked from network); 19 Sep 2003 16:19:04 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Sep 2003 16:19:04 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Sep 2003 16:19:4 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.cambridgesiliconradio.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Fri, 19 Sep 2003 17:17:14 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 19 Sep 2003 17:20:40 +0100 To: zsh-workers@sunsite.dk Subject: Re: Bang completion kills zsh in emacs process buffer In-reply-to: ""Dwight Shih""'s message of "Fri, 19 Sep 2003 10:38:19 CDT." <20030919153819.57F1878F31@smtp.us2.messagingengine.com> Date: Fri, 19 Sep 2003 17:18:23 +0100 Message-ID: <1008.1063988303@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 19 Sep 2003 16:20:40.0152 (UTC) FILETIME=[F772AD80:01C37EC9] "Dwight Shih" wrote: > To reproduce: > start emacs > M-x shell > $ pwd > $ echo !$ #zsh will now die > > In the debugger, zsh dies at hist.c:1092 trying to do a zputs(prt,shout) > because the file pointer shout is null. The confusion comes because somehow zsh thinks it's non-interactive but is still using history --- which is basically what you said. It surprises me a bit that it's trying to use bang-history at all in this case. It's usually turned off non-interactively. Ideally we need to track down why it's doing that. I can't seem to reproduce it --- partly because shell mode is stealing my !'s for some purpose of its own I can only guess at, which indicates some of the reasons I never use Emacs shell mode. It might help to see the options it has set; the options related to interactive or non-interactive operations are interactive, shinstdin and monitor. This is the code in hbegin which I think should be stopping it using history for non-interactive shells: else if (dohist != 2) stophist = (!interact || unset(SHINSTDIN)) ? 2 : 0; (interact is a definition for isset(INTERACTIVE); it would be much clearer and hardly longers to use the latter throughout. Possibly it used to mean something else.) So stophist should be 2 in this case (we should use enums for this sort of flag but this code goes back to the dawn of time). If you feel inclined to track this down (which would be much appreciated), finding out if stophist is getting set to 2, and if it is why we are doing bang-history anyway, would be a good path to take. Testing for shout != NULL in hist.c is an entirely benign workaround if no-one is able to find out why it's using history at all, but I don't think it's the root of the problem. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************