* global-set-key with parameter
@ 2008-10-08 18:32 Fred Picher
0 siblings, 0 replies; 4+ messages in thread
From: Fred Picher @ 2008-10-08 18:32 UTC (permalink / raw
To: help-gnu-emacs
Hello all,
I would like to bind the following function and parameter to the F5
key in emacs 23, which is currently undefined. This is to save the
buffer layout to be recalled using the lowercase 'w' key:
C-x r w w
That would be the window-configuration-to-register command I
think. I could do something like:
(global-set-key [f5] 'window-configuration-to-register)
But how is the 'w' parameter passed to this command ?
Thanks.
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at
http://ca.toolbar.yahoo.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key with parameter
[not found] <mailman.652.1223525988.25473.help-gnu-emacs@gnu.org>
@ 2008-10-09 6:40 ` Barry Margolin
2008-10-09 13:49 ` Fred Picher
0 siblings, 1 reply; 4+ messages in thread
From: Barry Margolin @ 2008-10-09 6:40 UTC (permalink / raw
To: help-gnu-emacs
In article <mailman.652.1223525988.25473.help-gnu-emacs@gnu.org>,
Fred Picher <frederificc@yahoo.ca> wrote:
> Hello all,
>
> I would like to bind the following function and parameter to the F5
> key in emacs 23, which is currently undefined. This is to save the
> buffer layout to be recalled using the lowercase 'w' key:
>
> C-x r w w
>
> That would be the window-configuration-to-register command I
> think. I could do something like:
>
> (global-set-key [f5] 'window-configuration-to-register)
>
> But how is the 'w' parameter passed to this command ?
You need to write a new Elisp function that calls
window-configuration-to-register with the parameter, and bind the key to
THAT function.
(defun window-config-to-register-w ()
"Store the window configuration in register 'w'."
(interactive)
(window-configuration-to-register ?w))
(global-set-key [f5] 'window-configuration-to-register-w)
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key with parameter
2008-10-09 6:40 ` global-set-key with parameter Barry Margolin
@ 2008-10-09 13:49 ` Fred Picher
0 siblings, 0 replies; 4+ messages in thread
From: Fred Picher @ 2008-10-09 13:49 UTC (permalink / raw
To: help-gnu-emacs
--- On Thu, 10/9/08, Barry Margolin <barmar@alum.mit.edu> wrote:
> From: Barry Margolin <barmar@alum.mit.edu>
> Subject: Re: global-set-key with parameter
> To: help-gnu-emacs@gnu.org
> Received: Thursday, October 9, 2008, 6:40 AM
Hello,
> You need to write a new Elisp function that calls
> window-configuration-to-register with the parameter, and bind
> the key to THAT function.
> (defun window-config-to-register-w ()
> "Store the window configuration in register 'w'."
> (interactive)
> (window-configuration-to-register ?w))
> (global-set-key [f5] 'window-configuration-to-register-w)
Thanks for the help. That sounds quite straightforward
although I do not know any lisp. For this reason I'm a bit lost
when I get the following error message after pressing F5:
Symbol's function definition is void: window-configuration-to-register-w
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at
http://ca.toolbar.yahoo.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: global-set-key with parameter
[not found] <mailman.685.1223560176.25473.help-gnu-emacs@gnu.org>
@ 2008-10-09 14:11 ` harven
0 siblings, 0 replies; 4+ messages in thread
From: harven @ 2008-10-09 14:11 UTC (permalink / raw
To: help-gnu-emacs
Fred Picher <frederificc@yahoo.ca> writes:
> --- On Thu, 10/9/08, Barry Margolin <barmar@alum.mit.edu> wrote:
>
>> From: Barry Margolin <barmar@alum.mit.edu>
>> Subject: Re: global-set-key with parameter
>> To: help-gnu-emacs@gnu.org
>> Received: Thursday, October 9, 2008, 6:40 AM
>
> Hello,
>
>> You need to write a new Elisp function that calls
>> window-configuration-to-register with the parameter, and bind
>> the key to THAT function.
>
>> (defun window-config-to-register-w ()
>> "Store the window configuration in register 'w'."
>> (interactive)
>> (window-configuration-to-register ?w))
>
>>
>(global-set-key [f5] 'window-configuration-to-register-w)
> Thanks for the help. That sounds quite straightforward
> although I do not know any lisp. For this reason I'm a bit lost
> when I get the following error message after pressing F5:
>
> Symbol's function definition is void: window-configuration-to-register-w
This is a typo. The command to be bound to f5 is called
window-config-to-register-w. So, use
(global-set-key [f5] 'window-config-to-register-w)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-09 14:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.652.1223525988.25473.help-gnu-emacs@gnu.org>
2008-10-09 6:40 ` global-set-key with parameter Barry Margolin
2008-10-09 13:49 ` Fred Picher
[not found] <mailman.685.1223560176.25473.help-gnu-emacs@gnu.org>
2008-10-09 14:11 ` harven
2008-10-08 18:32 Fred Picher
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.