zsh-workers
 help / color / mirror / code / Atom feed
From: "Dwight Shih" <d.shih@rightbox.com>
To: zsh-workers@sunsite.dk
Cc: "Peter Stephenson" <pws@csr.com>
Subject: Re: Bang completion kills zsh in emacs process buffer
Date: Fri, 19 Sep 2003 12:02:25 -0500	[thread overview]
Message-ID: <20030919170225.145F5757CF@smtp.us2.messagingengine.com> (raw)
In-Reply-To: <1008.1063988303@csr.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" <pws@csr.com>
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 <pws@csr.com>                  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.
> **********************************************************************
> 
> 


  reply	other threads:[~2003-09-19 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-19 15:38 Dwight Shih
2003-09-19 16:18 ` Peter Stephenson
2003-09-19 17:02   ` Dwight Shih [this message]
2003-09-19 17:19     ` Peter Stephenson
     [not found] <20030919175443.B24767835C@smtp.us2.messagingengine.com>
2003-09-19 18:19 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030919170225.145F5757CF@smtp.us2.messagingengine.com \
    --to=d.shih@rightbox.com \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).