GNU bug report logs - #25196
mention how to see top or middle of each yank-pop

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Tue, 13 Dec 2016 21:15:02 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25196 in the body.
You can then email your comments to 25196 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Tue, 13 Dec 2016 21:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Dec 2016 21:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: mention how to see top or middle of each yank-pop
Date: Wed, 14 Dec 2016 03:06:40 +0800
To the bottom of
"yank-pop is an interactive compiled Lisp function in ‘simple.el’.
It is bound to M-y." help text, please add:

yank-pop is nice except when the popped text takes up more than a screen.

In that case the only way to see what is at the top of the text is to
move the cursor thus breaking the yank-pop sequence.

In such cases one might more or less salvage some text by looking directly for it in
the 'kill-ring', although it is in a different format than the original...

---

Anyway the yank-pop docstring should at least mention 'kill-ring'.

Also in (info "(emacs) Earlier Kills") say how to see the top or middle
of each yank-pop without breaking the yank-pop sequence.

emacs-version "25.1.1"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sat, 27 Jul 2019 11:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 25196 <at> debbugs.gnu.org
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Sat, 27 Jul 2019 13:16:01 +0200
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> To the bottom of
> "yank-pop is an interactive compiled Lisp function in ‘simple.el’.
> It is bound to M-y." help text, please add:
>
> yank-pop is nice except when the popped text takes up more than a screen.
>
> In that case the only way to see what is at the top of the text is to
> move the cursor thus breaking the yank-pop sequence.
>
> In such cases one might more or less salvage some text by looking
> directly for it in
> the 'kill-ring', although it is in a different format than the original...

That doesn't really seem applicable for the doc string.

> Anyway the yank-pop docstring should at least mention 'kill-ring'.

I've now done so on the trunk.

> Also in (info "(emacs) Earlier Kills") say how to see the top or middle
> of each yank-pop without breaking the yank-pop sequence.

I don't think there is a way to do that?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 11:17:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 25196 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 11:17:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sat, 27 Jul 2019 22:26:02 GMT) Full text and rfc822 format available.

Message #15 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Sun, 28 Jul 2019 01:18:52 +0300
[Message part 1 (text/plain, inline)]
>> Also in (info "(emacs) Earlier Kills") say how to see the top or middle
>> of each yank-pop without breaking the yank-pop sequence.
>
> I don't think there is a way to do that?

FWIW, here is battle-tested (i.e. use for many years) command
that allows looking at the top or middle of each yank-pop before yanking:

[yank-from-kill-ring.el (application/emacs-lisp, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sun, 28 Jul 2019 00:31:01 GMT) Full text and rfc822 format available.

Message #18 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson
 <jidanni <at> jidanni.org>
Subject: RE: bug#25196: mention how to see top or middle of each yank-pop
Date: Sat, 27 Jul 2019 17:30:42 -0700 (PDT)
> FWIW, here is battle-tested (i.e. use for many years) command
> that allows looking at the top or middle of each yank-pop before
> yanking:

I like it, including the fact that you can:
(1) edit a kill before pasting it, and even
(2) enter any text you want, for pasting.
#2 means this is not just about yanking kills.  

But please, if vanilla Emacs does this, do _not_
bind it to `C-M-y'.

This is a possible ~replacement (by users) for
`yank-pop'.  Users can bind it to `M-y'.  Or
if it becomes more popular someday than
`yank-pop' Emacs could give it binding `M-y'.

It's more or less a replacement for `yank-pop'
because the end effect is more or less the same:
yank something from the kill-ring (but see above).

Possible variants:

1. Prevent editing in the minibuffer (e.g.
   optionally), so you always get a kill (you
   can edit the text after yanking, of course).

2. While reading the string, force all kill
   commands to just delete, so that editing
   doesn't add to the kill-ring.

---

I use the secondary selection a lot, and have
keys for commands that use it.  I even have a
ring of secondary selections.  In many ways the
secondary selection is, or can be, parallel to
the region, and likewise its ring.

I use prefix `C-M-' for the secondary-selection
commands.

Yes, one user's/library's use of `C-M-y' isn't
reason enough to not waste that key on yet
another kill-ring yanker.  But the fact that
it's essentially a replacement for `yank-pop'
is a reasonable argument.

(`browse-kill-ring.el', for example, is another
such replacement.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sun, 28 Jul 2019 10:07:01 GMT) Full text and rfc822 format available.

Message #21 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Sun, 28 Jul 2019 12:06:28 +0200
Juri Linkov <juri <at> linkov.net> writes:

> FWIW, here is battle-tested (i.e. use for many years) command
> that allows looking at the top or middle of each yank-pop before yanking:

What I'd really like (as a new feature) would be to be able to `M-y' and
then do any other non-editing command, and then be able to continue the
`M-y' as if I'd not done anything.  Perhaps as a new command, or perhaps
as just how `M-y' should always behave.

The latter might sound like a controversial behavioural change, but
`M-y' currently just signals an error in that situation, so I guess the
impact would be minimal.  (I.e., having `M-y' error out in that
situation is probably not in anybody's work flow?)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sun, 28 Jul 2019 11:07:02 GMT) Full text and rfc822 format available.

Message #24 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Sun, 28 Jul 2019 13:06:17 +0200
On Jul 28 2019, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Juri Linkov <juri <at> linkov.net> writes:
>
>> FWIW, here is battle-tested (i.e. use for many years) command
>> that allows looking at the top or middle of each yank-pop before yanking:
>
> What I'd really like (as a new feature) would be to be able to `M-y' and
> then do any other non-editing command, and then be able to continue the
> `M-y' as if I'd not done anything.  Perhaps as a new command, or perhaps
> as just how `M-y' should always behave.

It could be bound to M-0 M-y, which would normally be a no-op.  It could
reestablish the yank-pop sequence, without modifying anything.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Sun, 28 Jul 2019 13:34:02 GMT) Full text and rfc822 format available.

Message #27 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 25196 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Sun, 28 Jul 2019 14:33:14 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> On Jul 28 2019, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
>> What I'd really like (as a new feature) would be to be able to `M-y' and
>> then do any other non-editing command, and then be able to continue the
>> `M-y' as if I'd not done anything.  Perhaps as a new command, or perhaps
>> as just how `M-y' should always behave.
>
> It could be bound to M-0 M-y, which would normally be a no-op.

FWIW, M-0 M-y is not entirely a no-op when interprogram-paste-function
is and returns non-nil.

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Thu, 01 Aug 2019 14:36:02 GMT) Full text and rfc822 format available.

Message #30 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Thu, 01 Aug 2019 17:35:32 +0300
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Juri Linkov <juri <at> linkov.net> writes:
>
>> FWIW, here is battle-tested (i.e. use for many years) command
>> that allows looking at the top or middle of each yank-pop before yanking:
>
> What I'd really like (as a new feature) would be to be able to `M-y' and
> then do any other non-editing command, and then be able to continue the
> `M-y' as if I'd not done anything.  Perhaps as a new command, or perhaps
> as just how `M-y' should always behave.
>
> The latter might sound like a controversial behavioural change, but
> `M-y' currently just signals an error in that situation, so I guess the
> impact would be minimal.  (I.e., having `M-y' error out in that
> situation is probably not in anybody's work flow?)

FWIW, see some slightly related discussion in the following thread:

https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00650.html
https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01176.html
https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01194.html

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Thu, 01 Aug 2019 14:57:02 GMT) Full text and rfc822 format available.

Message #33 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>, Lars Ingebrigtsen
 <larsi <at> gnus.org>
Cc: 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson
 <jidanni <at> jidanni.org>, Juri Linkov <juri <at> linkov.net>
Subject: RE: bug#25196: mention how to see top or middle of each yank-pop
Date: Thu, 1 Aug 2019 07:54:11 -0700 (PDT)
> FWIW, see some slightly related discussion in the following thread:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00650.html

Yes.  Might as well add the enhancements of
`browse-kill-ring+.el' to that input/discussion:

* Option `browse-kill-ring-alternative-ring' is an
  alternative selection ring to use, in addition to
  the `kill-ring'.  You can customize the value to
  any ring of strings you like.

* `browse-kill-ring' lets you use either ring as the
  selection ring to browse and paste.  You can even
  use both rings, in different `browse-kill-ring'
  display buffers.  In such a buffer, `o' pops to the
  list for the other ring.

* If you also use library `second-sel.el' then, by
  default, the secondary selection ring is the
  alternative ring.

* You can customize the set of commands that are
  recognized as yank alternative yank commands.  The
  alternative yank commands are commands that yank
  using a different selection ring.

* Following a yank command or alternative yank command,
  `M-y' pops and yanks the appropriate type of selection.
  A prefix arg N chooses the Nth previous selection in
  the ring.

* Otherwise (not following a yank or alternative yank),
  `M-y' browses the current selection ring.  A prefix
  arg switches to the other selection ring.  If you
  are in a `browse-kill-ring' buffer, then `M-y'
  switches to the other ring even without a prefix arg.

* If there is no alternative selection ring then `M-y'
  either pops (following a yank) or browses (not
  following a yank) the `kill-ring'.

---

https://www.emacswiki.org/emacs/download/browse-kill-ring%2b.el




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25196; Package emacs. (Thu, 01 Aug 2019 21:47:04 GMT) Full text and rfc822 format available.

Message #36 received at 25196 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 25196 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#25196: mention how to see top or middle of each yank-pop
Date: Fri, 02 Aug 2019 00:12:48 +0300
> FWIW, see some slightly related discussion in the following thread:
>
> https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00650.html
> https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01176.html
> https://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01194.html

I guess nothing was changed after that discussion is because
a package 'browse-kill-ring' is easy to install from MELPA,
and a small snippet that I posted is easy to add to the init file.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 Aug 2019 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.