[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature/icomplete-vertical
From: |
João Távora |
Subject: |
Re: feature/icomplete-vertical |
Date: |
Mon, 05 Oct 2020 10:40:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Gregory Heytings <ghe@sdf.org> writes:
> Part 1 of the solution (which solves the "root" problem, and is not
> specific to icomplete-vertical):
Right. I appreciate this separation: solve a bug _then_ implement a
feature.
Now, as far as I understand Eli and remaining maintainers are not OK
with your bugfix. This I have no opinion about, except for finding your
expectation of "auto-enlargement" reasonable at first sight. Other than
that, I haven't studied the matter. But hopefully we should all agree
on basic icomplete-independent behaviour and come up with a fix that is
acceptable for all.
> Part 2 of the solution (which implements icomplete-vertical):
> (setq icomplete-separator "\n")
> (add-hook 'icomplete-minibuffer-setup-hook (lambda () (setq
> start-display-at-beginning-of-minibuffer t)))
> (defun icomplete-vertical-reformat-completions (completions)
> (save-match-data
> (if (string-match "^\\((.*)\\|\\[.+\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}"
> completions)
> (format "%s \n%s" (or (match-string 1 completions) "") (match-string
> 2 completions))
> completions)))n
> (advice-add 'icomplete-completions :filter-return
> #'icomplete-vertical-reformat-completions)
>
> The only limit of this solution is that is is not possible to display
> an ellipsis ("...") at the end of the completion candidates list, to
> indicate that some completion candidates are not displayed. This is a
> minor limitation, and IMO using one screen line just to display "..."
> is a waste of resources.
Yeah, I agree. For example, in my verticality thing I would even remove
one extra feature of your implementation that I don't find useful: the
indentation of the candidates. These are features that can be of course
implemented _separately_.
João
Re: feature/icomplete-vertical, Gregory Heytings, 2020/10/05
Re: feature/icomplete-vertical, Manuel Uberti, 2020/10/02