unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it
@ 2014-03-29  8:07 Tomi Ollila
  2014-03-29  8:07 ` [PATCH 2/2] emacs: add defcustom notmuch-init-file and load it if exists Tomi Ollila
  2014-03-30 22:32 ` [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it David Bremner
  0 siblings, 2 replies; 6+ messages in thread
From: Tomi Ollila @ 2014-03-29  8:07 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-30 22:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29  8:07 [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it Tomi Ollila
2014-03-29  8:07 ` [PATCH 2/2] emacs: add defcustom notmuch-init-file and load it if exists Tomi Ollila
2014-03-30  2:09   ` David Bremner
2014-03-30  7:25   ` Mark Walters
2014-03-30  7:49     ` Tomi Ollila
2014-03-30 22:32 ` [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).