emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Add-hook or org-defkey?


From: suvayu ali
Subject: Re: [Orgmode] Add-hook or org-defkey?
Date: Fri, 4 Feb 2011 09:41:55 -0800

On Fri, Feb 4, 2011 at 9:32 AM, Nathan Neff <address@hidden> 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
>             '(lambda ()
>                (define-key org-agenda-mode-map "w" 'org-agenda-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

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]