From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28993 invoked from network); 18 Jan 1998 17:54:59 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Jan 1998 17:54:59 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA21761; Sun, 18 Jan 1998 12:37:33 -0500 (EST) Resent-Date: Sun, 18 Jan 1998 12:37:33 -0500 (EST) From: "Bart Schaefer" Message-Id: <980118093836.ZM5175@candle.brasslantern.com> Date: Sun, 18 Jan 1998 09:38:36 -0800 In-Reply-To: <19980118151413.39927@woland> Comments: In reply to Anthony Heading "Re: zsh-3.1.2-zefram3" (Jan 18, 3:14pm) References: <199801121127.LAA02981@diamond.tao.co.uk> <19980118151413.39927@woland> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Anthony Heading , Andrew Main , zsh-workers@math.gatech.edu Subject: Re: zsh-3.1.2-zefram3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"NYktQ2.0.vJ5.StZmq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3728 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jan 18, 3:14pm, Anthony Heading wrote: } Subject: Re: zsh-3.1.2-zefram3 } } On Mon, Jan 12, 1998 at 11:27:05AM +0000, Andrew Main wrote: } > I'd particularly like to discuss the recent ZLE-related feature patches: } > [...] } > N 3554 ajrh allow vared to succeed on EOF } > This can be done by temporarily rebinding ^D to accept-line, or } > to a user-defined widget that conditionally calls accept-line. This is true, but seems clumsy especially because the EOF char is normally overloaded as delete-char-or-list. You'd be forced to write a user-defined widget that implemented `delete-char-or-list-or-eof' to make it work right. On the other hand, I don't believe that vared *should* behave the way that typing text into `cat` would. Vared is not a streaming editor; I expect it to behave like an editor that controls my terminal, not like a process blindly reading from standard input. } PREMISE: } I would aver that the EOF char acting as accept-line is a natural } default (viz my original desire to emulate the RCS check-in input). I would aver that there shouldn't *be* any recognized EOF char in vared, just as there is no EOF in vi or emacs. That is, as best I can tell, the current behavior. } PRIMARY HANDLING OF EOF: } In zleread() } } - if (!ll && isfirstln && c == eofchar) { } + if (c == eofchar && cs == ll && cs == findbol()) { } eofsent = 1; } break; } } } } I think that this is an improvement. How exactly does this change the behavior, again? EOF on any empty line is EOF, even in a multiline edit? Yes, I object to that. I want EOF to be EOF when typed on an empty line at a PS1 prompt, and nowhere else. } I think the condition has been } changed at least once already in the past year, but nobody discussed } it and nobody complained, so preservation of the status-quo may have } been demonstrated de-facto not to be an overriding imperative. The condition changed from 3.0.2 to 3.0.3, adding the "&& isfirstln". That was sometime before 27 June 1997. I don't know exactly what that accomplished. } VARED HANDLING OF -c: } } Perhaps Zefram missed the fact that the patch retained the -c flag as } a null op? The balance as always is cost (incompatibility) against } benefit (here simplicity). I still suspect that the incompatibilty } is minimal: that no-one relies on that error condition in scripts. Scripts are not the only case to consider; I dislike having my interactive habits disrupted, too. In this case, this wouldn't bother *me*, but .... } VARED HANDLING OF EOF: } } If you like, we could swap the sense of the -e flag and keep the } current behaviour as the default. That would be preferable. } USE OF ZLE WIDGETS: } } This is probably the point where I become unhinged. At least in the } environment where I work, flexibility in user-space configuration is } absolutely no substitute for a satisfactory default. I agree completely. } Nu chto zh. What? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com