* Re-map global key while in the agenda?
@ 2011-02-11 16:47 Nathan Neff
2011-02-11 19:48 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Nathan Neff @ 2011-02-11 16:47 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I have <F3> i mapped to 'org-clock-in and I would also like <F3> i to
clock in while I'm in the agenda.
I have <F3> i bound using global-set-key like this:
(global-set-key (kbd "<f3> i") 'org-clock-in)
And I tried using "define-key" to redefine F3-i in agenda mode
like this:
(add-hook 'org-agenda-mode-hook
'(lambda ()
(define-key org-agenda-mode-map (kbd "<F3> i")
'org-agenda-clock-in)
))
But, when I'm in the agenda, <F3> i is always mapped to 'org-clock-in,
not 'org-agenda-clock-in
Is it possible to redefine a global key mapping in the agenda?
Thanks,
--Nate
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re-map global key while in the agenda?
2011-02-11 16:47 Re-map global key while in the agenda? Nathan Neff
@ 2011-02-11 19:48 ` Bastien
2011-02-11 23:58 ` Bernt Hansen
2011-02-12 17:07 ` Nathan Neff
0 siblings, 2 replies; 5+ messages in thread
From: Bastien @ 2011-02-11 19:48 UTC (permalink / raw)
To: Nathan Neff; +Cc: emacs-orgmode
Hi Nathan,
Nathan Neff <nathan.neff@gmail.com> writes:
> I have <F3> i mapped to 'org-clock-in and I would also like <F3> i to
> clock in while I'm in the agenda.
How is that useful outside an org-mode buffer?
> Is it possible to redefine a global key mapping in the agenda?
No. Better to define your key in org-mode-map and org-agenda-mode-map,
no need for a global key IMHO.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re-map global key while in the agenda?
2011-02-11 19:48 ` Bastien
@ 2011-02-11 23:58 ` Bernt Hansen
2011-02-12 11:02 ` Bastien
2011-02-12 17:07 ` Nathan Neff
1 sibling, 1 reply; 5+ messages in thread
From: Bernt Hansen @ 2011-02-11 23:58 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Bastien <bastien.guerry@wikimedia.fr> writes:
> Hi Nathan,
>
> Nathan Neff <nathan.neff@gmail.com> writes:
>
>> I have <F3> i mapped to 'org-clock-in and I would also like <F3> i to
>> clock in while I'm in the agenda.
>
> How is that useful outside an org-mode buffer?
It's useful with a C-u prefix to pick another task off the recently
clocked items menu. I use this in non-org-mode buffers. I agree that
without the prefix it's not useful outside of org-mode.
-Bernt
>
>> Is it possible to redefine a global key mapping in the agenda?
>
> No. Better to define your key in org-mode-map and org-agenda-mode-map,
> no need for a global key IMHO.
>
> HTH,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Re-map global key while in the agenda?
2011-02-11 23:58 ` Bernt Hansen
@ 2011-02-12 11:02 ` Bastien
0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2011-02-12 11:02 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Hi Bernt,
Bernt Hansen <bernt@norang.ca> writes:
> It's useful with a C-u prefix to pick another task off the recently
> clocked items menu. I use this in non-org-mode buffers.
Then Nathan wants:
(global-set-key (kbd "<f3> i")
(lambda() (interactive) (org-clock-in '(4))))
which doesn't prevent setting the same key for org-agenda-mode-map.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re-map global key while in the agenda?
2011-02-11 19:48 ` Bastien
2011-02-11 23:58 ` Bernt Hansen
@ 2011-02-12 17:07 ` Nathan Neff
1 sibling, 0 replies; 5+ messages in thread
From: Nathan Neff @ 2011-02-12 17:07 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
On Fri, Feb 11, 2011 at 1:48 PM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Nathan,
>
> Nathan Neff <nathan.neff@gmail.com> writes:
>
>> I have <F3> i mapped to 'org-clock-in and I would also like <F3> i to
>> clock in while I'm in the agenda.
>
> How is that useful outside an org-mode buffer?
It's not :0) I started defining shortcut keys using global-set-key
and didn't really think about it.
>
>> Is it possible to redefine a global key mapping in the agenda?
>
> No. Better to define your key in org-mode-map and org-agenda-mode-map,
> no need for a global key IMHO.
Will do -- thanks for the advice.
>
> HTH,
>
> --
> Bastien
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-12 17:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 16:47 Re-map global key while in the agenda? Nathan Neff
2011-02-11 19:48 ` Bastien
2011-02-11 23:58 ` Bernt Hansen
2011-02-12 11:02 ` Bastien
2011-02-12 17:07 ` Nathan Neff
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.