zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: [PATCH] bracketed-paste: change quoting style
Date: Wed, 12 Aug 2015 05:13:57 +0200	[thread overview]
Message-ID: <CAHYJk3RGk_S8sZAsW9qqLt=fyRRzOCDjk4imE0ZPDyOBLEB9xA@mail.gmail.com> (raw)
In-Reply-To: <150811195238.ZM31664@torch.brasslantern.com>

On Wed, Aug 12, 2015 at 4:52 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Aug 12,  3:08am, Mikael Magnusson wrote:
> }
> } On a related note, someone on irc was confused about why
> } url-quote-magic stopped working in git, and it's of course because
> } bracketed pasting causes its self-insert hook to never run.
>
> Hrm.  I'm tempted simply to suggest that bracketed-paste should get
> out of the way if there are no newlines in the pasted text, but
> there may be other bindings that shouldn't run.

It's also nice for avoiding various other problems, like tabs.

I feel like the widget is already getting quite DWIMmy, and what "we"
mean might not be what everyone else means. (I'm not even convinced we
all want the things it's already doing).

I would also argue that intentionally putting text in the paste buffer
to invoke widgets by pasting it is somewhat perverse, and if you want
to do it, you get to change the default configuration to do it. It
shouldn't depend on something mostly orthogonal like if there is a
newline.

I thought earlier we may even want to add a
bracketed-paste-raw/simple/literal function that just does what
bracketed-paste does in the case of being passed a parameter, but also
inserts it on the command line for you, and nothing more. It gives you
an easier knob to disable the DWIM stuff than having to write a custom
widget.

> On a different somewhat related note, bracketedpaste() lacks the tests
> for invalid multibyte characters that selfinsert() performs.
>
> } We may want to provide an alternative function to help with this case.
> } (eg, wrap bracketed-paste and quote if == http* or so.)
>
> This gets ugly if the URLs are somewhere in the middle of the pasted
> text.

Well, it's probably only worth handling if the url is the only word.

-- 
Mikael Magnusson


  reply	other threads:[~2015-08-12  3:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 22:09 Daniel Shahaf
2015-08-12  1:08 ` Mikael Magnusson
2015-08-12  2:52   ` Bart Schaefer
2015-08-12  3:13     ` Mikael Magnusson [this message]
2015-08-12  6:44       ` Bart Schaefer
2015-08-13 14:49 ` Oliver Kiddle
2015-08-13 16:20   ` Bart Schaefer
2015-08-13 23:19     ` Daniel Shahaf
2015-08-13 23:57       ` Bart Schaefer
2015-08-17 21:59         ` 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='CAHYJk3RGk_S8sZAsW9qqLt=fyRRzOCDjk4imE0ZPDyOBLEB9xA@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --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).