From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6745 invoked by alias); 14 Sep 2015 21:21:48 -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: 36534 Received: (qmail 13512 invoked from network); 14 Sep 2015 21:21:47 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=uVT5Bb3GcKWGP8WsxNd+eznrE/K0gXJuAVx26X/Tw4A=; b=RT3tUATmJu7EF7iTXrTxqT3lyzNhy5dVmrlARMPm3Tg4sE8XSSQ3LYHBavQ0Ir1qBc mLGhbPNBpWH4oO3cd1JhrwowNErQ7dXZWxlOj+zsgSMcXpXsxzFyADJQFuhiFq0kVwg5 rehyjYpChmCWD/oq0uAqLCfRDeVAHcEXMKcHkbWQGwqcoM8jgxfWiN/ID5sYgDvPFkk/ Zhrve/o0/nXSZzp4XsHhlL1NkHlTgBgyT9cm3Jxqk+SNvzlAPruVsxMek9FxtW3vP40w tTYxyzuAFLyK1DllJIvLLKYpBq/wuZCyMuafnlWFL+LdaZIOtfosSLCoR2vjzK+99aZN WMBQ== X-Gm-Message-State: ALoCoQmQdnFqp8/yZgCS1UCEkehd3z29Bkz4oVNWhCCCNrxFhmrgr3kV9dEPjl0Fg/0tAI2QqL/M X-Received: by 10.182.43.226 with SMTP id z2mr5755578obl.32.1442265704661; Mon, 14 Sep 2015 14:21:44 -0700 (PDT) From: Bart Schaefer Message-Id: <150914142142.ZM26109@torch.brasslantern.com> Date: Mon, 14 Sep 2015 14:21:42 -0700 In-Reply-To: <20150914203527.GC2683@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: bracketed paste - chopping trailing newlines" (Sep 14, 8:35pm) References: <150828220057.ZM14497@torch.brasslantern.com> <20150830202530.GF30848@bosko.stateful.de> <150901164827.ZM2480@torch.brasslantern.com> <20150903235936.GH30848@bosko.stateful.de> <20150906095224.GD1895@tarsus.local2> <4397.1441547465@thecus.kiddle.eu> <13644.1441708777@thecus.kiddle.eu> <20150910191143.GG10129@tarsus.local2> <150911160702.ZM8647@torch.brasslantern.com> <20150914203527.GC2683@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: bracketed paste - chopping trailing newlines MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 14, 8:35pm, Daniel Shahaf wrote: } } As to interaction with the region: in my workflow, I sometimes do } , , . During that sequence, } even I happen to do a paste during the part, I wouldn't want } MARK to move to the start of the paste. I don't know should } default to moving MARK. Hm. This is down to whether pasting is an actual editor action, or just another form of user input. For example MARK and CURSOR are reset by the yank widget in exactly the circumstance you describe, and bracketed-paste is currently implemented mostly 'as if' the pasted text were cut into the kill ring and then yanked. Also, just as an aside, if the region is highlighted ("active") but a paste does NOT change the region, then how do you decide what ends up highlighted after the paste? And if the answer is "both", then how can the default paste highlight be the same as the default region highlight without being really confusing? We still seem to have three competing desires here, depending on who you ask: (1) Insert exactly what I pasted, as if it were a single keystroke, without further interpretation or change to the editor state. (2) Handle paste as an atomic editor command similar to yanking from an external buffer instead of from the kill ring (as currently). (3) Treat a paste like multiple keystrokes, so that url-quote-magic and other input-related rebindings apply, but don't execute any non-input bindings (accept-line, motions, yanks, kills, etc.) Obviously there can be some overlap, i.e., you might want it treated as multiple keystrokes but still without change to the editor state. Maybe we should have stuck with (1) in the C code and built out (2) in script code the way bracketed-paste-magic builds out (3). Or maybe e.g. $zle_bracketed_paste should have more fields to specify which bits of (2) should be performed.