emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#9782: 24.0.90; move-to-window-line not taking header line into a


From: Eli Zaretskii
Subject: Re: bug#9782: 24.0.90; move-to-window-line not taking header line into account
Date: Sun, 05 May 2013 18:53:30 +0300

> Date: Sun, 05 May 2013 06:59:48 +0400
> From: Dmitry Gutov <address@hidden>
> CC: address@hidden
> 
> >> Simply adjusting the row number for presence of `header-line-format'
> >> won't do, because company strives to support Emacs 23 (and maybe even
> >> 22), and `post-actual-col-row' behavior was different before the
> >> revision 106022.
> >
> > Why is that a problem to have special code for specific Emacs
> > versions?
> 
> It's ugly, for one thing.

Working around a bug is frequently not pretty.

> But it's a seemingly reasonable piece of code, it worked, and your 
> change made it break in some peculiar special case important to some 
> users.

That's not true.  It was not a peculiar special case. The function did
not behave according to its contract, and my change fixed that.

> So I thought you could suggest how that code could be written 
> better/faster/stronger instead.

Well, how about telling more about what you need to do, and in
particular why do you need to go to the place you go by row and
column?  Why not use posn-point, for example?  For that matter, why
not use buffer positions directly?  It seems to me you take a buffer
position, convert it to row and column, then use that to get to the
buffer position, is that right?  If you need the beginning and end of
the line that includes point, that is easy to get in any number of
ways, without ever calculating the row number.

What am I missing?



reply via email to

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