From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10727 invoked by alias); 12 Aug 2015 03:14:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36121 Received: (qmail 15590 invoked from network); 12 Aug 2015 03:13:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Dhxlr5m8/kI1mNYfzS94Ld4xACFrz/RLQY4c2N3dRM4=; b=DpGacBH+V3CW4SyAJU6i0N35EqQzUD46Mb01GrE2tO0RaS8T269oIr/9PBP6kD0yP3 rUyqZ/5Urpa+YvQUG36PTIJH7XT4yHNX4EiIEQ99l9FoZA3zgV3MNLR0Yo87oI22zueX MhZaHAla6NlFwbGJSsUJ2NAEY/UjtzwFCYvYiVQynZG5ktPXp36ouvqM8C0CEJInGMQn wk2OXfIV1/l35+NOXD/e8TLAyi2Zk0Zp44CVL5wvVNHhZx4tjKf4PhrSt7g/7Uk98ikw vO2mpHYZXWdDGKQU9a5n5RAz+aOqTGj8AhjuQ8C8adhauofQfRtodR9MgeQsprND88mj KIEQ== MIME-Version: 1.0 X-Received: by 10.107.138.216 with SMTP id c85mr31004887ioj.187.1439349237578; Tue, 11 Aug 2015 20:13:57 -0700 (PDT) In-Reply-To: <150811195238.ZM31664@torch.brasslantern.com> References: <20150811220922.GF1859@tarsus.local2> <150811195238.ZM31664@torch.brasslantern.com> Date: Wed, 12 Aug 2015 05:13:57 +0200 Message-ID: Subject: Re: [PATCH] bracketed-paste: change quoting style From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Wed, Aug 12, 2015 at 4:52 AM, Bart Schaefer 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