* global-set-key + query-replace-regexp
@ 2005-10-27 14:55 luca.spinacci
2005-10-27 15:55 ` Neon Absentius
2005-10-27 17:13 ` Peter Dyballa
0 siblings, 2 replies; 4+ messages in thread
From: luca.spinacci @ 2005-10-27 14:55 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key + query-replace-regexp
2005-10-27 14:55 global-set-key + query-replace-regexp luca.spinacci
@ 2005-10-27 15:55 ` Neon Absentius
2005-10-27 17:13 ` Peter Dyballa
1 sibling, 0 replies; 4+ messages in thread
From: Neon Absentius @ 2005-10-27 15:55 UTC (permalink / raw)
On Thu, Oct 27, 2005 at 04:55:21PM +0200, luca.spinacci@selex-comms.com wrote:
>
>
> 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)
>
Try
(global-set-key (kbd "<f1>") 'name-of-command)
HTH
--
There is no national science just as there is no national
multiplication table; what is national is no longer science.
-- Anton Checov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key + query-replace-regexp
2005-10-27 14:55 global-set-key + query-replace-regexp luca.spinacci
2005-10-27 15:55 ` Neon Absentius
@ 2005-10-27 17:13 ` Peter Dyballa
1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2005-10-27 17:13 UTC (permalink / raw)
Cc: Help-gnu-emacs
Am 27.10.2005 um 16:55 schrieb luca.spinacci@selex-comms.com:
> I would like a short key to invoke query-replace-regexp command.
>
How about these simple ones:
(global-set-key [M-f1] 'replace-string)
(global-set-key [M-f2] 'replace-regexp)
(global-set-key [M-f3] 'grep-find)
(global-set-key [M-f4] 'query-replace-regexp)
(global-set-key [f1 f2] 'manual-entry)
(global-set-key [f1 f3] 'info-apropos)
(global-set-key [f1 f4] 'apropos)
(global-set-key [f1 f5] 'apropos-variable)
(global-set-key [f3] 'compare-windows)
--
Greetings
Pete
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key + query-replace-regexp
[not found] <mailman.12914.1130425477.20277.help-gnu-emacs@gnu.org>
@ 2005-10-28 16:45 ` B. T. Raven
0 siblings, 0 replies; 4+ messages in thread
From: B. T. Raven @ 2005-10-28 16:45 UTC (permalink / raw)
<luca.spinacci@selex-comms.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-28 16:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27 14:55 global-set-key + query-replace-regexp luca.spinacci
2005-10-27 15:55 ` Neon Absentius
2005-10-27 17:13 ` Peter Dyballa
[not found] <mailman.12914.1130425477.20277.help-gnu-emacs@gnu.org>
2005-10-28 16:45 ` B. T. Raven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).