From: Ergus <spacibba@aol.com>
To: jixiuf <jixiuf@139.com>
Cc: emacs-devel@gnu.org
Subject: Re: feature/icomplete-vertical
Date: Mon, 14 Sep 2020 09:08:20 +0200 [thread overview]
Message-ID: <20200914070820.b354xzoargbibeez@Ergus> (raw)
In-Reply-To: <8BBE93B6-922E-44EF-B7A4-6A82C4F1DE3A@139.com>
On Mon, Sep 14, 2020 at 02:44:59PM +0800, jixiuf wrote:
>
>
>> 2020年9月12日 下午9:33,Ergus <spacibba@aol.com> 写道:
>>
>> On Sat, Sep 12, 2020 at 01:10:57PM +0000, Gregory Heytings wrote:
>>>
>>>>
>>>>> If there was a built-in vertical mode it would be better / more intuitive.
>>>>
>>>> Could you try the branch feature/icomplete-vertical? I need some testers before adding it to master.
>>>>
>>>
>>> Alas no, I have been using the following to have icomplete-vertical for quite some time, it works perfectly well, so I don't see why a more complex implementation would be necessary.
>>>
>>> (setq icomplete-prospects-height 6)
>>> (setq icomplete-separator "\n")
>>> (defun icomplete-vertical-minibuffer-setup ()
>>> (setq truncate-lines t)
>>> (setq-local completion-ignore-case t)
>>> (setq-local read-file-name-completion-ignore-case t)
>>> (setq-local read-buffer-completion-ignore-case t)
>>> (setq icomplete-hide-common-prefix nil))
>>> (add-hook 'icomplete-minibuffer-setup-hook #'icomplete-vertical-minibuffer-setup)
>>> (defun icomplete-vertical-reformat-completions (completions)
>>> (save-match-data
>>> (let ((cnp (substring-no-properties completions)))
>>> (if (string-match "^\\((.*)\\|\\[.+\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}" cnp)
>>> (format "%s \n%s"
>>> (or (match-string 1 cnp) "")
>>> (replace-regexp-in-string "^" (make-string (current-column) ? ) (match-string 2 cnp)))
>>> cnp))))
>>> (defun icomplete-vertical-adjust-minibuffer-height (completions)
>>> (let* ((comp (icomplete-vertical-reformat-completions completions))
>>> (complen (length (split-string comp "\n"))))
>>> (if (> complen 1) (enlarge-window (- icomplete-prospects-height (1- (window-height)))))
>>> comp))
>>> (advice-add 'icomplete-completions :filter-return #'icomplete-vertical-adjust-minibuffer-height)
>>
>> 1) Internal functionalities try not to use advises.
>> 2) The branch is not actually more complex, it just generates the
>> formatted vertical output form the beginning.
>> 3) It does more or less the same you are doing but with a simpler
>> config:
>>
>> (icomplete-mode t)
>> (icomplete-format 'vertical)
>>
>> 4) We add arrow bindings to move
>> 5) Add completion matching faces is also coming.
>>
>
>Some feedback about branch : feature/icomplete-vertical
>
>I tried this branch with config:
>
> (icomplete-mode 1)
> (setq icomplete-format 'vertical)
>
>
>
>And found this bug still exists:
>
>https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293
>https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39379
>
>Some related links about how to work around this bug:
>
>https://www.reddit.com/r/emacs/comments/fswt7c/using_icomplete_vertically/fm86m0q?utm_source=share&utm_medium=web2x&context=3
>https://www.reddit.com/r/emacs/comments/fswt7c/using_icomplete_vertically/fm8z6h0?utm_source=share&utm_medium=web2x&context=3
>
>Hope the problem of disappearing prompt and entered text problem can be fixed in your branch.
>
>
Hi:
I can't reproduce https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293
with this config.
emacs -Q
(icomplete-mode 1)
(setq icomplete-format 'vertical)
The prompt is not disappearing for me. Is there some other
indication/config missing?
next prev parent reply other threads:[~2020-09-14 7:08 UTC|newest]
Thread overview: 118+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 13:10 feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-12 13:33 ` feature/icomplete-vertical Ergus
2020-09-12 14:30 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-14 6:44 ` feature/icomplete-vertical jixiuf
2020-09-14 7:08 ` Ergus [this message]
2020-09-14 15:02 ` feature/icomplete-vertical Ergus
2020-09-14 17:13 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-14 17:31 ` feature/icomplete-vertical Ergus
2020-09-16 15:22 ` feature/icomplete-vertical jixiuf
[not found] ` <20200918005354.muskx2b7tssyqzzk@Ergus>
2020-09-18 3:08 ` feature/icomplete-vertical jixiuf
2020-09-18 11:58 ` feature/icomplete-vertical Ergus
2020-09-18 17:05 ` feature/icomplete-vertical Ergus
2020-09-18 19:52 ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 10:55 ` feature/icomplete-vertical João Távora
2020-09-20 13:04 ` feature/icomplete-vertical Ergus
2020-09-20 13:15 ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 13:37 ` feature/icomplete-vertical Ergus
2020-09-20 14:07 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 14:28 ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 15:04 ` feature/icomplete-vertical Ergus
2020-09-20 15:54 ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 16:13 ` feature/icomplete-vertical Ergus
2020-09-20 17:09 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 17:43 ` feature/icomplete-vertical Eli Zaretskii
2020-10-01 16:48 ` feature/icomplete-vertical Ergus
2020-10-02 4:45 ` feature/icomplete-vertical jixiuf
2020-10-03 2:13 ` feature/icomplete-vertical Ergus
2020-10-04 23:47 ` feature/icomplete-vertical João Távora
2020-10-05 4:48 ` feature/icomplete-vertical Ergus
2020-10-05 9:06 ` feature/icomplete-vertical João Távora
2020-10-05 12:23 ` feature/icomplete-vertical Ergus
2020-10-05 12:28 ` feature/icomplete-vertical João Távora
2020-10-05 12:52 ` feature/icomplete-vertical Ergus
2020-10-05 5:45 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 9:13 ` feature/icomplete-vertical João Távora
2020-10-05 9:46 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 9:57 ` feature/icomplete-vertical João Távora
2020-10-05 10:11 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 10:52 ` feature/icomplete-vertical João Távora
2020-10-05 11:00 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:11 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:33 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:48 ` feature/icomplete-vertical João Távora
2020-10-05 17:59 ` feature/icomplete-vertical martin rudalics
2020-10-05 18:24 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:24 ` feature/icomplete-vertical João Távora
2020-10-05 11:45 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:54 ` feature/icomplete-vertical João Távora
2020-10-05 12:05 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:07 ` feature/icomplete-vertical João Távora
2020-10-05 13:25 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:03 ` feature/icomplete-vertical João Távora
2020-10-05 19:12 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:19 ` feature/icomplete-vertical João Távora
2020-10-05 19:30 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:36 ` feature/icomplete-vertical João Távora
2020-10-05 11:02 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:32 ` feature/icomplete-vertical João Távora
2020-10-05 11:54 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:58 ` feature/icomplete-vertical João Távora
2020-10-05 12:02 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 12:07 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 12:25 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 12:33 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:19 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 13:44 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:14 ` feature/icomplete-vertical João Távora
2020-10-05 19:24 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:32 ` feature/icomplete-vertical João Távora
2020-10-06 6:16 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:44 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 19:49 ` feature/icomplete-vertical João Távora
2020-10-06 6:20 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:13 ` feature/icomplete-vertical Stefan Monnier
2020-10-05 7:52 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 8:22 ` feature/icomplete-vertical Manuel Uberti
2020-10-05 9:40 ` feature/icomplete-vertical João Távora
2020-10-05 10:53 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 14:49 ` feature/icomplete-vertical Ergus
2020-09-20 15:46 ` feature/icomplete-vertical Eli Zaretskii
2020-09-18 21:39 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-18 23:27 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 1:59 ` feature/icomplete-vertical Ergus
2020-09-19 4:03 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 6:15 ` feature/icomplete-vertical Ergus
2020-09-19 8:35 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 10:30 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 11:19 ` feature/icomplete-vertical Ergus
2020-09-19 11:56 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 12:57 ` feature/icomplete-vertical Ergus
2020-09-19 11:43 ` feature/icomplete-vertical Ergus
2020-09-19 13:00 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 13:42 ` feature/icomplete-vertical Ergus
2020-09-19 15:35 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 13:59 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 14:43 ` feature/icomplete-vertical Ergus
2020-09-19 15:37 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 15:49 ` feature/icomplete-vertical Ergus
2020-09-19 16:01 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 16:05 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 16:15 ` feature/icomplete-vertical Stefan Monnier
2020-09-19 16:19 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 16:58 ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 17:06 ` feature/icomplete-vertical Ergus
2020-09-19 17:21 ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 20:47 ` feature/icomplete-vertical Ergus
2020-09-19 22:07 ` feature/icomplete-vertical Stefan Monnier
2020-09-20 5:31 ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 10:47 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 13:04 ` feature/icomplete-vertical Ergus
2020-09-19 21:40 ` feature/icomplete-vertical Dmitry Gutov
2020-09-20 5:45 ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 15:55 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 10:47 ` feature/icomplete-vertical Ergus
2020-09-19 17:08 ` feature/icomplete-vertical Drew Adams
2020-09-20 0:28 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 1:18 ` feature/icomplete-vertical Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2020-10-02 6:37 feature/icomplete-vertical Manuel Uberti
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=20200914070820.b354xzoargbibeez@Ergus \
--to=spacibba@aol.com \
--cc=emacs-devel@gnu.org \
--cc=jixiuf@139.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).