[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-f
From: |
Eli Zaretskii |
Subject: |
Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846) |
Date: |
Thu, 16 May 2024 12:51:45 +0300 |
> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Monnier
> <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
> Date: Thu, 16 May 2024 09:08:21 +0300
>
> >> +*** New variable 'completion-allow-text-properties'.
> >> +Like non-nil 'minibuffer-allow-text-properties' that doesn't discard
> >> +text properties, it does the same by keeping text properties
> >> +on the selected completion candidate. So when these two variables
> >> +both are non-nil then 'completing-read' returns a selected completion
> >> +with the initial text properties kept intact.
> >
> > Note that when minibuffer-allow-text-properties is non-nil, you can
> > already get the same original text properties from completing-read if
> > you "select" your candidate by cycling, since that doesn't go through
> > choose-completion which strips text properties. It feels a bit
> > surprising to have this separate variable that affects one kind of
> > selection ("choosing") and not other kinds ("cycling", "expanding").
> > IMO, it'd be better, if possible, to just cease stripping text
> > properties in choose-completion altogether. Note that choose-completion
> > calls completion--replace to do the actual insertion, and that function
> > already respects minibuffer-allow-text-properties.
>
> I agree that a new variable is unnecessary, so it would be better just
> to preserve text properties in choose-completion unconditionally.
> Unless there are objections this looks like the right thing to do.
Does that mean completion candidates will always appear with their
original text properties? If so, I don't think it's TRT in all cases.
Whether it's TRT depends on the use case, so a variable definitely
seems like the way to go.
However, AFAIU Eshel didn't mean to say we should always preserve text
properties, he said we already have a variable to indicate whether
properties are to be preserved. So the issue, AFAIU, is whether we
need _another_ variable, or should use a single one in both cases.
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), (continued)
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/14
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Eli Zaretskii, 2024/05/14
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Stefan Monnier, 2024/05/14
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/14
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Daniel Mendler, 2024/05/14
- FW: [External] : Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Drew Adams, 2024/05/14
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/15
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Eli Zaretskii, 2024/05/15
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Eshel Yaron, 2024/05/15
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/16
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846),
Eli Zaretskii <=
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/17
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Stefan Monnier, 2024/05/17
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/17
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Stefan Monnier, 2024/05/18
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/20
- Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Juri Linkov, 2024/05/27
- RE: [External] : Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846), Drew Adams, 2024/05/14