From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup Date: Sun, 25 Jun 2017 17:31:59 +0300 Message-ID: <8ec1b301-79dc-7d11-b3f9-85ae2e925785@yandex.ru> 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> <83o9tgul6h.fsf@gnu.org> <49b431fd-aaa4-e7ca-06fc-7146a0a5692c@yandex.ru> <83a84zul0d.fsf@gnu.org> <513eca6f-998a-a937-76c4-7cf2fb0ff787@yandex.ru> <83wp81u8rz.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1498401199 7535 195.159.176.226 (25 Jun 2017 14:33:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 14:33:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 Cc: alexanderm@web.de, 27427@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 25 16:33:14 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 1dP8b8-0001R5-JZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 16:33:10 +0200 Original-Received: from localhost ([::1]:42787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8bC-0006bT-8I for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 10:33:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8b3-0006au-VJ for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:33:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP8b0-0000ug-Rh for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:33:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dP8b0-0000uY-NP for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dP8b0-0007JU-EH for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jun 2017 14:33: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.149840112928038 (code B ref 27427); Sun, 25 Jun 2017 14:33:02 +0000 Original-Received: (at 27427) by debbugs.gnu.org; 25 Jun 2017 14:32:09 +0000 Original-Received: from localhost ([127.0.0.1]:37410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dP8a9-0007IA-0C for submit@debbugs.gnu.org; Sun, 25 Jun 2017 10:32:09 -0400 Original-Received: from mail-wr0-f180.google.com ([209.85.128.180]:33990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dP8a8-0007Hy-3A for 27427@debbugs.gnu.org; Sun, 25 Jun 2017 10:32:08 -0400 Original-Received: by mail-wr0-f180.google.com with SMTP id 77so121448110wrb.1 for <27427@debbugs.gnu.org>; Sun, 25 Jun 2017 07:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/IIO4YSoVA31KoU1SqozWreBiga5qcSCoCZRZ8l3LKU=; b=Aj1Tkt6P4J/NAA5mIChjwLC0CcC1iQ9ZjdEVt3A7nHrVtJmdfbb1gdBGna0psgJdAD 1eel5CWUNu7lPtlnF+UCc3V/dzudK1mExdZoSixtsaYsN/7bKMGXBMurIrw2a1wYssol 8cDe4COWExBMQmNBxZZt74KrhDg7ifrfuPMcRPTvUbSpFattbUXqDzynz6LHsZhXyCFR O4m7G3VcN0giiT3UBld9+YDwdXYFUWNuZQETN0WwPea6zUpYgW0Hh3m/w/IsTa4ngBgs BwuOneBlJoXSLKbIh7e3oz3CNv3icsDF1Pn1uxs4ZGDusnNciInNOQbmLnU6nglSeD28 xy0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/IIO4YSoVA31KoU1SqozWreBiga5qcSCoCZRZ8l3LKU=; b=KWfJ4tZvnpVJYwbaS95zELDLPDFkyHPoY+1lpFUmeOaaKu80N3qvQqQjJTVyI3cUPA Yj+iSB1v9rlQImbxZ8jqDCOB437+jCw3lenXk1TTGmWjBDkZfOBXUWqZyUQoDUp378ZL E+ZgDNasIex+mZCtWNzLThT5IRhG/ITkIF070GOv4nEYb9WGEchDlj49lDGhPQZX0x07 zYQre9+byU259n/xLyMDAK0Oqb8+DN0zibgn2epKQqU7MrU7xxG9uEnA21WwzoB+LaQG VIAqULuOYDvF53TPteia6U/vyPOvZCTkROpHsqe7tUuuQR/i9zA8xjjp3ioaDAgfjCuv x5XA== X-Gm-Message-State: AKS2vOz/U1kXbvjsHQGm6R7C8WG8nC5++c8JkRmoKNj4cmclvug4Qs2a +CM7TWfnMcROAU68N/E= X-Received: by 10.28.147.202 with SMTP id v193mr10588257wmd.37.1498401122088; Sun, 25 Jun 2017 07:32:02 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id 80sm8864817wmg.17.2017.06.25.07.32.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jun 2017 07:32:01 -0700 (PDT) In-Reply-To: <83wp81u8rz.fsf@gnu.org> Content-Language: en-US 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:133876 Archived-At: On 6/24/17 10:47 AM, Eli Zaretskii wrote: > I guess you were just lucky, because in all of the other cases the > additional horizontal shift was somehow either accounted for or (in > the case of overlay-arrow) non-existent. But the principle still > stands: the display engine is allowed to insert glyphs it invents out > of thin air at the edges of the text area, and Emacs always made use > of this. Try as I might, I can't repro those kind of problems. Line wrap indicators in the terminal usually come at the right. And I think it's aesthetically important that the extra glyphs don't shift line text to the right unless absolutely necessary, so those issues don't materialize. The choice to use one overlay instead of one-overlay-per-line also makes some problems easier. Anyway, naturally, a proper popup will be better. > It will only break modes that assume too much about layout. And given > the popularity of the line numbers, there's no other practical way > except adapt those add-on packages, starting from company-mode. I think you're trying too hard to stay away from the margins. But anyway, we have the alternative solution now. >> I'm saying the users seem willing to wait for a scalable solution, and >> use a margin in the meantime. > > I think you have it backwards: the margin-based solutions were tried > and were found not to be scalable. I don't see you contradicting me. The _current_ margin-based solutions are not scalable in terms of margin-using features, but they can be, when we work on that. And the users seem willing to wait for that. >> I can try to outline a possible API. Do we have an existing bug report >> where that discussion would be better placed? > > Bug#24193. > >> If you have a link to a previous discussion, that would be great as well. > > Here's one (I think there were more): > > http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01171.html > > FWIW, I don't recommend going in that direction, as I believe we will > again bump into the same basic disagreements due to conflicting goals. > That's why I decided to stay away of the margins in the first place. Thanks! I think I have something to contribute. But TBH the use case in the emacs-devel thread is ridiculous. We should be able to provide the functionality offered in the API of common IDEs, and if that doesn't let someone to use the margins as the fill-column, too bad. It still might, but we can't consider all use cases equally valid. >> And isn't counting lines in Lisp considered too slow? > > When done as part of routine redisplay, off the post-command-hook, > yes. But company-mode is not used during routine redisplay, as in > during scrolling through the window, right? It's using post-command-hook, though. Redoing the line numbers rendering is not something I'm looking forward to either. > But that was only one of my goals, the other was to do in > the infrastructure something that can be done well only there. Meaning, to use something other than the margins for display? >> Agreed that it's the right direction (although I wouldn't say no to a >> popup library in the core either ;-). Would it help in non-graphical >> mode, though? Does it support non-maximized frames? > > AFAIU, it supports any kind of frame. I can't see a way to create a less-than-fullscreen frame in terminal Emacs (speaking of normal frames here).