From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: Shift-Insert overwrites ZLE CUTBUFFER
Date: Thu, 17 Nov 2016 17:53:55 +0100 [thread overview]
Message-ID: <92342.1479401635@hydra.kiddle.eu> (raw)
In-Reply-To: <161115140723.ZM11274@torch.brasslantern.com>
On 10 Nov, Bart wrote:
> emacs. So yes, emacs does have a whole suite of register operations,
> none of which are present in zsh (which in fairness was based on a
Would it be useful to add some of those operations given that it
might share much of the existing code that's there for vi (given a
few compromises)?
Coming back to the original point of this thread, would it make
sense to instead put the bracketed-paste text in a register? (g)Vim's
nearest equivalents are "* for the X selection, "+ for secondary
selection and "~ which allows drag and drop. I wonder that if we
want "*, it'd be better handled by allowing external commands like
xclip, xsel or pbcopy to be hooked in. Maybe "~ then? Emacs allows
basically any character to be used for a register which wouldn't
really allow for any special ones unless we ignore that.
With the paste in a register, we might want at least the emacs
insert-register widget along with copy-to-register. Frustratingly,
emacs' insert-register leaves the cursor to the left of the inserted
text making it less suitable as i_Ctrl-R in vim.
Both emacs and vi use the registers for storing macros. I don't
really miss macros in zsh (and have bound q to something else) but
bash has them. Storing a POINT is analagous to a vi mark. In zsh,
I find vi marks are mostly useful for bookmarking history lines and
it'd seem reasonable to offer that for emacs mode too. marks are
stored separately from buffers but I'm not sure that the separate
namespace would really matter.
> change them. As a thought, could use the terms "killring buffer" for
> 1-9 and "register buffer" for a-z, when updating documentation.
I quite like that. Would mean that anyone searching for either register
or buffer would find what they're looking for.
> (Although it's possible to expand the killring to more than 9 elements
> by assigning directly to the variable.)
> Aside: If the numbered registers duplicate $killring, how is it there
> are 9 numbered registers but the killring defaults to only 8 elements?
Actually it seems the numbered vi buffers are quite separate from the
killring and there are slightly different rules about what goes into
them. So I should probably put the numbered registers in the registers
special parameter after all.
> The parameters are created before the function for any user-defined
> widget is called, but are defined as being local to the scope of the
That makes sense. Thanks
Oliver
next prev parent reply other threads:[~2016-11-17 17:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMtVo_PG_fd62V1FZ4r7fRUragzzS6H4McN5sO1=hhY=6DR6Yg@mail.gmail.com>
[not found] ` <161025091249.ZM7232@torch.brasslantern.com>
[not found] ` <CAMtVo_N6qOQr++Amzn11+m3pkOxjc908mwFUerur77+OWd92uw@mail.gmail.com>
[not found] ` <161026090133.ZM11120@torch.brasslantern.com>
[not found] ` <CAMtVo_P09j6fyJytA21iu_qOom6bCTvJEWn-dXTBX97Bp00Sdg@mail.gmail.com>
[not found] ` <161026165138.ZM12130@torch.brasslantern.com>
[not found] ` <87h97x36sa.fsf@lwm.klanderman.net>
[not found] ` <161027133523.ZM15655@torch.brasslantern.com>
[not found] ` <43312.1477929414@hydra.kiddle.eu>
[not found] ` <CGME20161031160350epcas3p4849616fbcc05783a9966320a28ed731c@epcas3p4.samsung.com>
[not found] ` <20161031161605.23af1751@pwslap01u.europe.root.pri>
2016-11-09 17:27 ` Bart Schaefer
2016-11-10 16:21 ` Oliver Kiddle
2016-11-10 17:17 ` Bart Schaefer
2016-11-15 21:41 ` Oliver Kiddle
2016-11-15 22:07 ` Bart Schaefer
2016-11-17 16:53 ` Oliver Kiddle [this message]
2016-11-18 3:16 ` Bart Schaefer
2016-11-20 22:32 ` Oliver Kiddle
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=92342.1479401635@hydra.kiddle.eu \
--to=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).