unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>, Eshel Yaron <me@eshelyaron.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846)
Date: Tue, 14 May 2024 15:26:54 +0000	[thread overview]
Message-ID: <SJ0PR10MB548806CD745417DC122D8E2DF3E32@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <86ikzhq6ja.fsf@mail.linkov.net>

> Here is a new variable that helps to disambiguate completions with
> the same name but different annotations by using text properties:

> (defcustom completion-allow-text-properties nil
>   "Non-nil means `choose-completion' should not
> discard text properties.
> This also affects `completing-read' and any of the
> functions that do
> minibuffer input with completion."
>  :type 'boolean :version "30.1" :group 'completion)
___

FWIW, since 2008 Icicles has had this feature.

I tried several times, unsuccessfully, to
persuade vanilla Emacs to add it, i.e., to
allow the result of completion to keep text
properties, unless a user option says to
strip them.

IOW, the default behavior in Icicles is
to _keep_, not to remove, text properties.

Emacs should do the same, in order to, as
you say, let code "disambiguate completions
with the same name".  Hard to believe this
hasn't even been possible till now, let
alone been done by default.
___

`icicle-unpropertize-completion-result-flag' is a variable
defined in `icicles-opt.el'.

Its value is nil

Documentation:

Non-nil means strip text properties from the completion result.
Set or bind this option to non-nil only if you need to ensure, for
some other library, that the string returned by `completing-read' and
`read-file-name' has no text properties.

Typically, you will not use a non-nil value.  Internal text properties
added by Icicles are always removed anyway.  A non-nil value lets you
also remove properties such as `face'.
___

As for whether a user option is appropriate: yes.
But I don't take the view that no code should
ever bind a user option.



      parent reply	other threads:[~2024-05-14 15:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171558357066.26019.9766615061719600757@vcs2.savannah.gnu.org>
     [not found] ` <20240513065931.0D83AC12C31@vcs2.savannah.gnu.org>
2024-05-13  9:22   ` master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846) Eshel Yaron
2024-05-13 16:30     ` Juri Linkov
2024-05-14  6:08       ` Juri Linkov
2024-05-14  6:38         ` Eli Zaretskii
2024-05-14 13:10           ` Stefan Monnier
2024-05-14 16:46             ` Juri Linkov
2024-05-14 20:58             ` Daniel Mendler via Emacs development discussions.
2024-05-14 23:26               ` FW: [External] : " Drew Adams
2024-05-15 16:51           ` Juri Linkov
2024-05-15 18:03             ` Eli Zaretskii
2024-05-15 18:30             ` Eshel Yaron
2024-05-16  6:08               ` Juri Linkov
2024-05-16  9:51                 ` Eli Zaretskii
2024-05-17  6:48                   ` Juri Linkov
2024-05-17 15:36                     ` Stefan Monnier
2024-05-17 16:43                       ` Juri Linkov
2024-05-18 15:12                         ` Stefan Monnier
2024-05-20  6:46                           ` Juri Linkov
2024-05-27 18:18                             ` Juri Linkov
2024-05-14 15:26         ` Drew Adams [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=SJ0PR10MB548806CD745417DC122D8E2DF3E32@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=me@eshelyaron.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).