From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: global-set-key + query-replace-regexp Date: Fri, 28 Oct 2005 16:45:18 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1130518385 17606 80.91.229.2 (28 Oct 2005 16:53:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 16:53:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 28 18:52:57 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVXQl-0006dh-7a for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 18:50:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVXQk-0001L8-IH for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 12:50:14 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!0847253b!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-NNTP-Posting-Host: 4.159.32.246 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread1.news.atl.earthlink.net 1130517918 4.159.32.246 (Fri, 28 Oct 2005 09:45:18 PDT) Original-NNTP-Posting-Date: Fri, 28 Oct 2005 09:45:18 PDT Original-Xref: shelby.stanford.edu gnu.emacs.help:135075 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30666 Archived-At: wrote in message news:mailman.12914.1130425477.20277.help-gnu-emacs@gnu.org... > > > I would like a short key to invoke query-replace-regexp command. > I tried > (global-set-key [f1] 'my-query-replace-regexp) > (fset 'my-query-replace-regexp [?\C-\M-%]) > but the key "f1" invoke (M-x query-replace-regexp "" "" nil nil) > > ...Is there a way to call query-... interactively via a short > key (M-x query-replace-regexp excepted!)? > > Thank you, > Luca. > > > I have found that keeping fingers close to the home keys is more conducive to efficiency than almost anything else. Since you quickly get used to the M-x keychord (Alt-x on my Dozer), it's easier to add keys to that sequence via an alias in your .emacs: (defalias 'qrr 'query-replace-regexp) [This enables M-xqrr] I would save the F-1 to F-12 keys for things that are done less often. Ed