From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Line number where eval-after-load is defined in my .emacs file Date: Wed, 13 Nov 2013 17:09:47 -0500 Message-ID: References: <86mwl88d9a.fsf@somewhere.org> <86mwl8m2un.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384380632 1758 80.91.229.3 (13 Nov 2013 22:10:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 22:10:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 13 23:10:37 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 1Vgidw-0003vX-SJ for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 23:10:36 +0100 Original-Received: from localhost ([::1]:51024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgidw-0005Nx-7X for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 17:10:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgidV-0005Cd-KB for help-gnu-emacs@gnu.org; Wed, 13 Nov 2013 17:10:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgidO-0000Vm-4D for help-gnu-emacs@gnu.org; Wed, 13 Nov 2013 17:10:09 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgidN-0000Ue-UH for help-gnu-emacs@gnu.org; Wed, 13 Nov 2013 17:10:02 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VgidK-0003Bi-I0 for help-gnu-emacs@gnu.org; Wed, 13 Nov 2013 23:09:58 +0100 Original-Received: from 108.175.230.244 ([108.175.230.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Nov 2013 23:09:58 +0100 Original-Received: from monnier by 108.175.230.244 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Nov 2013 23:09:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 15 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 108.175.230.244 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:6Qn+GvQrRpidWFqD/kyghgDB7U0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94484 Archived-At: > I tried using the more "standard" function (defined in simple.el) > `line-number-at-pos', but that gives the same problem. That's because the current-buffer is *scratch* (or some other such buffer), rather than being a buffer that holds the contents of the .emacs file. > I'm sure what I ask (to access/save the line number of where the macro > is called) is possible, but there's something I clearly miss in the > macro stuff... In some situations, there's a way, indeed, but it's tricky/unreliable. Stefan