From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: How to delay loading of packages (when eval-after-load does not apply)? Date: Wed, 15 Aug 2012 21:22:32 +0200 Organization: Sebastien Vauban Message-ID: <804no4c64n.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345063757 21702 80.91.229.3 (15 Aug 2012 20:49:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2012 20:49:17 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Wed Aug 15 21:25:19 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T1jDS-0005E5-S9 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 21:25:18 +0200 Original-Received: from localhost ([::1]:35893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1jDR-0005wm-S9 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 15:25:17 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Injection-Info: mx04.eternal-september.org; posting-host="5da807328d6a3351ee2b595083918cf6"; logging-data="15325"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX19U/n3N9zgH7q9jwyz6w9F4" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt) X-Url: Under construction... X-Archive: encrypt Cancel-Lock: sha1:fz2/rRduc4gu0YkPhrIlHzkKJ/4= sha1:Lwo9mVv3aknLLmN8HYv9mrkHSxw= Original-Xref: usenet.stanford.edu gnu.emacs.help:193988 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:86357 Hello, In the sake of trying to load my .emacs in less than 20-25 seconds (the current situation), I'm trying to optimize when things must be loaded. For example, to save time, I want the fuzzy package to be loaded when it will be needed for the first time. The only way I found was: #+begin_src emacs-lisp ;; fuzzy matching utilities (a must-have) (when (locate-library "fuzzy") (eval-after-load "isearch" '(progn (require 'fuzzy) (turn-on-fuzzy-isearch)))) #+end_src ... but, as isearch must be loaded internally (where?) at startup, my eval-after-load is useless in fact: fuzzy is loaded as well at startup time. How could I say: load fuzzy when I will make a search for the first time? Best regards, Seb -- Sebastien Vauban