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: Interesting problem: eval-after-load and local variables Date: Tue, 16 Oct 2012 10:02:06 +0200 Organization: Sebastien Vauban Message-ID: <80y5j6etfl.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1350374719 11658 80.91.229.3 (16 Oct 2012 08:05:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2012 08:05:19 +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 Tue Oct 16 10:05:26 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 1TO29R-0002b5-9P for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Oct 2012 10:05:21 +0200 Original-Received: from localhost ([::1]:39855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO29K-0000IF-49 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Oct 2012 04:05:14 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2"; logging-data="10664"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX1+UNmijK3XXNhqkRaY9GQSH" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:798Wa/Z6DkVmx6QHJFxFNtArUlU= sha1:G8J8vlljxfAPSxbL+UFv8I3irDU= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:194951 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:87281 Archived-At: Hello, In order to speed up my Emacs startup, I've put many customizations in eval-after-load's, such as: --8<---------------cut here---------------start------------->8--- (eval-after-load "time-stamp" '(progn ;; format of the string inserted by `M-x time-stamp' (setq time-stamp-format "%:y-%02m-%02d %3a %02H:%02M %u"))) --8<---------------cut here---------------end--------------->8--- in order to avoid the require itself in the .emacs file. Now, this causes a problem, as my local variable customizations aren't respected anymore. For example, I have the following local vars in my file `common.sty' to set= up the format of the time-stamp (=C3=A0 la LaTeX): --8<---------------cut here---------------start------------->8--- %% common.sty -- LaTeX common commands and environments \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{common}[2012/10/15 v1.0 Common stuff between documents and= presentations] % ... %% End of package \endinput % very last line % Local Variables: % time-stamp-format: "%:y/%02m/%02d" % time-stamp-start: "Provides\\(Class\\|Package\\){[a-zA-Z-]+}\\[" % time-stamp-end: " " % End: --8<---------------cut here---------------end--------------->8--- The problem is the following: - Upon opening the file, Emacs sees it needs to load time-stamp. - It does it (via the predefined autoloads), but the eval-after-load overri= des the local variables' value. - When saving the file, the time-stamp format provided in local vars is NOT applied. In a way, that's perfectly normal. In another, not at all: I would expect t= he local vars to win over the wide values, in any configuration (even if my se= tq were in an eval-after-load construct). What do you think? Best regards, Seb --=20 Sebastien Vauban