From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Select completions from the minibuffer Date: Tue, 22 Mar 2022 15:38:20 +0200 Message-ID: <837d8mf6pf.fsf@gnu.org> References: <86v8wlprc0.fsf@mail.linkov.net> <874k454n84.fsf@gnus.org> <86ilslmvql.fsf@mail.linkov.net> <87v8wl35wg.fsf@gnus.org> <86k0d06dik.fsf@mail.linkov.net> <87ee3714li.fsf@gnus.org> <86r1773sb4.fsf@mail.linkov.net> <87pmmquew4.fsf@gnus.org> <86h7817mj4.fsf@mail.linkov.net> <87ilsgx5fx.fsf@gnus.org> <86bkxz3y1h.fsf@mail.linkov.net> <875yo7p0hh.fsf@gnus.org> <86v8w675un.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, spacibba@aol.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 22 14:39:29 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 1nWejR-0008P9-EK for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 14:39:29 +0100 Original-Received: from localhost ([::1]:34498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWejQ-0005np-6i for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 09:39:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWeiY-00057J-KI for emacs-devel@gnu.org; Tue, 22 Mar 2022 09:38:34 -0400 Original-Received: from [2001:470:142:3::e] (port=37710 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWeiY-0005w9-9m; Tue, 22 Mar 2022 09:38:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rkGx4CHU7JW/BjF3EwgoHnawTgdkkheRFjbEsfdda3Q=; b=Q3a6gPl3FR/A QIFfVfu4pRchpy95odnH8JsAI0NpamkNrafeWaTTVGnQL54BjOQzlnuxY+e46tBZxTIK/oIEaWWvL MZaIvzd/F9w2KxggQKLyMrDf/+5GtrRlttxRv+CLPtt/4BasDM+GbZ0fjHC3kHNSSpr+Pm58VHi7I S4C3KP74SrBtkazFTR2du7BPcXfSUYQgIvKEdchgQtba0VZFzZn5HUO/3qWwB9owChea2B6IqmohW tIluUuu8ESRLaklxxT3y3Alq2dLWEc8RojcNb5mAZt402o944xSBUIgVeqY+GdwLFevoPtsd84+wW rli3B6RyWMpViIum5DQeiw==; Original-Received: from [87.69.77.57] (port=4127 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWeiX-0001Yn-Px; Tue, 22 Mar 2022 09:38:34 -0400 In-Reply-To: <86v8w675un.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 22 Mar 2022 10:24:00 +0200) 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:287353 Archived-At: > From: Juri Linkov > Date: Tue, 22 Mar 2022 10:24:00 +0200 > Cc: Ergus , emacs-devel@gnu.org > > >> Since Ergus finished implementing new features in the > >> feature/completions-customs branch (and I fixed small things > >> like renaming completion-header-format to completions-header-format), > >> the branch is ready for merging to master now. After that > >> we could add more patches based on new features. > > > > Sounds good to me. > > So now the branch is merged to master. Thanks Ergus for implementing > these features. Thanks, but please see some questions/comments below, and either fix them or explain what you meant so that I could fix them: If @code{completion-auto-help} is set to @code{nil}, the completion commands never display the completion list buffer; you must type -@kbd{?} to display the list. If the value is @code{lazy}, Emacs only +@kbd{?} to display the list. If the value is @code{lazy}, Emacs only shows the completion list buffer on the second attempt to complete. In other words, if there is nothing to complete, the first @key{TAB} echoes @samp{Next char not unique}; the second @key{TAB} shows the -completion list buffer. +completion list buffer. With the previous values and the default What are those "previous values" which you mention here? +@code{t} the completions are hidden when some unique completion is +executed. What do you mean by "unique completion is executed"? Both the "unique" and the "executed" parts need clarification. If @code{completion-auto-help} is set to @code{always}, the +completion commands are always shown after a completion attempt, or "Commands"? didn't you mean "candidates" or "alternatives"? (The same problem exists in the doc string of this variable, btw.) +updated if they are already visible. If the value is @code{visible}, +then completions are not hidden, but updated if they are already +visible while the current behavior stays the same as default if they +are not. I think the last sentence should be reworded as follows: If the value is @code{visible}, Emacs displays completion the completion alternatives when it is unable to complete for the first time; thereafter the completion list buffer remains visible and is updated as you type. Is this accurate and correct? +@vindex completions-header-format +The variable @code{completions-header-format} is a formatted string to +control the informative line shown before the completions list of +candidates. It may contain a @code{%s} to show the total number of +completions. When it is @code{nil}, the message is totally suppressed. +Text properties may be added to change the appearance, some useful +ones are @code{face} or @code{cursor-intangible} (@pxref{Special +Properties,,Properties with Special Meanings, elisp, The Emacs Lisp +Reference Manual}). Shouldn't this have a cross-reference to where header-line-format is described? This variable determines the format of the header-line shown in the window that displays the *Completions* buffer, right? So knowing what can be used in header-line-format should be useful. +@vindex completions-highlight-face +When @code{completions-highlight-face} is a face name, then the Saying "face name" might mislead people to think this is a string. It is better to say "If the value of this variable is a face, ..." Also, I'd lose "then": it's redundant here. +current completion candidate will be highlighted with that face. The +default value is @code{completions-highlight}. When the value is +@code{nil}, no highlighting is performed. This feature sets the text +property @code{cursor-face}. This should explain what is "the current completion candidate". It isn't trivial: trying the current defaults with completion commands, I sometimes see a candidate highlighted, and sometimes don't. I couldn't figure out why. +@item cursor-face +@kindex cursor-face @r{(text property)} +This property is similar to @code{mouse-face}, but the face is used if +the cursor (instead of mouse) is on or near the character. ^^^^^^^^^ Which character? There's no reference to "characters" in the preceding text, so this is confusing. I suggest something like when point is inside text which has this face