From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: search -> replace -> global keymap? Date: Thu, 9 Mar 2017 06:46:27 -0800 (PST) Message-ID: References: <87mvcv39lz.fsf@skimble.plus.com> <1a33d696-77d1-44af-bccf-efd6690f7202@default> <87r326a9mj.fsf@skimble.plus.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1489070851 3918 195.159.176.226 (9 Mar 2017 14:47:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2017 14:47:31 +0000 (UTC) Cc: help-emacs To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 09 15:47:27 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clzLe-00005I-16 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 15:47:22 +0100 Original-Received: from localhost ([::1]:34543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clzLk-00053G-3N for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 09:47:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clzKv-00051G-7r for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 09:46:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clzKq-0004YS-AH for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 09:46:37 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:27886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clzKq-0004YI-0Z for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 09:46:32 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v29EkUex010461 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Mar 2017 14:46:30 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v29EkT6q012513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Mar 2017 14:46:30 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v29EkSio017083; Thu, 9 Mar 2017 14:46:29 GMT In-Reply-To: <87r326a9mj.fsf@skimble.plus.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112485 Archived-At: > >> I'm using a certain command very often from the menus and using my > >> mouse. It is 'search -> replace -> global' but how can I assign a keym= ap > >> to it please so that I'm able to call it from within my document pleas= e? > > > > What menu is that (I don't see it)? > > > > Anyway, do this: `C-h k' followed by picking the menu item that you > > want to assign a key to. That will tell you what the command is > > that that menu item invokes. > > > > Then do `C-h w' followed by that command name, to see if it is > > already on a keyboard key sequence, in addition to being bound > > to that menu item. > > > > If it has no keyboard binding, give it one, using `global-set-key'. > > > > You can use `M-x global-set-key' interactively, to try it out. > > You can use `(global-set-key (kbd "...") 'COMMAND)' in your init > > file to get the binding persistently, where "..." is the key > > sequence you want and COMMAND is the command you want to bind > > it to. >=20 > Thanks for this Drew. >=20 > To find what I'm talking about 'Menu-bar -> Search -> Replace -> Global' I don't see that menu. You should mention the details about your Emacs version/installation. With `emacs -Q' (no init file) I see the Search menu under the Edit menu on the menu-bar. I see no Search menu on the menu-bar. But it might also depend on what mode you are in etc. > and the command that it generates is 'replace-string'. So I've assigned > a keyboard binding to it and its now working well, thanks. Good. But how did you find which command is bound to it, if `C-h k' doesn't work for you? > But this problem has thrown up a difficulty for me, in that I can't use > 'C-h k'! If I try it it always just shows the 'k', and ditto 'C-h w'! > How can I find what it has been mapped to please? Others have responded to this question. Try f1 if C-h doesn't seem to work.