From: Ergus <spacibba@aol.com>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org, Juri Linkov <juri@linkov.net>
Subject: Re: master 15ac51e0fd: Merge branch 'feature/completions-customs'
Date: Tue, 22 Mar 2022 18:05:00 +0100 [thread overview]
Message-ID: <20220322170500.ogpzw3lusul3l6cp@Ergus> (raw)
In-Reply-To: <87mthijpyc.fsf@yahoo.com>
On Tue, Mar 22, 2022 at 05:28:59PM +0800, Po Lu wrote:
>Juri Linkov <juri@jurta.org> writes:
>
>> +(defcustom completions-header-format
>> + (propertize "%s possible completions:\n"
>> + 'face 'shadow
>> + :help "Please select a completion")
>> + "Format of completions header.
>> +It may contain one %s to show the total count of completions.
>> +When nil, no header is shown."
>> + :type '(choice (const :tag "No header" nil)
>> + (string :tag "Header format string"))
>> + :version "29.1")
>
>IHMO this should be off by default. It wastes a line of space in the
>completions buffer for no real gain, and it's distracting.
>
The header was already there so no new space
wasted... completion-show-help is nil in my system... I didn't add it to
the modeline to make it simpler...
BUT: we could add a completions-header-format special value 'modeline
and then show there the count of completions... I am not interested at
all because in my system y hide the mode-line for completions....
>Also, I don't know which part of this change causes the following
>behavior, but if I say M-x and then press TAB twice, the item at the
>start of the window displaying the completions buffer becomes
>highlighted, even though it isn't selected. That should also be off by
>default, since it's an unnecessary visual distraction.
>
Ok I think I know... I haven't observed this before...
The completions-highlight-mode relies on the new cursor-face that shows
the highlight when the cursor is over the text...
It seems that when M-x <tab> <tab>
according to completion--in-region-1 the second <tab> scrolls the
Completions buffer, so the cursor goes to the start of the screen after
the scroll, as there is a candidate, that's why you see it
highlighted...
I suggest two solutions here:
1) Not enable cursor-face-highlight-nonselected-window for
completions... this will disable the highlight whenever the Completions
window is not the active one...
2) Extend the highlight to consider cursor-in-non-selected-windows and
set it to nil in Completions by default...
The first is the simples one, but will fore the Juri's code to
setq-local the variable in a hook or in his function wrapper...
So just tell what do you prefer...
>Thanks.
>
next prev parent reply other threads:[~2022-03-22 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164793742180.2038.4306130819331318764@vcs2.savannah.gnu.org>
[not found] ` <20220322082342.60DC3C051F4@vcs2.savannah.gnu.org>
2022-03-22 9:28 ` master 15ac51e0fd: Merge branch 'feature/completions-customs' Po Lu
2022-03-22 13:35 ` Lars Ingebrigtsen
2022-03-22 15:52 ` [External] : " Drew Adams
2022-03-23 1:00 ` Po Lu
2022-03-22 17:05 ` Ergus [this message]
2022-03-23 1:02 ` Po Lu
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=20220322170500.ogpzw3lusul3l6cp@Ergus \
--to=spacibba@aol.com \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=luangruo@yahoo.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).