* Redefine "M-p" key binding in org-agenda-mode
@ 2007-10-29 14:30 Wanrong Lin
2007-10-29 16:00 ` Carsten Dominik
2007-10-29 16:07 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Wanrong Lin @ 2007-10-29 14:30 UTC (permalink / raw)
To: emacs-orgmode
Hi,
In my org-mode configuration, I bind globally "M-p" to "org-agenda" (the
default "C-a" is already used of something else). A problem of that is,
I often press "M-p" inside the agenda buffer, trying to bring up the
agenda command dispatch buffer, which actually changes the priority of a
task. I tried to rebind this key to "org-agenda" by the following in
org-agenda-mode-hook:
(define-key org-agenda-mode-map (kbd "M-p") 'org-agenda)
But the above key binding only works when the cursor is on a date line,
not a task line. On a task line, the old "priority-up" binding is still
effective.
Can anybody show me how I can change that? Thanks a lot.
Wanrong
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Redefine "M-p" key binding in org-agenda-mode
2007-10-29 14:30 Redefine "M-p" key binding in org-agenda-mode Wanrong Lin
@ 2007-10-29 16:00 ` Carsten Dominik
2007-10-29 16:07 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2007-10-29 16:00 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
On 29Oct2007, at 3:30 PM, Wanrong Lin wrote:
> Hi,
>
> In my org-mode configuration, I bind globally "M-p" to "org-
> agenda" (the default "C-a" is already used of something else). A
> problem of that is, I often press "M-p" inside the agenda buffer,
> trying to bring up the agenda command dispatch buffer, which
> actually changes the priority of a task. I tried to rebind this key
> to "org-agenda" by the following in org-agenda-mode-hook:
>
> (define-key org-agenda-mode-map (kbd "M-p") 'org-agenda)
>
> But the above key binding only works when the cursor is on a date
> line, not a task line. On a task line, the old "priority-up"
> binding is still effective.
You need to bind the key in both org-agenda-map and in org-agenda-
keymap.
The first one is the overall keymap, the second is the map in regions
with a mouse face, i.e. in all tasks.
- Carsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Redefine "M-p" key binding in org-agenda-mode
2007-10-29 14:30 Redefine "M-p" key binding in org-agenda-mode Wanrong Lin
2007-10-29 16:00 ` Carsten Dominik
@ 2007-10-29 16:07 ` Bastien
2007-10-29 16:20 ` Carsten Dominik
1 sibling, 1 reply; 5+ messages in thread
From: Bastien @ 2007-10-29 16:07 UTC (permalink / raw)
To: emacs-orgmode
Wanrong Lin <wanrong.lin@gmail.com> writes:
> In my org-mode configuration, I bind globally "M-p" to "org-agenda"
I think that binding `M-p' *globally* is a bad idea.
`M-p' is the default keybinding in GNU Emacs when you need to navigate
thru minibuffer history. In Org, it is used for example when you want
to see the previous link in stored links.
> (define-key org-agenda-mode-map (kbd "M-p") 'org-agenda)
>
> But the above key binding only works when the cursor is on a date line,
> not a task line. On a task line, the old "priority-up" binding is still
> effective.
What version of Org are you using?
AFAIK (kbd "M-p") is not associated to any keymap in latest Org.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Redefine "M-p" key binding in org-agenda-mode
2007-10-29 16:07 ` Bastien
@ 2007-10-29 16:20 ` Carsten Dominik
2007-10-29 17:53 ` Wanrong Lin
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2007-10-29 16:20 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
On 29Oct2007, at 5:07 PM, Bastien wrote:
> Wanrong Lin <wanrong.lin@gmail.com> writes:
>
>> In my org-mode configuration, I bind globally "M-p" to "org-agenda"
>
> I think that binding `M-p' *globally* is a bad idea.
>
> `M-p' is the default keybinding in GNU Emacs when you need to navigate
> thru minibuffer history. In Org, it is used for example when you want
> to see the previous link in stored links.
>
>> (define-key org-agenda-mode-map (kbd "M-p") 'org-agenda)
>>
>> But the above key binding only works when the cursor is on a date
>> line,
>> not a task line. On a task line, the old "priority-up" binding is
>> still
>> effective.
>
> What version of Org are you using?
>
> AFAIK (kbd "M-p") is not associated to any keymap in latest Org.
It is when you use org-replace-disputed-keys.
- Carsten
>
> --
> Bastien
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Redefine "M-p" key binding in org-agenda-mode
2007-10-29 16:20 ` Carsten Dominik
@ 2007-10-29 17:53 ` Wanrong Lin
0 siblings, 0 replies; 5+ messages in thread
From: Wanrong Lin @ 2007-10-29 17:53 UTC (permalink / raw)
To: org-mode list
Thanks for your help.
You are right that my key binding probably is not optimal, but I am
already used to it (I used to use planner-mode, and M-p is easy to
remember). I bind other keys to replace the default M-p function. It is
a little bit messy now, but that is what I love about Emacs, you can
make it suit your own needs. :-) When people ask me what is so great
about Emacs, I generally agree with them that Emacs is really not that
great out of box, but with customization, it can streamline your own
work flow, just for you.
Wanrong
Carsten Dominik wrote:
>
> On 29Oct2007, at 5:07 PM, Bastien wrote:
>
>> Wanrong Lin <wanrong.lin@gmail.com> writes:
>>
>>> In my org-mode configuration, I bind globally "M-p" to "org-agenda"
>>
>> I think that binding `M-p' *globally* is a bad idea.
>>
>> `M-p' is the default keybinding in GNU Emacs when you need to navigate
>> thru minibuffer history. In Org, it is used for example when you want
>> to see the previous link in stored links.
>>
>>> (define-key org-agenda-mode-map (kbd "M-p") 'org-agenda)
>>>
>>> But the above key binding only works when the cursor is on a date line,
>>> not a task line. On a task line, the old "priority-up" binding is still
>>> effective.
>>
>> What version of Org are you using?
>>
>> AFAIK (kbd "M-p") is not associated to any keymap in latest Org.
>
> It is when you use org-replace-disputed-keys.
>
> - Carsten
>
>>
>> --
>> Bastien
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-29 17:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 14:30 Redefine "M-p" key binding in org-agenda-mode Wanrong Lin
2007-10-29 16:00 ` Carsten Dominik
2007-10-29 16:07 ` Bastien
2007-10-29 16:20 ` Carsten Dominik
2007-10-29 17:53 ` Wanrong Lin
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.