GNU bug report logs -
#37909
25.3; repeat does not repeat yank correctly
Previous Next
Full log
Message #11 received at 37909 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 24 Oct 2019 21:21:46 +0200
> From: "Ulrich Windl" <Ulrich.Windl <at> rz.uni-regensburg.de>
>
> Trying to repeat the last yank 98 times using "C-u 98 M-x repeat" turned out
> that the last yank wasn't inserted 98 times, but the last character of the last
> yank (which is quite unexpected). Most preferrably as a vi-user I'd like C-u 98
> C-y to yank the last kill 98 times, but things seem different.
>
> For the records: The last kill was "' '{L/R:D=I<1-49>C<6>S< >U}
> {L/R:D=I<0-9>}'", and the text inserted was
> "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''".
The doc string of 'repeat' says:
Repeat most recently executed command.
If REPEAT-ARG is non-nil (interactively, with a prefix argument),
supply a prefix argument to that command.
So "C-u 98 M-x repeat" invokes the _previous_ command, in your case
C-y, with the argument of 98. And the documentation of C-y says:
With argument N, reinsert the Nth most recent kill.
So it does NOT insert the most recent kill 98 times, it inserts the
98th recent kill.
Does this explain what you saw? If not, what remains unexplained or
unexpected?
Thanks.
This bug report was last modified 5 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.