* Re: Middle of the DOCUMENT?
[not found] ` <v9el5rdwd1.fsf@marauder.physik.uni-ulm.de>
@ 2003-03-02 12:05 ` Kai Großjohann
0 siblings, 0 replies; only message in thread
From: Kai Großjohann @ 2003-03-02 12:05 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-02 12:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <2ilm00rqgr.fsf@kite.ssc.wisc.edu>
[not found] ` <v9el5rdwd1.fsf@marauder.physik.uni-ulm.de>
2003-03-02 12:05 ` Middle of the DOCUMENT? Kai Großjohann
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).