all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 9406@debbugs.gnu.org
Subject: bug#9406: 24.0.50; Use M-p/M-n to navigate through the kill ring
Date: Wed, 31 Aug 2011 16:47:37 +0100	[thread overview]
Message-ID: <4E5E5799.1040107@harpegolden.net> (raw)
In-Reply-To: <jwv1uw17ng4.fsf-monnier+emacs@gnu.org>

On 31/08/11 14:01, Stefan Monnier wrote:
 > That doesn't sound like a bad idea, although of course it will annoy
 > a few users in a few corner cases (e.g. I have M-n and M-p bound in
 > smerge-mode).  So we might prefer to have it as an option.

I definitely do use various modes with M-n/M-p already bound (such as 
slime), they're often some "mode appropriate next/previous".  I expect I 
do hit them directly after a C-y sometimes too, though I suppose
in principle I could get used to not being able to (and I'm not exactly 
a new user who doesn't know how to alter bindings anyway...)

All the same, one alternative would be M-y and M-C-y after C-y for 
moving in opposite directions through the kill ring? Just tried it and 
it doesn't feel too bad to me, anyway.

(defun yank-pop-inv (&optional arg)
   (interactive "*p")
   (unless arg (setq arg 1))
   (let ((arg (- arg)))
     (yank-pop arg)))

(global-set-key (kbd "M-C-y") #'yank-pop-inv)


OTOH, "kill-ring-search" tends to be more useful than uni- or bi- 
directional navigation through the kill ring. The author suggests M-C-y 
as its default binding:
http://nschum.de/src/emacs/kill-ring-search/

So I'd also consider, given M-y is currently globally bound to a 
definition that isn't used except after C-y, putting kill-ring-search 
functionality on M-y when _not_ after C-y.

Then also add a kill-ring-search-next to the kill-ring-search prompt as 
M-C-y (it already has a kill-ring-search-prev on M-y).

That would also actually sort of fit in with C-y followed by M-y / M-C-y 
as suggested earlier above, as then C-y followed by M-y / M-C-y could be 
considered to be acting like the new M-y, with a null search string, 
inplace display, and implicit exit (while still also acting just like 
C-y M-y today!).

And could add M-n and M-p to the new M-y prompt where they'd feel 
"right", without having them have an effect after C-y (or with if 
preferred, of course).





  parent reply	other threads:[~2011-08-31 15:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 11:39 bug#9406: 24.0.50; Use M-p/M-n to navigate through the kill ring Dani Moncayo
2011-08-30 12:08 ` Juri Linkov
2011-08-30 12:17   ` Dani Moncayo
2011-08-30 12:27     ` Juri Linkov
2011-08-30 18:13       ` Deniz Dogan
2011-08-30 18:48         ` Dani Moncayo
2011-08-31  6:22       ` Dani Moncayo
2011-08-31  9:51         ` Juri Linkov
2011-08-31 10:45           ` Dani Moncayo
2011-08-31 13:01         ` Stefan Monnier
2011-08-31 13:55           ` Deniz Dogan
2011-08-31 14:33             ` Thierry Volpiatto
2011-08-31 14:52               ` Deniz Dogan
2011-09-02  0:39               ` Stefan Monnier
2011-08-31 15:40             ` Dani Moncayo
2011-08-31 15:45               ` Deniz Dogan
2011-08-31 16:11               ` Drew Adams
2011-08-31 15:33           ` Dani Moncayo
2011-08-31 15:47           ` David De La Harpe Golden [this message]
2011-08-31 16:36             ` Juri Linkov
2011-08-31 21:18               ` Dani Moncayo
2011-09-01  8:42                 ` Juri Linkov
2011-09-01  9:13                   ` Dani Moncayo
2011-09-01  9:53                     ` Antoine Levitt
2011-09-01 10:28                       ` Dani Moncayo
2011-09-01 13:22                     ` Juri Linkov
2011-09-01 14:44                       ` Dani Moncayo
2011-09-01 19:59                         ` David De La Harpe Golden
2011-09-01 21:56                           ` Dani Moncayo
2011-09-02  1:24                             ` David De La Harpe Golden
2022-04-27 14:21   ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=4E5E5799.1040107@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=9406@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.