From mboxrd@z Thu Jan  1 00:00:00 1970
Path: main.gmane.org!not-for-mail
From: Jesper Harder <harder@myrealbox.com>
Newsgroups: gmane.emacs.help
Subject: Re: line number of the point?
Date: Fri, 21 Nov 2003 11:26:31 +0100
Organization: http://purl.org/harder/
Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Message-ID: <m3ad6qggq0.fsf@defun.localdomain>
References: <gyn0aq9h37.fsf@enquist.math.leidenuniv.nl>
NNTP-Posting-Host: deer.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: sea.gmane.org 1069415887 14537 80.91.224.253 (21 Nov 2003 11:58:07 GMT)
X-Complaints-To: usenet@sea.gmane.org
NNTP-Posting-Date: Fri, 21 Nov 2003 11:58:07 +0000 (UTC)
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 12:58:04 2003
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Original-Received: from hermes.netfonds.no ([80.91.224.195])
	by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 1AN9vI-0004wk-00
	for <geh-help-gnu-emacs@gmane.org>; Fri, 21 Nov 2003 12:58:04 +0100
Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173])
	by hermes.netfonds.no (8.12.8p1/8.12.8) with ESMTP id hALBw0bg031716
	for <geh-help-gnu-emacs@m.gmane.org>; Fri, 21 Nov 2003 12:58:00 +0100 (CET)
Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1AN9kR-0004hD-Lv
	for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Nov 2003 06:46:51 -0500
Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail
Original-Newsgroups: gnu.emacs.help
X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r;
	<N5ksn~%wJ@2pjF}="tV; FBsdpFarSWA<oYkZsViGf:F^SD-KXhvFxh;
	~]?)SWm~+u}; 0=x}<vOm&5J+?]yB2d]q4x8\0g7SX
Mail-Copies-To: never
User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)
Cancel-Lock: sha1:+sQAgCo2m0WZJhIvdJ8CHsnPfHE=
Original-Lines: 12
Original-NNTP-Posting-Host: 195.215.224.171
Original-X-Trace: 1069410608 dtext01.news.tele.dk 30085 195.215.224.171:47480
Original-X-Complaints-To: abuse@post.tele.dk
Original-Xref: shelby.stanford.edu gnu.emacs.help:118527
Original-To: help-gnu-emacs@gnu.org
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Users list for the GNU Emacs text editor  <help-gnu-emacs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
X-Netfonds-MailScanner-Information: Please contact the postmaster@netfonds.no if you need more information
X-Netfonds-MailScanner: looks clean
Xref: main.gmane.org gmane.emacs.help:14469
X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14469

Miguel Frasson <frasson@enquist.math.leidenuniv.nl> writes:

> How do I discover the number of the current line (for use in a
> function)?

The Emacs Lisp Manual has this example:

(defun current-line ()
  "Return the vertical position of point..."
  (+ (count-lines (window-start) (point))
     (if (= (current-column) 0) 1 0)
     -1))