From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Question about completion behavior Date: Sun, 13 Mar 2022 19:50:56 +0100 Message-ID: <20220313185056.h5xm6b26zrltn7ty@Ergus> References: <87lexiiqnk.fsf@yahoo.com> <20220310102157.wmmn7bkkdbux7aug@Ergus> <8735jqhxdr.fsf@yahoo.com> <20220310140331.xa53sex6wywkr56l@Ergus> <86ee39r69o.fsf@mail.linkov.net> <20220312001752.stzknhydiep6nsxn@Ergus> <8635jn81wt.fsf@mail.linkov.net> <20220313112108.j3lvtnvgybo7em65@Ergus> <86pmmpahdm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2375"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 13 19:53:39 2022 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 1nTTLW-0000UI-O2 for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 19:53:38 +0100 Original-Received: from localhost ([::1]:45840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTTLV-00060X-Jj for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 14:53:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTTJf-0004j0-Df for emacs-devel@gnu.org; Sun, 13 Mar 2022 14:51:43 -0400 Original-Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]:39286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTTJd-0006vt-Dx for emacs-devel@gnu.org; Sun, 13 Mar 2022 14:51:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1647197499; bh=1ttI77IjAdO0bQ4IADgQXSUKj5GkP7eVcQCg7FU+dcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=Jo7suINaMVlH1AQhakHUPVLt/F4Hei2dCfxInRlrbh34xh5c52uC9JNx4hc5QIUejJyVIikDTfDIHWFsZhWzKGiuveA/8wOyc7q7D/l6alCyTT3S3/96Z2FmPiT8k4rfNW15E32q2YxC7XgNmwWhFL5PMHYR8vh9OlhiFdNtdiU3NJWI8xiWUOd6vZRJgJArlCEFomNrlxZay9/Z1kzTF+BANMaix6yyz50v7dVb3LlccSPbVK8u3ms/xBXlgxBmDvE7nkciyyOQvPl8RYbc+l6+ok6vuZYTpCQP1D/DFZPJo5bnpoxsmLZaFupDzg0UUQ3iUeQ27jIbrDmC6nzA9Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1647197499; bh=kqvcIkXhkanQnDiFxBEWOzgHvrgMoVaOxIwhF775wc8=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=LkU03535fO6VOuxZnIaow2Rs8adVFUuPtpK8T6C2kgtd3ZD4rQP9mv0bKn5Omr9n71nKwAB7VeuyayUfsBuGb9p7k84Js3rZnSP/X3ZPsbeeL81GJZEXRlBJQ3/l+F8qRBeEvkgSBQXzSmC1ecAG+94JzL7E+laf4kpboHl+ZNsPv0GLpfmvVOKstWBoB9aH5CNgURxjEI0PCR/usv8s4ADc1VeC/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com with HTTP; Sun, 13 Mar 2022 18:51:39 +0000 Original-Received: by kubenode510.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7dbcb1716eb75b476a53b727f86f5ee0; Sun, 13 Mar 2022 18:51:35 +0000 (UTC) Content-Disposition: inline In-Reply-To: <86pmmpahdm.fsf@mail.linkov.net> X-Mailer: WebService/1.1.19878 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.131.124; envelope-from=spacibba@aol.com; helo=sonic311-14.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:287084 Archived-At: On Sun, Mar 13, 2022 at 07:44:49PM +0200, Juri Linkov wrote: >>> Maybe better to have the whole string with all text properties >>> as the default value of 'completion-header-text-property-list' >>> that then could be renamed to e.g. 'completion-header-string'? >>> >> I don't know a simple way for creating a string with the properties in a >> single call. We may need a sort of wrapper function that initializes >> the string and call set properties in a single call otherwise the user >> may need to do it manually... Something like: >> >> (defun make-text-with-properties (string properties) >> (let ((out string)) >> (set-text-properties ...) >> out)) >> >> Any better idea? > >Something like > > (defvar completion-header-format > (propertize "%s possible completions:" > 'face 'shadow > :help "Please select a completion") > "Format of completion header.") > Interesting... I couldn't find the propertize function in the text property section of the manual... Done. >> The other detail is that there are 2 strings: "Possible completions are" >> and "There are no possible completions of what you have typed." > >In case of no completions it will be formatted to: "0 possible completions". > I am perfectly fine with that I was just wondering is anyone will complain just becaus the previous message changed. >>> Regarding 'completion-lazy-count': it would be even better to allow >>> customization of this format like in 'icomplete-matches-format' >>> that was recently added in 28.1. >>> >> Probably the best is to join the two variables in >> completion-header-string and allow it to have a %s for a count... I will >> go in that way. >> >> Is it OK? > >It's OK, like above. Thanks, please check/correct it.