From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: bogus binding of M-s in Info Date: Fri, 19 Dec 2008 02:36:38 +0200 Organization: JURTA Message-ID: <87prjpgff5.fsf@jurta.org> References: <873agnsk1q.fsf@catnip.gol.com> <87k59ye079.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229647880 23323 80.91.229.12 (19 Dec 2008 00:51:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2008 00:51:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 19 01:52:25 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LDTbM-0000MB-7y for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2008 01:52:24 +0100 Original-Received: from localhost ([127.0.0.1]:50133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDTaA-00020d-2O for ged-emacs-devel@m.gmane.org; Thu, 18 Dec 2008 19:51:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDTa4-0001zK-WB for emacs-devel@gnu.org; Thu, 18 Dec 2008 19:51:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDTa3-0001y0-Fr for emacs-devel@gnu.org; Thu, 18 Dec 2008 19:51:04 -0500 Original-Received: from [199.232.76.173] (port=50044 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDTa3-0001xj-Ao for emacs-devel@gnu.org; Thu, 18 Dec 2008 19:51:03 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]:59163) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDTZz-0003eu-ON; Thu, 18 Dec 2008 19:51:00 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1LDTZu-000Hsn-JP; Fri, 19 Dec 2008 02:50:54 +0200 In-Reply-To: (Miles Bader's message of "Thu, 18 Dec 2008 12:22:22 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 3b10ce253585130f5293a5b36593fd37 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 5467 [Oct 22 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107047 Archived-At: > 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/