When (require 'notmuch) is added to ~/.emacs notmuch is loaded to every instance of emacs although it may not be used in majority of those instances. When (autoload 'notmuch "notmuch" ...) is added to ~/.emacs notmuch is loaded (only) when user invokes the notmuch function. User may want to add other entrypoints to notmuch by adding more autoloads -- the autoload instruction given should offer them clue how to do so. --- This borrows models from emacs, gnus & erc (at least). I've been dogfooding this for 2 months now, by just loading my "global" notmuch config from ~/.emacs.d/notmuch-config.el instead of autoloading that file. I'd like to move the contents of my "site-specific" configuration files here in the future... README | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 3a003ad..d92fcfd 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ the libnotmuch library. Notmuch installs a full-featured email interface for use within emacs. To use this, first add the following line to your .emacs file: - (require 'notmuch) + (autoload 'notmuch "notmuch" "Notmuch mail" t) Then, either run "emacs -f notmuch" or execute the command "M-x notmuch" from within a running emacs. diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 7dec273..34a3b3c 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -36,7 +36,7 @@ ;; ;; Then, to actually run it, add: ;; -;; (require 'notmuch) +;; (autoload 'notmuch "notmuch" "Notmuch mail" t) ;; ;; to your ~/.emacs file, and then run "M-x notmuch" from within emacs, ;; or run: -- 1.8.0