[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] add interactive browse of revisions from vc *Annotate* buffe

From: Stefan Monnier
Subject: Re: [patch] add interactive browse of revisions from vc *Annotate* buffers
Date: 20 Jan 2004 10:32:32 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> I'm a bit puzzled by your function vc-current-line.  I must admit that
>> I'm totally clueless in this area, but is there really no simpler way to
>> determine this?

No.  In Emacs, we use chars rather than lines usually.
I think his patch should be changed to not use lines but use chars instead,
so it'll be simpler.  After all, char positions are just as likely to be
more-or-less correct than line positions.  Or you could preserve
"relative position in the file"
(/ (- (point) (point-min)) (- (point-max) (point-min))) instead.

>> Surely, this problem must have occured elsewhere already.

Of course: it's just not very frequent, so counting lines every once in
a while seems to work well enough.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]