From: Tomi Ollila Date: Sat, 29 Mar 2014 08:07:58 +0000 (+0200) Subject: [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9c856f6d6156b2365fb67caad6474575bdf47822;p=notmuch-archives.git [PATCH 1/2] emacs: instruct user to autoload notmuch instead of require'ing it --- diff --git a/30/c0be50660d5adb0c5f9e421ac7760c954ed764 b/30/c0be50660d5adb0c5f9e421ac7760c954ed764 new file mode 100644 index 000000000..cc581f3d6 --- /dev/null +++ b/30/c0be50660d5adb0c5f9e421ac7760c954ed764 @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 26004431FBF + for ; Sat, 29 Mar 2014 01:08:14 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id QIhRMsjm6ndm for ; + Sat, 29 Mar 2014 01:08:10 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 9DE1C431FAF + for ; Sat, 29 Mar 2014 01:08:10 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 2116B1000F2; Sat, 29 Mar 2014 10:08:04 +0200 (EET) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: instruct user to autoload notmuch instead of + require'ing it +Date: Sat, 29 Mar 2014 10:07:58 +0200 +Message-Id: <1396080479-19161-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 29 Mar 2014 08:08:14 -0000 + +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 +