emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: yank-secondary


From: Drew Adams
Subject: RE: yank-secondary
Date: Tue, 6 May 2008 23:27:38 -0700

> >> > * no prefix arg:    yank-secondary
> >> > * prefix arg >= 0:  primary-to-secondary
> >> > * prefix arg < 0:   secondary-to-primary
> >> 
> >> Why not just either yank and swap primary<->secondary?
> >> Also it can just be called secondary-dwim.
> 
> > I don't know what you're suggesting.
> 
> You know... "swap" aka "exchange", i.e. both primary-to-secondary and
> secondary-to-primary at the same time.

I don't see how that would make any sense. Did you read the rest of my message
or look at what the commands `primary-to-secondary' and `secondary-to-primary'
do?

Or are you proposing something entirely different from those commands, reacting
only to the names? If you mean to simply exchange the primary and secondary
selections, then I don't see how that would be useful. I can't imagine a use
case, whether the text with the secondary selection is in the current buffer or
(more generally) not. 

With such a swap, the cursor would always move to the end (or beginning) of the
secondary selection. That movement is precisely why I said that (my)
`secondary-to-primary' is much less useful than (my) `primary-to-secondary':
it's not too often that you want to move to where the secondary selection is.
(And when you do, I can't imagine why you would at the same time want to make
the previous region the new secondary.)

The only use case I see for such a movement (my `secondary-to-primary') is as
something akin to `C-x C-SPC' or `C-u C-SPC' or `C-x r j' or `C-x r b': to get
back to where the secondary was. More often, you just want to stay where you are
but pick up the region text as the new secondary selection also (my
`primary-to-secondary').

Could you please elaborate?

It's easy enough to try the commands I sent, and it's presumably easy enough to
define the command you have in mind. Why don't you try and then speak to the
use? These are not complicated definitions. It's a lot easier to follow a simple
Lisp definition than a vague 'y a qu'a.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]