From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: Redefine "M-p" key binding in org-agenda-mode Date: Mon, 29 Oct 2007 09:30:42 -0500 Message-ID: <4725EE92.4060902@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImVdp-00009w-68 for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 10:30:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImVdo-00009T-68 for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 10:30:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImVdo-00009Q-26 for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 10:30:56 -0400 Received: from ik-out-1112.google.com ([66.249.90.176]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ImVdm-0003Yk-EA for emacs-orgmode@gnu.org; Mon, 29 Oct 2007 10:30:55 -0400 Received: by ik-out-1112.google.com with SMTP id c29so788130ika for ; Mon, 29 Oct 2007 07:30:52 -0700 (PDT) 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: emacs-orgmode@gnu.org 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