From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Redefine "M-p" key binding in org-agenda-mode Date: Mon, 29 Oct 2007 17:00:29 +0100 Message-ID: References: <4725EE92.4060902@gmail.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImYB5-000410-Iq for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 13:13:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImYB0-0003v7-0R for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 13:13:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImYAz-0003uy-Cw for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 13:13:21 -0400 Received: from nf-out-0910.google.com ([64.233.182.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ImX2Z-0000iM-Ph for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 12:00:36 -0400 Received: by nf-out-0910.google.com with SMTP id f5so1501545nfh for ; Mon, 29 Oct 2007 09:00:34 -0700 (PDT) In-Reply-To: <4725EE92.4060902@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Wanrong Lin Cc: emacs-orgmode@gnu.org 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