unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <83sj21fmo5.fsf@gnu.org> (raw)
In-Reply-To: <5185CB24.5060207@yandex.ru>

> Date: Sun, 05 May 2013 06:59:48 +0400
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: emacs-devel@gnu.org
> 
> >> 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	other threads:[~2013-05-05 15:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2hb361p8e.fsf@ibookg4-c2.pc.gwdg.de>
     [not found] ` <E1RGADD-0008JI-Ht@fencepost.gnu.org>
     [not found]   ` <m28voi1iqe.fsf@ibookg4-c2.pc.gwdg.de>
     [not found]     ` <83mxcyuw60.fsf@gnu.org>
2013-05-04 21:12       ` bug#9782: 24.0.90; move-to-window-line not taking header line into account Dmitry Gutov
2013-05-05  2:47         ` Eli Zaretskii
2013-05-05  2:59           ` Dmitry Gutov
2013-05-05 15:53             ` Eli Zaretskii [this message]
2013-05-06  3:38               ` Dmitry Gutov
2013-05-06 16:38                 ` Eli Zaretskii
2013-05-07  1:26                   ` Dmitry Gutov
2013-05-07  2:54                     ` Eli Zaretskii
2013-05-07  7:41                       ` Dmitry Gutov
2013-05-07 16:50                         ` Eli Zaretskii
2013-05-07 17:19                           ` Dmitry Gutov
2014-08-15 23:33                             ` Dmitry Gutov
2014-08-16  8:03                               ` Eli Zaretskii
2014-08-16  8:27                                 ` Dmitry Gutov
2014-08-16 11:12                                   ` Eli Zaretskii
2014-08-19  4:51                                     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sj21fmo5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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