From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bernardo Newsgroups: gmane.emacs.help Subject: Re: print line numbe Date: Sun, 29 Sep 2013 12:08:51 +1000 Message-ID: <52478BB3.2060306@pobox.com> References: <87y56gbes2.fsf@newsguy.com> Reply-To: bernardo.bacic@pobox.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1380420559 861 80.91.229.3 (29 Sep 2013 02:09:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 02:09:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 04:09:20 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 1VQ6Rj-0005nB-78 for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 04:09:19 +0200 Original-Received: from localhost ([::1]:43138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ6Ri-0006Iz-6E for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 22:09:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ6RS-0006Hw-OU for help-gnu-emacs@gnu.org; Sat, 28 Sep 2013 22:09:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQ6RL-0006eG-E1 for help-gnu-emacs@gnu.org; Sat, 28 Sep 2013 22:09:02 -0400 Original-Received: from pecan2.exetel.com.au ([220.233.0.70]:49484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ6RL-0006e5-3L for help-gnu-emacs@gnu.org; Sat, 28 Sep 2013 22:08:55 -0400 Original-Received: from 33.111.70.115.static.exetel.com.au ([115.70.111.33] helo=[192.168.1.10]) by pecan2.exetel.com.au with esmtp (Exim 4.71) (envelope-from ) id 1VQ6RH-0003jc-BM for help-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:08:51 +1000 User-Agent: Thunderbird 2.0.0.24 (X11/20100228) In-Reply-To: <87y56gbes2.fsf@newsguy.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.233.0.70 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:93734 Archived-At: It was a dark and stormy night when Harry Putnam said (29/09/13 11:25): > How can I make a piece of elisp report the line number when it prints > a message? > > Something along the line of the __LINE__ operator in perl, > or the $LINENO operator in shell-scripting. > > Something like: > > (message "Hello from line: " something-that-reports-line-number) > > > (message (format "Hello from line: %d" (line-number-at-pos)))