unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* line number of the point?
@ 2003-11-21 10:00 Miguel Frasson
  2003-11-21 10:26 ` Jesper Harder
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Frasson @ 2003-11-21 10:00 UTC (permalink / raw)



Hello

How do I discover the number of the current line (for use in a function)?
If I am running line-number-mode, is there a way to get it from there?
(some variable)?

Thanks.

Miguel.


-- 
Miguel Vinicius Santini Frasson
http://www.math.leidenuniv.nl/~frasson

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: line number of the point?
  2003-11-21 10:00 line number of the point? Miguel Frasson
@ 2003-11-21 10:26 ` Jesper Harder
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Harder @ 2003-11-21 10:26 UTC (permalink / raw)


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))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-21 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-21 10:00 line number of the point? Miguel Frasson
2003-11-21 10:26 ` Jesper Harder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).