From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Add-hook or org-defkey? Date: Fri, 4 Feb 2011 09:41:55 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=51467 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlPkK-0006yR-7i for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:47:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlPkJ-0001py-1D for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:46:59 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:44830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlPkI-0001pu-Sg for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 12:46:58 -0500 Received: by bwz16 with SMTP id 16so3001944bwz.0 for ; Fri, 04 Feb 2011 09:46:57 -0800 (PST) In-Reply-To: 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: Nathan Neff Cc: emacs-orgmode On Fri, Feb 4, 2011 at 9:32 AM, Nathan Neff wrote: > I've seen both of these methods used to define/re-define keys > in org-agenda mode: > > --------------- hook-way ------------------------- > (add-hook 'org-agenda-mode-hook > =A0 =A0 =A0 =A0 =A0 =A0 '(lambda () > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(define-key org-agenda-mode-map "w" 'org-a= genda-refile) > )) > > --------------- another way ---------------- > > (org-defkey org-agenda-mode-map "w" 'org-agenda-refile) > > Is there an advantage to using one way versus the other? > > Seems like the second way is simpler. As far as I know if you are using the proper keymap (as in this case), there is no difference. I would prefer the 2nd way. > > Thanks, > --Nate --=20 Suvayu Open source is the future. It sets us free.