unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Undoing yank-pop
@ 2013-06-12  1:58 Michael Heerdegen
  2013-06-12  7:58 ` Andreas Schwab
  2013-06-17  2:51 ` Michael Heerdegen
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Heerdegen @ 2013-06-12  1:58 UTC (permalink / raw)
  To: Emacs Development

Hello,

I often do C-y M-y M-y ... like most of us, I think.

Currently, if you `undo' after that, each of the M-y's are undone
separately.  This is not very useful and dangerous:

 - You had already the text for each M-y inserted, so it is very
   unlikely that you want one of the yanks when cycling backwards.

 - You don't know when to stop!  You have to be very careful so that
   you don't undo stuff before yanking by accident.  There is no visual
   help for noticing that "border".

Don't I know the right setting - or could we improve that?  I would
suggest that undo simply undoes until before the first yank.

Opinions?  Does anyone like the current behavior?


Regards,

Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-12  1:58 Michael Heerdegen
@ 2013-06-12  7:58 ` Andreas Schwab
  2013-06-12 17:37   ` Richard Copley
  2013-06-17  2:51 ` Michael Heerdegen
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2013-06-12  7:58 UTC (permalink / raw)
  To: Emacs Development

Michael Heerdegen <michael_heerdegen@web.de> writes:

>  - You don't know when to stop!  You have to be very careful so that
>    you don't undo stuff before yanking by accident.  There is no visual
>    help for noticing that "border".

You can always redo if you overshot.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-12  7:58 ` Andreas Schwab
@ 2013-06-12 17:37   ` Richard Copley
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Copley @ 2013-06-12 17:37 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Emacs Development

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Opinions?  Does anyone like the current behavior?
>

Current behaviour is very useful in my opinion, and it is at least
semi-intuitive (by which I mean I didn't guess at first how to do this when
I needed to, but when I eventually discovered it by accident, I understood
it easily). It's hard to know when to stop when you're doing "C-y M-y M-y
M-y ..." so it's easy to overshoot, and there needs to be an easy way to go
backwards. If you go too far you can redo, as Andreas said, and that part
is completely intuitive.

[-- Attachment #2: Type: text/html, Size: 971 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
@ 2013-06-13  1:43 Kelly Dean
  2013-06-13 22:04 ` Richard Copley
  0 siblings, 1 reply; 8+ messages in thread
From: Kelly Dean @ 2013-06-13  1:43 UTC (permalink / raw)
  To: emacs-devel

Michael Heerdegen wrote:
>I often do C-y M-y M-y ... like most of us, I think.
>Currently, if you `undo' after that, each of the M-y's are undone
>separately.
[...]
>I would suggest that undo simply undoes until before the first yank.

I agree. I think if you put an undo boundary before yank, and before any change besides yank-pop that follows yank, but don't put one before yank-pop, then when undoing and redoing, it would act like the text insertion done by the last yank-pop was the only thing that happened.

Andreas Schwab wrote:
>You can always redo if you overshot.

Yes, but having to undo through all the yank-pop events in the first place is annoying when you only did them for the purpose of reviewing the last few items on the ring, and didn't intend to leave the text inserted. And if you overshoot while doing yank-pop, you don't need undo to go back anyway, since you can use a negative arg with yank-pop (which I do so often that I have a yank-pop-rev command that does that, with a dedicated key chord bound to it).





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-13  1:43 Undoing yank-pop Kelly Dean
@ 2013-06-13 22:04 ` Richard Copley
  2013-06-13 22:18   ` chad
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Copley @ 2013-06-13 22:04 UTC (permalink / raw)
  To: Kelly Dean; +Cc: Emacs Development

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

On 13 June 2013 02:43, Kelly Dean <kellydeanch@yahoo.com> wrote:

> Michael Heerdegen wrote:
> >I often do C-y M-y M-y ... like most of us, I think.
> >Currently, if you `undo' after that, each of the M-y's are undone
> >separately.
> [...]
> >I would suggest that undo simply undoes until before the first yank.
>
> I agree. I think if you put an undo boundary before yank, and before any
> change besides yank-pop that follows yank, but don't put one before
> yank-pop, then when undoing and redoing, it would act like the text
> insertion done by the last yank-pop was the only thing that happened.
>
> Andreas Schwab wrote:
> >You can always redo if you overshot.
>
> Yes, but having to undo through all the yank-pop events in the first place
> is annoying when you only did them for the purpose of reviewing the last
> few items on the ring, and didn't intend to leave the text inserted. And if
> you overshoot while doing yank-pop, you don't need undo to go back anyway,
> since you can use a negative arg with yank-pop (which I do so often that I
> have a yank-pop-rev command that does that, with a dedicated key chord
> bound to it)


Uh huh. IMO there should be such a keychord by default and it should be
short and advertised.

[-- Attachment #2: Type: text/html, Size: 1684 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-13 22:04 ` Richard Copley
@ 2013-06-13 22:18   ` chad
  0 siblings, 0 replies; 8+ messages in thread
From: chad @ 2013-06-13 22:18 UTC (permalink / raw)
  To: Emacs Development; +Cc: Richard Copley, Kelly Dean

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

On 13 Jun 2013, at 15:04, Richard Copley <rcopley@gmail.com> wrote:

> Yes, but having to undo through all the yank-pop events in the first place is annoying when you only did them for the purpose of reviewing the last few items on the ring, [...] (which I do so often that I have a yank-pop-rev command that does that, with a dedicated key chord bound to it)
> 
> Uh huh. IMO there should be such a keychord by default and it should be short and advertised.

Maybe you'd be interested in browse-kill-ring

	https://github.com/browse-kill-ring
	http://www.emacswiki.org/emacs/BrowseKillRing

Hope this helps,
~Chad


[-- Attachment #2: Type: text/html, Size: 1586 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-12  1:58 Michael Heerdegen
  2013-06-12  7:58 ` Andreas Schwab
@ 2013-06-17  2:51 ` Michael Heerdegen
  2013-06-23  2:01   ` Michael Heerdegen
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2013-06-17  2:51 UTC (permalink / raw)
  To: Emacs Development

Hello,

I'll make a proper bug report.  I see that there are different opinions,
so we'll have to find a compromise.  Thanks to everybody.


Regards,

Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Undoing yank-pop
  2013-06-17  2:51 ` Michael Heerdegen
@ 2013-06-23  2:01   ` Michael Heerdegen
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Heerdegen @ 2013-06-23  2:01 UTC (permalink / raw)
  To: emacs-devel

I wrote:

> I'll make a proper bug report.

Done: bug#14693.  See there for further discussion.


Thanks,

Michael.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-23  2:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13  1:43 Undoing yank-pop Kelly Dean
2013-06-13 22:04 ` Richard Copley
2013-06-13 22:18   ` chad
  -- strict thread matches above, loose matches on Subject: below --
2013-06-12  1:58 Michael Heerdegen
2013-06-12  7:58 ` Andreas Schwab
2013-06-12 17:37   ` Richard Copley
2013-06-17  2:51 ` Michael Heerdegen
2013-06-23  2:01   ` Michael Heerdegen

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).