zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Shift-Insert overwrites ZLE CUTBUFFER
Date: Thu, 10 Nov 2016 09:17:36 -0800	[thread overview]
Message-ID: <161110091736.ZM20932@torch.brasslantern.com> (raw)
In-Reply-To: <4446.1478794906@hydra.kiddle.eu>

On Nov 10,  5:21pm, Oliver Kiddle wrote:
}
} Does emacs perhaps have anything analagous to the vi buffers? (It
} appears to be a vim thing to call them registers as I've been doing).

IIRC vi called them buffers and vim borrowed the term register from
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
much older version of emacs and for obvious reasons hasn't attempted
to track anything but the most straightforward editing operations).

You can of course use zsh's vi buffer operations as a simple subset
of emacs register commands.  As with vi, emacs registers are named
by a single character.  There are some special-case operations for
treating registers as values for POINT (zsh CURSOR) and incrementing
or decrementing numbers stored in registers, etc.

A useful addition to zsh/zleparameter would be a special hash of
register-to-content mappings (emacs calls this register-alist).

} Would there be any sense in putting it in the kill ring but not in
} the CUTBUFFER so yank-pop is needed to grab it.

That'd be a little strange in that it changes the order of the kill
ring with respect to the two most recent kills.  It also makes it a
bit more confusing for a user-definded widget to access the content
of the last paste if for some reason it was wanted, but not much.

E.g.

    if [[ $LASTWIDGET == *bracketed-paste ]]
    then
	# Used to be in $CUTBUFFER but now
	local pasted_text=$killring[1]
	# ...
    fi


  reply	other threads:[~2016-11-10 17:25 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 [this message]
2016-11-15 21:41                           ` Oliver Kiddle
2016-11-15 22:07                             ` Bart Schaefer
2016-11-17 16:53                               ` Oliver Kiddle
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=161110091736.ZM20932@torch.brasslantern.com \
    --to=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).