unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 48478@debbugs.gnu.org
Subject: bug#48478: 28.0.50; yank-from-kill-ring and kill-ring-yank-pointer
Date: Sun, 23 May 2021 10:19:49 +0300	[thread overview]
Message-ID: <83a6olkjca.fsf@gnu.org> (raw)
In-Reply-To: <87k0nqo570.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 22 May 2021 23:59:31 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: 48478@debbugs.gnu.org
> Date: Sat, 22 May 2021 23:59:31 +0300
> 
> >> For the case of not adding the edited entry to the kill-ring,
> >> now kill-ring-yank-pointer stays at the same position it was
> >> before the editing.
> >
> > It doesn't look like that in my testing.  Here's the recipe:
> >
> >   emacs -Q
> >   For the words "buffer", "text", "Lisp", and "evaluation" from the
> >     first line, mark each word and then M-w
> >   M->
> >   M-y
> >   Type "tex TAB", which will expand to "text"
> >   Type "oize RET", which will insert "textoize"
> >   Type C-y
> >   This inserts the last kill, which is "evaluation", whereas I
> >     expected to see "text", since you said the pointer stays at the
> >     same position.
> 
> The pointer kill-ring-yank-pointer stays at the same position:
> before M-y, kill-ring-yank-pointer points to "evaluation",
> and after M-y, kill-ring-yank-pointer points to "evaluation".

I think this is not the optimal behavior.  The optimal behavior IMO is
if M-y would yield the same results wrt kill-ring-yank-pointer as does
M-y after C-y.  IOW, it would be natural if M-y invoked after a
non-yank command would just allow a "direct access" to a specific slot
of the kill-ring, and would otherwise work like M-y after a yank
command.  Once again, from user's POV M-y is the same command, so
every subtle change in the results is IMO a disadvantage, if the
change is not a direct consequence of the differences in use cases.

If you want yank-from-kill-ring to leave kill-ring-yank-pointer
unaltered, we could move the pointer in yank-pop, after
yank-from-kill-ring returns.  WDYT?





  reply	other threads:[~2021-05-23  7:19 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 11:34 bug#48478: 28.0.50; yank-from-kill-ring and kill-ring-yank-pointer Eli Zaretskii
2021-05-17 14:35 ` Lars Ingebrigtsen
2021-05-17 21:10 ` Juri Linkov
2021-05-18 11:51   ` Eli Zaretskii
2021-05-18 20:24     ` Juri Linkov
2021-05-19  2:30       ` Eli Zaretskii
2021-05-19 16:31         ` Juri Linkov
2021-05-20  9:32           ` Eli Zaretskii
2021-05-20 18:02             ` Juri Linkov
2021-05-20 19:04               ` Eli Zaretskii
2021-05-20 19:56                 ` Juri Linkov
2021-05-20 20:10                   ` Eli Zaretskii
2021-05-20 20:44                     ` Juri Linkov
2021-05-21  5:51                       ` Eli Zaretskii
2021-05-21 18:18                         ` Juri Linkov
2021-05-22  6:41                           ` Eli Zaretskii
2021-05-22 20:59                             ` Juri Linkov
2021-05-23  7:19                               ` Eli Zaretskii [this message]
2021-05-25 20:35                                 ` Juri Linkov
2021-05-26 12:05                                   ` Eli Zaretskii
2021-05-26 22:09                                     ` Juri Linkov
2021-05-27  7:30                                       ` Eli Zaretskii
2021-05-30 22:32                                         ` Juri Linkov
2021-05-31 12:08                                           ` Eli Zaretskii
2021-05-31 20:20                                             ` Juri Linkov
2021-06-01 12:13                                               ` Eli Zaretskii
2021-06-01 20:32                                                 ` Juri Linkov
2021-06-02 14:57                                                   ` Eli Zaretskii
2021-06-02 21:10                                                     ` Juri Linkov
2021-06-03  6:19                                                       ` Eli Zaretskii
2021-06-03 20:55                                                         ` Juri Linkov
2021-06-04  5:57                                                           ` Eli Zaretskii
2021-06-04 16:46                                                             ` Juri Linkov
2021-06-04 19:04                                                               ` Eli Zaretskii
2021-06-05 21:35                                                                 ` Juri Linkov
2021-06-06  5:52                                                                   ` Eli Zaretskii
2021-06-06 20:52                                                                     ` Juri Linkov
2021-06-07 12:16                                                                       ` Eli Zaretskii
2021-06-08 16:55                                                                         ` Juri Linkov
2021-06-10 12:07                                                                           ` Eli Zaretskii
2021-06-11 17:10                                                                             ` Juri Linkov
2021-06-11 18:06                                                                               ` Eli Zaretskii
2021-06-11 18:33                                                                                 ` Juri Linkov
2021-06-11 19:23                                                                                   ` Eli Zaretskii
2021-06-11 19:16                                                                                 ` Eli Zaretskii
2021-05-30 22:23                   ` Juri Linkov
2021-05-31 12:04                     ` Eli Zaretskii
2021-05-31 20:17                       ` Juri Linkov
2021-06-01 12:12                         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6olkjca.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48478@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).