[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Middle of the DOCUMENT?
From: |
Kai Großjohann |
Subject: |
Re: Middle of the DOCUMENT? |
Date: |
Sun, 02 Mar 2003 13:05:26 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (i686-pc-linux-gnu) |
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> How do you define `middle of buffer'? WRT characters or to lines?
>
> (defun rs-middle-of-buffer-chars ()
> "Move point to middle of current buffer wrt characters."
> (interactive)
> (goto-char (/ (- (point-max) (point-min)) 2)))
>
> (defun rs-middle-of-buffer-lines ()
> "Move point to middle of current buffer wrt lines."
> (interactive)
> (goto-line (/ (count-lines (point-max) (point-min)) 2)))
Another idea would be to go to the middle char, then to beginning of
line. It seems kind of intuitive to move to the beginning of a
line. But maybe it's just my strange thinking... ;-)
--
A preposition is not a good thing to end a sentence with.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Middle of the DOCUMENT?,
Kai Großjohann <=