zsh-workers
 help / color / mirror / code / Atom feed
From: Anthony Heading <ajrh@woland.demon.co.uk>
To: Andrew Main <zefram@tao.co.uk>
Cc: zsh-workers@math.gatech.edu
Subject: Re: zsh-3.1.2-zefram3
Date: Sun, 18 Jan 1998 15:14:13 +0000	[thread overview]
Message-ID: <19980118151413.39927@woland> (raw)
In-Reply-To: <199801121127.LAA02981@diamond.tao.co.uk>; from Andrew Main on Mon, Jan 12, 1998 at 11:27:05AM +0000

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.
> 	(See Functions/zed for an example of how to temporarily change
> 	bindings.)  Also, while I agree that vared -c is not much
> 	use, removing the option entirely will cause problems with
> 	some scripts.  Changing the default EOF behavior would cause
> 	similar problems.  While I would like the whole area of EOF
> 	handling in ZLE to be re-examined, this patch does not do a
> 	proper job of that.

Hmmm.  I'm not sure I understand quite what this means in practice.
Can we break it down?

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).

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.  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.

Does anyone find this problematic?  It's not difficult to make it
conditional on a vared flag, but Occam's razor advises not playing
silly buggers unless you need to.

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.
But others may know better.  Not important - it was just a cleanup.

VARED HANDLING OF EOF:

If you like, we could swap the sense of the -e flag and keep the
current behaviour as the default.  

RE-EXAMINATION OF WHOLE OF ZLE EOF HANDLING:

I'd agree completely that this patch doesn't make a proper job of
anything like that.  I'm not sure what all the issues are.  It was
simply intended as a small step in the right direction

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.  And in the area
of multi-line zsh editing, zsh has a little tweaking still to do
before that default is reasonable.


Nu chto zh.  Zefram: I think the only necessarily incompatible change
is the tweak to zleread().  Is that objectionable?  All the others
can be reworked to preserve the current behaviour as default, if that
what you think is appropriate.  If the problem is more that you don't
want to see eof handling touched until it's radically overhauled, I
think you'll need to clarify what needs done.

Anthony


  parent reply	other threads:[~1998-01-18 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-12 11:27 zsh-3.1.2-zefram3 Andrew Main
1998-01-13  9:29 ` zsh-3.1.2-zefram3 on Solaris Andrei Tcherepanov
1998-01-13 11:46   ` Andrew Main
1998-01-18 15:14 ` Anthony Heading [this message]
1998-01-18 17:38   ` zsh-3.1.2-zefram3 Bart Schaefer
1998-01-19  8:58     ` zsh-3.1.2-zefram3 Peter Stephenson
1998-01-21 18:37     ` zsh-3.1.2-zefram3 Anthony Heading
1998-01-13 11:44 zsh-3.1.2-zefram3 Bruce Stephens
1998-01-13 12:19 ` zsh-3.1.2-zefram3 Andrew Main
1998-01-13 12:49   ` zsh-3.1.2-zefram3 Bruce Stephens
1998-01-13 13:36   ` zsh-3.1.2-zefram3 Peter Stephenson
1998-01-13 15:04     ` zsh-3.1.2-zefram3 Bruce Stephens
1998-01-13 11:56 zsh-3.1.2-zefram3 Sven Wischnowsky
1998-01-13 11:59 zsh-3.1.2-zefram3 Bruce Stephens
1998-01-13 12:24 ` zsh-3.1.2-zefram3 Andrew Main
1998-01-13 12:44   ` zsh-3.1.2-zefram3 Bruce Stephens
1998-01-20  0:46 zsh-3.1.2-zefram3 Gene Cohler

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=19980118151413.39927@woland \
    --to=ajrh@woland.demon.co.uk \
    --cc=zefram@tao.co.uk \
    --cc=zsh-workers@math.gatech.edu \
    /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).