From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27895 invoked from network); 19 Sep 2003 17:02:44 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Sep 2003 17:02:44 -0000 Received: (qmail 1394 invoked by alias); 19 Sep 2003 17:02:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19103 Received: (qmail 1382 invoked from network); 19 Sep 2003 17:02:29 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Sep 2003 17:02:29 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [66.111.4.26] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Sep 2003 17:2:28 -0000 Received: from smtp.us2.messagingengine.com (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 001441EE7CB; Fri, 19 Sep 2003 13:02:22 -0400 (EDT) Received: from 10.202.2.133 ([10.202.2.133] helo=smtp.us2.messagingengine.com) by messagingengine.com with SMTP; Fri, 19 Sep 2003 13:02:23 -0400 Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id 145F5757CF; Fri, 19 Sep 2003 13:02:25 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Dwight Shih" To: zsh-workers@sunsite.dk Date: Fri, 19 Sep 2003 12:02:25 -0500 X-Epoch: 1063990943 X-Sasl-enc: fV7ltlrVzKf/eJmr6EkTgg Cc: "Peter Stephenson" Subject: Re: Bang completion kills zsh in emacs process buffer References: <1008.1063988303@csr.com> In-Reply-To: <1008.1063988303@csr.com> Message-Id: <20030919170225.145F5757CF@smtp.us2.messagingengine.com> Peter, zsh thinks that it's an interactive shell because emacs invokes it with the -i option. Dwight On Fri, 19 Sep 2003 17:18:23 +0100, "Peter Stephenson" said: > "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. > ********************************************************************** > >