From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5749 invoked from network); 3 Sep 2004 09:38:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Sep 2004 09:38:46 -0000 Received: (qmail 86171 invoked from network); 3 Sep 2004 09:38:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Sep 2004 09:38:41 -0000 Received: (qmail 3928 invoked by alias); 3 Sep 2004 09:38:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20309 Received: (qmail 3918 invoked from network); 3 Sep 2004 09:38:27 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Sep 2004 09:38:27 -0000 Received: (qmail 85453 invoked from network); 3 Sep 2004 09:37:28 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 3 Sep 2004 09:37:28 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i839bPv28901 for ; Fri, 3 Sep 2004 09:37:26 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 3 Sep 2004 10:36:32 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 3 Sep 2004 10:38:08 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id i839bK9J018975 for ; Fri, 3 Sep 2004 10:37:20 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id i839bJxR018972 for ; Fri, 3 Sep 2004 10:37:20 +0100 Message-Id: <200409030937.i839bJxR018972@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: zsh exits after delete-char-or-list and two ^Cs In-reply-to: References: <200409020919.i829J0eC012233@news01.csr.com> Date: Fri, 03 Sep 2004 10:37:19 +0100 From: Peter Stephenson X-OriginalArrivalTime: 03 Sep 2004 09:38:08.0345 (UTC) FILETIME=[B86DE490:01C49199] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 (Oliver says the In-reply-to and References format should work better like this. Tell me if it doesn't.) Bart Schaefer wrote: > On Thu, 2 Sep 2004, Peter Stephenson wrote: > > > It looks like it would be more sensible to have the test for whether a > > zle widget is callable separate from the return status for zle -I. > > What about zle -R ? > > I think (but haven't applied it yet) that with this patch we have > > zle && echo "widgets callable" # I'm least certain of this > zle -I && echo "Display invalidated and widgets callable" > zle -R && echo "Display refreshed and zle active" > > Is that right? Yes, noting that testing for `display invalidated' and `display refreshed' doesn't form part of the return status (I think that's what you mean but it's not clear from the output). > This covers all bases, assuming it's harmless to call zle -R even when you > don't really care whether the display is refreshed. Unless one might need > to know that the display has been invalidated even when widgets are not > callable? I'm having a hard time coming up with that. I agree, it's just a question of how much of a stickler you are for having the return status reflecting `command did what I expected' rather than `command did something and tested for something else'. Unless someone is using ERR_RETURN inside widgets (yuk!) I don't suppose this is a problem. > Sorry to nit-pick, but: > > > Index: Doc/Zsh/zle.yo > > =================================================================== > > +The returned status is zero if a zle widget can be called immediately. > > +Note this is independent of whether the display has been invalidated. > > +For example, if a completion widget is active a zle widget cannot be used > > +and the status is one even if the display was invalidated; on the other > > +hand, the status may be zero if the display was invalidated by a previous > > +call to `tt(zle -I)'. > > Isn't it more accurate to say "the status may be nonzero even if the > display was invalidated by a previous call"? With the rest of the patch > as it stands, the status is never zero when completion widgets are active, > even when the display was previously invalidated -- but the above seems to > imply that the status might be zero in that event. Ah, I think I see: you're reading the two cases around the semicolon in conjunction, while I meant them to be independent. However, your emendation doesn't get across quite the point I wanted, which is "if you call zle -I and it returns zero, it may be that the display was invalidated by a previous call rather than the current one". Maybe reversing the sense of the second case is better. You might well say "who cares", but I want to emphasis calling zle -I multiple times has no bad effect. Maybe the English for that is "calling zle -I multiple times has no bad effects". -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************