zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: bracketed paste - chopping trailing newlines
Date: Thu, 10 Sep 2015 19:11:43 +0000	[thread overview]
Message-ID: <20150910191143.GG10129@tarsus.local2> (raw)
In-Reply-To: <13644.1441708777@thecus.kiddle.eu>

Oliver Kiddle wrote on Tue, Sep 08, 2015 at 12:39:37 +0200:
> Bart wrote:
> > OK, so who is a normal user who doesn't follow this list?  A zsh user from
> > past versions who expects the paste to run magic-space and accept-line?
> > That clearly isn't what you mean, but I'd like to de-confuse them too.
> 
> Not getting magic-space in the middle of a paste is fairly apparent. The
> same for intervening accept-lines because the prompt is not reprinted
> for each line. So in these cases a user expecting old behaviour would
> see that there has been a change and hopefully be pleasantly surprised
> rather than confused. A trailing newline is not so apparent. It seems
> like I'm just repeating myself on the rationale for the blank stripping;
> wasn't the case made adequately back in 35794?

Yes, I also feel I'm repeating myself.  I've already made my case a few
times.  I've also suggested fixes and implemented them.  I have been
trying to reach consensus, but so far haven't succeeded.  As you can
imagine, by now I'm rather frustrated.

Looking back over the threads, my RFE consisted of three parts:

1. Don't strip newlines at paste
2. Highlight pastes
3. Strip newlines at accept-line that immediately follows a paste

I think no one actually objected to (1), so I'll push it after the 5.1.1
tag, so we have the entire 5.1.2 release cycle to make tweaks.

I think all objections to (2) have been addressed, apart from the
question of whether to use standout or underline.  I think standout is
easier to spot and doesn't clash with zle_highlight[region]'s default
(because the user knows whether she just pasted or not), but I wouldn't
mind underline being the default, if that'll get us out of the impasse.

As to (3), I don't feel strongly about it.  If people don't want it in
the core, I'll just effect it in my dotfiles (as in 36429).

So, to summarize: I'll push the 0001 and 0002 patches from 36443 after
the 5.1.1 tag, and if we want to later change it to underline, we can.

I hope this thread will end soon :-)

Cheers,

Daniel

> I'm all in favour of alternatives to the blank removal that address the
> original issue. Simply waiting until user expectations have adapted and
> is one alternative. Blank removal in accept-line is a quite separate
> notion.
> 
> Daniel Shahaf wrote:
> > 3. Avoid saving trailing newlines into history.
> 
> I'm no more keen on accept-line altering text before it goes into
> history than on bracketed-paste altering pasted text.
> 
> Oliver


  parent reply	other threads:[~2015-09-10 19:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29  1:24 Carsten Hey
2015-08-29  5:00 ` Bart Schaefer
2015-08-30 20:25   ` Carsten Hey
2015-08-30 20:32     ` [patch] 5.0.9 vs 5.1 in source code comments (was: bracketed paste - chopping trailing newlines) Axel Beckert
2015-08-30 20:37     ` bracketed paste - chopping trailing newlines Axel Beckert
2015-08-31  5:47     ` Daniel Shahaf
2015-09-01 23:44       ` Bart Schaefer
2015-09-02 15:41         ` Daniel Shahaf
2015-09-01 23:48     ` Bart Schaefer
2015-09-03 23:59       ` Carsten Hey
2015-09-06  9:52         ` Daniel Shahaf
2015-09-06 13:51           ` Oliver Kiddle
2015-09-06 14:21             ` Bart Schaefer
2015-09-08 10:39               ` Oliver Kiddle
2015-09-10 14:45                 ` Bart Schaefer
2015-09-10 19:11                 ` Daniel Shahaf [this message]
2015-09-11 23:07                   ` Bart Schaefer
2015-09-12  0:17                     ` Mikael Magnusson
2015-09-12 15:58                       ` Bart Schaefer
2015-09-14 20:35                     ` Daniel Shahaf
2015-09-14 21:21                       ` Bart Schaefer
2015-09-07  2:11             ` Daniel Shahaf
2015-09-08 23:33             ` Carsten Hey
2015-09-08 23:48               ` Carsten Hey
2015-09-10  8:24                 ` Peter Stephenson
2015-09-07 21:13           ` Daniel Shahaf

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=20150910191143.GG10129@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /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).