From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846) Date: Tue, 14 May 2024 19:46:38 +0300 Organization: LINKOV.NET Message-ID: <86a5kss5n5.fsf@mail.linkov.net> References: <171558357066.26019.9766615061719600757@vcs2.savannah.gnu.org> <20240513065931.0D83AC12C31@vcs2.savannah.gnu.org> <86v83hwxjs.fsf@mail.linkov.net> <86ikzhq6ja.fsf@mail.linkov.net> <86o798x5hz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , me@eshelyaron.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 14 19:00:25 2024 Return-path: Envelope-to: ged-emacs-devel@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 1s6vVo-00078e-Rq for ged-emacs-devel@m.gmane-mx.org; Tue, 14 May 2024 19:00:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6vV5-0001Qs-Kq; Tue, 14 May 2024 12:59:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6vV3-0001QQ-6K for emacs-devel@gnu.org; Tue, 14 May 2024 12:59:37 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6vV1-0004O1-3N; Tue, 14 May 2024 12:59:36 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 8790EC0002; Tue, 14 May 2024 16:59:28 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Tue, 14 May 2024 09:10:05 -0400") X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319228 Archived-At: >>> +(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." >> >> This new user option should be announced in NEWS. >> >> I also wonder whether it should be a user option, i.e. is it >> reasonable that a user would like all of his/her completions to >> preserve text properties? Stefan, WDYT? > > I can't see how it can make sense as a user-option, no. AFAICT it's > a hack for specific front-ends or specific backends (or combinations > thereof) to work around limitations in the completion API (or maybe Sorry, it was a mistake, it was intended as a counterpart of minibuffer-allow-text-properties that is not a user option. > rather to allow abusing the completion API as a selection API 🙂). Indeed, this value of imenu-flatten can be unambiguous only in case of the Selection API. So completion-allow-text-properties would be useful for users who prefer Selection API to select a candidate with annotation. And for the Completion API another value of imenu-flatten could be added that will add a suffix, so the annotation will be part of the completion candidate string.