From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39379: 27.0.60; Fix for #38457 broke ido-vertical-mode Date: Tue, 04 Feb 2020 17:40:18 +0200 Message-ID: <83k152gy3h.fsf@gnu.org> References: <83a762k9p2.fsf@gnu.org> <71c2898c-aca7-ea92-e7d2-f4fd122b566d@gmail.com> <83ftfthsqs.fsf@gnu.org> <83d0awj42l.fsf@gnu.org> <83a760j23r.fsf@gnu.org> <838slkj0mk.fsf@gnu.org> <17d792bd-c96f-0440-7127-5308cc34f158@gmail.com> <83y2tjhe6l.fsf@gnu.org> <4b167bc3-0240-cb51-a004-6d9e1a84d0a4@yandex.ru> <83pnevghgp.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82596"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39379@debbugs.gnu.org, wyuenho@gmail.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 04 16:41:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iz0K6-000LNN-6L for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Feb 2020 16:41:10 +0100 Original-Received: from localhost ([::1]:60530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iz0K5-0002ex-5s for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Feb 2020 10:41:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51564) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iz0Jz-0002er-0A for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2020 10:41:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iz0Jy-0003Hu-03 for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2020 10:41:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iz0Jx-0003Gq-SR for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2020 10:41:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iz0Jx-0002o4-QZ for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2020 10:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Feb 2020 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39379 X-GNU-PR-Package: emacs Original-Received: via spool by 39379-submit@debbugs.gnu.org id=B39379.158083083810752 (code B ref 39379); Tue, 04 Feb 2020 15:41:01 +0000 Original-Received: (at 39379) by debbugs.gnu.org; 4 Feb 2020 15:40:38 +0000 Original-Received: from localhost ([127.0.0.1]:44599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iz0Ja-0002nL-Bi for submit@debbugs.gnu.org; Tue, 04 Feb 2020 10:40:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iz0JY-0002n7-Su for 39379@debbugs.gnu.org; Tue, 04 Feb 2020 10:40:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iz0JT-00080N-9L; Tue, 04 Feb 2020 10:40:31 -0500 Original-Received: from [176.228.60.248] (port=4494 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iz0JP-000088-1Q; Tue, 04 Feb 2020 10:40:29 -0500 In-reply-to: (message from Dmitry Gutov on Tue, 4 Feb 2020 16:19:05 +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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175667 Archived-At: > Cc: 39379@debbugs.gnu.org, wyuenho@gmail.com > From: Dmitry Gutov > Date: Tue, 4 Feb 2020 16:19:05 +0300 > > On 04.02.2020 6:27, Eli Zaretskii wrote: > > > I think this is for ido.el to do: it is ido.el that puts the cursor on > > the overlay string, so it is up to it to make sure the cursor can be > > put where it puts the 'cursor' property. It's a simple change: if the > > text to be displayed starts with a newline, prepend a SPC to it when > > defining the after-string. > > But... the change in ido-vertical-mode is simpler still: just add an > extra argument to concat. That's true, but AFAIU the problem is not limited to ido-vertical-mode, it will happen whenever the string to display starts with a newline. Such a string is entirely legitimate, isn't it? And the caller cannot possibly know that ido-exhibit will put the 'cursor' property on the first character of that text. So I think it isn't entirely reasonable to expect such callers to defend themselves against internal implementation details of ido-exhibit. > If we do that in ido.do, the reason why would be fairly non-obvious from > that code. If the test for the leading newline is there, the reason is quite obvious, and we can have a comment for those who don't know enough about the 'cursor' property and cursor positioning. I think the result will more obvious than a mysterious concatenation of a blank in ido-vertical-mode, which will need a comment explaining it as well.