all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: bogus binding of M-s in Info
Date: Fri, 19 Dec 2008 02:36:38 +0200	[thread overview]
Message-ID: <87prjpgff5.fsf@jurta.org> (raw)
In-Reply-To: <buoljue6uc1.fsf@dhapc248.dev.necel.com> (Miles Bader's message of "Thu, 18 Dec 2008 12:22:22 +0900")

> Incidentally, wouldn't it be nice if the bindings in the M-s keymap
> (both the global one, and the one in isearch) had Meta-variants too, so
> one could more conveniently type them with a real meta key?
>
> E.g., `M-s M-w' would be a duplicate of `M-s w'...

It would be better to try reserving keys on the `M-s' prefix for commands
similar to normal command but that are isearch specific.  For instance,
`M-w' normally saves the region to the kill ring, so `M-w M-e' could
save the search string to the kill ring.  But this is also possible
with `C-SPC C-r C-r M-w' (i.e. set mark with quiting isearch, go back
to the beginning of the previous search string and copy it).

So perhaps we should bind `M-s M-w' to a more frequently used
command `isearch-forward-word'.  The same could be done for `M-s M-o'
(`isearch-occur') as well:

Index: lisp/isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.340
diff -u -r1.340 isearch.el
--- lisp/isearch.el	18 Dec 2008 01:16:26 -0000	1.340
+++ lisp/isearch.el	19 Dec 2008 00:34:59 -0000
@@ -493,10 +493,12 @@
 
     (define-key map "\M-sr" 'isearch-toggle-regexp)
     (define-key map "\M-sw" 'isearch-toggle-word)
+    (define-key map "\M-s\M-w" 'isearch-toggle-word)
 
     (define-key map [?\M-%] 'isearch-query-replace)
     (define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
     (define-key map "\M-so" 'isearch-occur)
+    (define-key map "\M-s\M-o" 'isearch-occur)
     (define-key map "\M-shr" 'isearch-highlight-regexp)
 
     map)
@@ -603,6 +605,7 @@
 (define-key global-map "\C-r" 'isearch-backward)
 (define-key esc-map "\C-r" 'isearch-backward-regexp)
 (define-key search-map "w" 'isearch-forward-word)
+(define-key search-map "\M-w" 'isearch-forward-word)
 
 ;; Entry points to isearch-mode.
 
Index: lisp/bindings.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/bindings.el,v
retrieving revision 1.213
diff -u -r1.213 bindings.el
--- lisp/bindings.el	29 Aug 2008 17:56:33 -0000	1.213
+++ lisp/bindings.el	19 Dec 2008 00:35:29 -0000
@@ -833,7 +833,9 @@
   "Keymap for search related commands.")
 (define-key esc-map "s" search-map)
 
-(define-key search-map "o"  'occur)
+(define-key search-map    "o" 'occur)
+(define-key search-map "\M-o" 'occur)
+
 (define-key search-map "hr" 'highlight-regexp)
 (define-key search-map "hp" 'highlight-phrase)
 (define-key search-map "hl" 'highlight-lines-matching-regexp)

-- 
Juri Linkov
http://www.jurta.org/emacs/




      reply	other threads:[~2008-12-19  0:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  0:49 bogus binding of C-w in isearch editing mode Miles Bader
2008-12-17  1:30 ` Juri Linkov
2008-12-17  3:12   ` Miles Bader
2008-12-17  5:47     ` Stefan Monnier
2008-12-17  5:55       ` Miles Bader
2008-12-18  1:19       ` Juri Linkov
2008-12-18  1:34 ` bogus binding of M-s in Info (was: bogus binding of C-w in isearch editing mode) Juri Linkov
2008-12-18  3:22   ` bogus binding of M-s in Info Miles Bader
2008-12-19  0:36     ` Juri Linkov [this message]

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=87prjpgff5.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /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.