Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: This widget implementation feels a bit clunky (edit-quoted-word)
- X-seq: zsh-workers 35549
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: This widget implementation feels a bit clunky (edit-quoted-word)
- Date: Sun, 21 Jun 2015 09:09:29 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- 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=lxCcPN1ZJVAKe6m6ZiwPVTttmoYrDG+Rw0dQEe/h+UM=; b=div6RBnSRxYPDXtMSlzH6mBITxo/iJmG6xOS/dxiZUAaoWCbm3t36TwR1grcdDfTMu EjPuZAS1a0Fh+H5VUlMai4F86lmQvoyc6tOtt91LBpOPh7330n4aLp/MXXjBV6Vc0nMK DRyDwO9C8OoKuaJ/vhJ7xxVtdfJtXabuAg3EY6FkYY4/jlqPZ1XSdhnT6Xyt1tsREpIx TuFoGUaRDmX36hf35OvpOEj2ueI2VVIMFlIIjoxgnnepIIcalMMA0pAYcyML5v44ogw1 9A4xwK6ANx9biKwg84y9/QNL3e0i8fO+lFWj8ogpf3a0hM/zgRDsYuCtjQmGSiE/ieVF GnDw==
- In-reply-to: <20150620180659.735a6cc6@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3RYUhLuQEvGWLF5sdAK-g=MpiJwV0x-UrfQ35e3r4dHAg@mail.gmail.com> <20150620180659.735a6cc6@ntlworld.com>
On Sat, Jun 20, 2015 at 7:06 PM, Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Sat, 20 Jun 2015 11:16:20 +0200
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> I feel like it's unnecessarily hard to get the resulting text from a
>> narrow-to-region session.
>
> Would you want something like this?
That does look very promising, yeah. :)
I suppose I should volunteer for writing the doc patch for this.
On Sat, Jun 20, 2015 at 7:21 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jun 20, 11:16am, Mikael Magnusson wrote:
> }
> } I feel like it's unnecessarily hard to get the resulting text from a
> } narrow-to-region session.
>
> Hmm. If you used "narrow-to-region -S state ..." then I think the
> resulting text would be $BUFFER between the exit from recursive-edit
> and the call to "narrow-to-region -R state" ?
>
> Except that I'm having a little trouble with -S / -R. The value of
> $MARK never seems to be correctly restored. Is it supposed to be?
I'll admit I didn't actually look at the impl of the widget, only the
documentation.
> } It would be nice if quote-region let you specify the type of quoting.
> } Urk?
>
> The difficulty there is that it's a widget so there's no direct way to
> pass the type of quote. I suppose you could use $NUMERIC.
I thought widgets can take an arbitrary amount of arguments, although
it is true that almost none do. The newly added bracketed-paste takes
an argument that names the parameter to store pasted text in for
example. If you mean that you can't do it directly via bindkey then
yeah, that's true, you'd still need a wrapper widget. For my use-case
I could put the argument right in with the zle call though. (But with
PWS' suggested change, I can just insert (q-)LBUFFER/RBUFFER directly,
I think).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author