all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 39379@debbugs.gnu.org, wyuenho@gmail.com
Subject: bug#39379: 27.0.60; Fix for #38457 broke ido-vertical-mode
Date: Tue, 04 Feb 2020 17:40:18 +0200	[thread overview]
Message-ID: <83k152gy3h.fsf@gnu.org> (raw)
In-Reply-To: <f4fe3bdf-8273-d7ee-6e18-3b9df2ddb6cb@yandex.ru> (message from Dmitry Gutov on Tue, 4 Feb 2020 16:19:05 +0300)

> Cc: 39379@debbugs.gnu.org, wyuenho@gmail.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> 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.





  reply	other threads:[~2020-02-04 15:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 23:53 bug#39379: 27.0.60; Fix for #38457 broke ido-vertical-mode Jimmy Yuen Ho Wong
2020-02-01  8:12 ` Eli Zaretskii
2020-02-02 13:58   ` Jimmy Yuen Ho Wong
2020-02-02 16:13     ` Eli Zaretskii
2020-02-02 17:23       ` Eli Zaretskii
2020-02-02 18:06         ` Eli Zaretskii
2020-02-02 18:38           ` Eli Zaretskii
2020-02-02 21:33             ` Jimmy Yuen Ho Wong
2020-02-03  3:21               ` Eli Zaretskii
2020-02-03 13:19               ` Dmitry Gutov
2020-02-03 15:40                 ` Eli Zaretskii
2020-02-03 21:51                   ` Dmitry Gutov
2020-02-04  3:27                     ` Eli Zaretskii
2020-02-04 13:19                       ` Dmitry Gutov
2020-02-04 15:40                         ` Eli Zaretskii [this message]
2020-02-04 23:55                           ` Dmitry Gutov
2020-02-05  3:36                             ` Eli Zaretskii
2020-02-10 15:44           ` Eli Zaretskii
2020-02-11 23:42             ` Dmitry Gutov
2020-02-12 18:18               ` Eli Zaretskii
2020-02-12 18:24                 ` Dmitry Gutov
2020-02-12 19:42                   ` Eli Zaretskii
2020-03-03 14:02                   ` 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

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

  git send-email \
    --in-reply-to=83k152gy3h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39379@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=wyuenho@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.