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

2011-02-04 Thread suvayu ali
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
>             '(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.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Add-hook or org-defkey?

2011-02-04 Thread Nathan Neff
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.

Thanks,
--Nate

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode