From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup Date: Thu, 22 Jun 2017 17:55:02 +0300 Message-ID: <83o9tgul6h.fsf@gnu.org> References: <611468a0-3115-813a-7347-d0c06e155831@web.de> <83vanrx5uo.fsf@gnu.org> <362a7d18-7f05-2e99-f8b3-41c353cf234f@yandex.ru> <83h8zawvih.fsf@gnu.org> <00f59a24-2d80-ca47-b6f3-3d219aa5aa3f@yandex.ru> <8360fqvz9x.fsf@gnu.org> <6aa4616d-79f7-db1b-c048-076a9a48596f@yandex.ru> <83tw39urzq.fsf@gnu.org> <4c4b873b-2bec-1c12-82f5-325b558bea93@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1498143377 3214 195.159.176.226 (22 Jun 2017 14:56:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Jun 2017 14:56:17 +0000 (UTC) Cc: alexanderm@web.de, 27427@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 22 16:56:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dO3Wj-0000II-DM for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jun 2017 16:56:09 +0200 Original-Received: from localhost ([::1]:59506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO3Wm-00039g-Pw for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jun 2017 10:56:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO3Wg-00039Q-KD for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2017 10:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO3Wc-0000Fp-Hl for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2017 10:56:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58861) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dO3Wc-0000Fe-En for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2017 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dO3Wc-0006cl-8r for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2017 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jun 2017 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27427 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27427-submit@debbugs.gnu.org id=B27427.149814332025413 (code B ref 27427); Thu, 22 Jun 2017 14:56:02 +0000 Original-Received: (at 27427) by debbugs.gnu.org; 22 Jun 2017 14:55:20 +0000 Original-Received: from localhost ([127.0.0.1]:33305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dO3Vv-0006bo-QM for submit@debbugs.gnu.org; Thu, 22 Jun 2017 10:55:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dO3Vu-0006bd-E4 for 27427@debbugs.gnu.org; Thu, 22 Jun 2017 10:55:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO3Vl-0008IF-0Y for 27427@debbugs.gnu.org; Thu, 22 Jun 2017 10:55:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO3Vk-0008IB-Tk; Thu, 22 Jun 2017 10:55:08 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dO3Vk-0002zA-4a; Thu, 22 Jun 2017 10:55:08 -0400 In-reply-to: <4c4b873b-2bec-1c12-82f5-325b558bea93@yandex.ru> (message from Dmitry Gutov on Thu, 22 Jun 2017 01:41:15 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133819 Archived-At: > Cc: alexanderm@web.de, 27427@debbugs.gnu.org > From: Dmitry Gutov > Date: Thu, 22 Jun 2017 01:41:15 +0300 > > On 6/21/17 9:15 PM, Eli Zaretskii wrote: > > Or do you just assume the column there is > > zero? > > Yep! And there are zero outstanding bug reports related to this. Well, except this one ;-) > > What I had in mind is to come up with a solution that will work the > > same with line-prefix specified in any way we support. Then you won't > > need to put the line-prefix property on the company overlay. > > I'm saying it's not easy, and I'm not brimming with ideas. Is it not easy because the assumption about column-zero is hard-coded in many places? Or for some other reason? > Can't we put native line numbering outside of the window bounds? Like > linum and nlinum do. Keeping the numbers out of the margins was my explicit design goal, because some packages want the margins, and we don't have a good solution for "sharing" margins. So from my POV putting the numbers in the margins would be a step backward. It will probably also create major havoc for the few packages that do display in the margins, because Emacs facilities for layout of text and other stuff there are exceedingly limited. > IIUC we've settled on using chromeless frames for the popup. It seems > Martin is cooking something in this direction (almost ready?), but I > haven't tried using them. And that would take some work. Not sure what you mean by "chromeless" here, but if I understand you correctly, Martin's work is already on master. > 1. The first visual line containing the popup has the line number at its > beginning. And as such, the popup line is shifted to the right. That's the "BOL at non-zero column" issue, right? > 2. The rest don't have the line numbers before them, so they are > positioned correctly. This may or may not be considered a problem > (there's probably nothing we can do about the lack of numbers), but the > inconsistency between the different popup lines seems like it would > require some special handling in the code. The lack of numbers is a "feature", I think: only "physical" lines in buffer text are counted, newlines in overlay and display strings do not count. Can you artificially offset the beginning of the overlay to account for the line numbers, and see if that alone solves the problem of the first lines, and doesn't cause problems in the subsequent lines? Thanks.