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: Re: How to delay loading of packages (when eval-after-load does notapply)? Date: Fri, 17 Aug 2012 12:07:58 +0200 Organization: Sebastien Vauban Message-ID: <80pq6pygox.fsf@somewhere.org> References: <804no4c64n.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345198215 2382 80.91.229.3 (17 Aug 2012 10:10:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 10:10:15 +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 Fri Aug 17 12:10:16 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 1T2JVP-0002Nk-7z for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 12:10:15 +0200 Original-Received: from localhost ([::1]:35100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2JVN-0005H0-R1 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 06:10:13 -0400 Original-Received: by 10.180.105.38 with SMTP id gj6mr281304wib.0.1345198078900; Fri, 17 Aug 2012 03:07:58 -0700 (PDT) Original-Path: usenet.stanford.edu!yt1no20744121wib.1!news-out.google.com!n2ni174117400win.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!feeds.phibee-telecom.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2"; logging-data="30027"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX1+ms6Qnj3iDi+wb45ej5Kv7" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:QJUYBBYa/pTGzLmMMT7klF4FJMY= sha1:V/dYfpvVvJhH5A7fnSdmA6PAVbw= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:194023 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:86391 Archived-At: Hi Drew, "Drew Adams" wrote: >> How could I say: load fuzzy when I will make a search for the >> first time? > > Try `isearch-mode-hook' with `require'. Did you mean this? --8<---------------cut here---------------start------------->8--- ;; fuzzy matching utilities (a must-have) (add-hook 'isearch-mode-hook #'(lambda () (require 'fuzzy))) (eval-after-load "fuzzy" (turn-on-fuzzy-isearch)) --8<---------------cut here---------------end--------------->8--- I did the above, restarted Emacs and got: Symbol's function definition is void: turn-on-fuzzy-isearch I don't understand why my `eval-after-load' is executed directly... Am I missing something? Best regards, Seb PS- BTW, is there a better choice to be made between --8<---------------cut here---------------start------------->8--- (add-hook 'isearch-mode-hook #'(lambda () ... --8<---------------cut here---------------end--------------->8--- and --8<---------------cut here---------------start------------->8--- (add-hook 'isearch-mode-hook (lambda () ... --8<---------------cut here---------------end--------------->8--- ? -- Sebastien Vauban