From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Danny YUE Newsgroups: gmane.emacs.help Subject: Re: search -> replace -> global keymap? Date: Thu, 09 Mar 2017 21:23:00 +0800 Message-ID: <87y3welh3f.fsf@gmail.com> 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 X-Trace: blaine.gmane.org 1489065898 9140 195.159.176.226 (9 Mar 2017 13:24:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2017 13:24:58 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 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 14:24:55 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 1cly3l-0001Ul-8q for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 14:24:49 +0100 Original-Received: from localhost ([::1]:34114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cly3r-0003ox-2w for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 08:24:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cly2x-0003mt-AJ for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 08:24:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cly2s-00046I-DW for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 08:23:59 -0500 Original-Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:36240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cly2s-00045u-7i for help-gnu-emacs@gnu.org; Thu, 09 Mar 2017 08:23:54 -0500 Original-Received: by mail-pf0-x229.google.com with SMTP id o126so28909883pfb.3 for ; Thu, 09 Mar 2017 05:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=kX6kcfBfV/LsUvjVNHoRcpezKKrawDLcqpUobFjnn4M=; b=Lk1jJYIIKFnpleaejwMyXBXeOW9STn3V4VvmSzRq8QeM72VCZ5T/HKKOCnwftRlws/ k2TfaTpoVlUp+rP4AkNBkZUiqb8KU21m6hoh2mLuKMfHIdporDERZf+Alz7lGnha40ND xg0YIp3Sau2ZcgCgIu8hInQ0jSjl/yri9Y2pEG6sbmoaUGd7xJPJhmHbsYkqjBq88GB5 F89P+9/8mXiDyzcnmWsL5DGjJ88x8LYONIadP/2QpU48VQas7//tD16TzOfUQfKcJ4c1 XZNOHq/fOOv+nOqU3PcfboWHdSn0ULoZSW50REgg60BkxOXlamioBXBO7pEF1aSQNdjJ zH3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=kX6kcfBfV/LsUvjVNHoRcpezKKrawDLcqpUobFjnn4M=; b=OKUET5zYi6/ej2tNb+FS32WBG/u2n1N6vTxO6CZ239vHLfS2h0IjW4xKQSUAIRRDp5 AtboZ8S2RPO+hv738WsnacLoFpoFXpFST0DTphKhVUm91023ogGmEv3igRYTqe7fO2BR JOzFcKYwbjHTzQxUDhOhwKDvDHVftHCfKuENoM077RbdaK+VVtdZDRniyckAp+KfMc3B 0Dg5mc+NaenBNC+X0DGNv25uBarznitJajVlkfeKDt7zJvMVPzVDeEflHYKr0EYaH7Fo 1DHqBR0/nJNvrROEC6TFtaDyLuEZZ1KhHTgBFHo0zYT25wolqo6rRtUq8cztdrYlz5qO m4yw== X-Gm-Message-State: AMke39kZN6yeU4bJo2rZ6/gSshVPO0a1HsIMgNy4zWPX8FnoqkyehClvSzA2Jb05F5S3UA== X-Received: by 10.98.83.197 with SMTP id h188mr14094897pfb.106.1489065833167; Thu, 09 Mar 2017 05:23:53 -0800 (PST) Original-Received: from localhost (23.83.238.120.16clouds.com. [23.83.238.120]) by smtp.gmail.com with ESMTPSA id u82sm12730073pfd.7.2017.03.09.05.23.51 (version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 05:23:52 -0800 (PST) In-reply-to: <87r326a9mj.fsf@skimble.plus.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::229 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:112482 Archived-At: Sharon, I suspect you typed "k" twice? "C-h k" is used for describing a key stroke, so it takes a single key or a bound key combination and tells you what they are bound to. In order to get a list of all the key bindings, you invoke: "M-x describe-bindings" or just "C-h b". You can use "C-h ?" for a list of valid commands. Emacs has a good help system, use it wisely! :-) Danny Sharon Kimble writes: > Drew Adams writes: > >>> 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 keymap >>> to it please so that I'm able to call it from within my document please? >> >> 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. > > Thanks for this Drew. > > To find what I'm talking about 'Menu-bar -> Search -> Replace -> Global' > and the command that it generates is 'replace-string'. So I've assigned > a keyboard binding to it and its now working well, thanks. > > 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? > > Thanks > Sharon.