From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel 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 Message-ID: <83sj21fmo5.fsf@gnu.org> References: <83mxcyuw60.fsf@gnu.org> <87haiiqwiz.fsf@yandex.ru> <83vc6yf8hr.fsf@gnu.org> <5185CB24.5060207@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1367769269 24453 80.91.229.3 (5 May 2013 15:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 May 2013 15:54:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 05 17:54:27 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UZ1Gd-0008Ck-GO for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 17:54:27 +0200 Original-Received: from localhost ([::1]:54906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ1Gd-0000Jc-6Z for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 11:54:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ1Ga-0000JV-GY for emacs-devel@gnu.org; Sun, 05 May 2013 11:54:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZ1GZ-0006Mb-86 for emacs-devel@gnu.org; Sun, 05 May 2013 11:54:24 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:54426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ1GY-0006ML-Vv for emacs-devel@gnu.org; Sun, 05 May 2013 11:54:23 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MMC00D001FO4B00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sun, 05 May 2013 18:53:42 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MMC00CXL1HHY650@a-mtaout20.012.net.il>; Sun, 05 May 2013 18:53:42 +0300 (IDT) In-reply-to: <5185CB24.5060207@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159345 Archived-At: > Date: Sun, 05 May 2013 06:59:48 +0400 > From: Dmitry Gutov > 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?