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: Line number where eval-after-load is defined in my .emacs file Date: Wed, 13 Nov 2013 21:12:30 +0100 Organization: Sebastien Vauban Message-ID: <867gccnjrl.fsf@somewhere.org> References: <86mwl88d9a.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384373720 16677 80.91.229.3 (13 Nov 2013 20:15:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 20:15:20 +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 Nov 13 21:15:24 2013 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 1VggqN-0000Ly-9s for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 21:15:19 +0100 Original-Received: from localhost ([::1]:50636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VggqM-0003hq-SW for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 15:15:18 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Injection-Info: mx05.eternal-september.org; posting-host="6f05eaee171434c896d44feeaf7179f0"; logging-data="1892"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18zWhWmG7kmlyhKtkZussiU" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:x6XeWpHuPl76W+wQBYLigiMsS3s= sha1:5i8lyb+3svMNBy9mromqvF6O7cY= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:202213 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:94482 Archived-At: Hello William, William G. Gardella wrote: > "Sebastien Vauban" writes: >> >> Is there a way to "link" the messages to the `eval-after-load' blocks in my >> .emacs file by showing the line number where those blocks are defined? >> >> Or is there some other way to get such more or less the same type of >> information? > > This seems analogous to the management problem that one can have after > putting a lot of lambdas which all look alike inside a hook variable. Maybe a > similar solution is warranted. I would rewrite your `eval-after-load' blocks > such that each of them calls one named function (instead of an anonymous > `progn'), which in turn contains all the stuff to be done inside that > `eval-after-load'. That way, when something goes wrong, the backtrace will > name the offending function. I understand you workaround, but I'd prefer to hack `with-eval-after-load', if possible, to give me the information I'm interested in. This would allow me to have a .emacs file with less "fat", and to instantly be able to turn it off/on. So the question boils down to: is it possible to access/save the line number of where the macro is called (in my .emacs file)? Best regards, Seb -- Sebastien Vauban