From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: Nathan Neff <nathan.neff@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Add-hook or org-defkey?
Date: Fri, 4 Feb 2011 09:41:55 -0800 [thread overview]
Message-ID: <AANLkTinR+MGck2qwft9acT0ka11dwoypYupBNpv3qWso@mail.gmail.com> (raw)
In-Reply-To: <AANLkTintDz_yOm14YPYxn38gefddJUOBGp_TEeeBK+E9@mail.gmail.com>
On Fri, Feb 4, 2011 at 9:32 AM, Nathan Neff <nathan.neff@gmail.com> 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.
prev parent reply other threads:[~2011-02-04 17:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 17:32 Add-hook or org-defkey? Nathan Neff
2011-02-04 17:41 ` suvayu ali [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinR+MGck2qwft9acT0ka11dwoypYupBNpv3qWso@mail.gmail.com \
--to=fatkasuvayu+linux@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nathan.neff@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).