emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Support "\n" in icomplete-separator


From: Andrii Kolomoiets
Subject: Re: [PATCH] Support "\n" in icomplete-separator
Date: Mon, 09 Nov 2020 23:04:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrii Kolomoiets <andreyk.mad@gmail.com>
>> Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, eliz@gnu.org
>> Date: Sun, 08 Nov 2020 22:14:07 +0200
>> 
>> I didn't saw the prompt issue.  Stefan and Eli, can you please confirm
>> that the prompt issue is totally gone?
>
> Can you show the recipe (or recipes) which I should try in order to
> answer your question?

While preparing receipt, I've found that the bug with the prompt is
still exists.

The receipt should be checked using feature/icomplete-vertical branch
and using patched master branch (patch attached).

Code that need to be put to the *scratch* buffer:

(setq resize-mini-frames t)
(icomplete-mode 1)
(setq icomplete-separator "\n--\n")
(setq icomplete-show-matches-on-no-input t)
(setq icomplete-hide-common-prefix nil)
(setq icomplete-prospects-height 10)
(add-hook 'minibuffer-setup-hook
              (lambda ()
                (set (make-local-variable 'face-remapping-alist)
                         '((default :height 1.3)))))
(setq completion-items
      (mapcar (lambda (x)
                (format "Multiline completion item to occupy \
several lines %s" x))
              '(1 2 3 4 5 6 7 8 9 0)))
(completing-read
 "This prompt is visible: "
 completion-items)
(completing-read
 "This line of the prompt is not visible because the propmt \
occupy several lines: "
 completion-items)

Part one.

1. emacs -Q
2. Put the code above to the *scratch* buffer
3. M-x eval-buffer
feature/icomplete-vertical and patched master: Prompt is visible.
4. TAB (to complete the common part)
feature/icomplete-vertical: Prompt is visible.
Patched master: Prompt is hidden.
5. RET
feature/icomplete-vertical: Prompt is visible.
Patched master: The firs line of the prompt is hidden.
6. TAB
feature/icomplete-vertical: Prompt is visible.
Patched master: Prompt is hidden.

Part two.

1. emacs -Q --eval "(setq default-frame-alist '((minibuffer . nil)))"
2. Put the code above to the *scratch* buffer
3. M-x eval-buffer
feature/icomplete-vertical: Minibuffer frame remains minimum height and
width, prompt is hidden. 
Patched master: Prompt is visible, minibuffer frame resized to fit all
the 10 completion items.

Well, the "part one" is for sure the answer to my own question :)  But
because of the "part two" I'm still very like the idea to treat
'icomplete-prospects-height' as completions count and not as the lines
count.  So I have another question: that prompt issue in patched master
from the "part one" must be solved in icomplete-mode or somewhere in the
display engine?

Thanks!

Attachment: icomplete-vertical.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]