From: Gregory Heytings <gregory@heytings.org>
To: Juri Linkov <juri@linkov.net>
Cc: Philip Kaludercic <philipk@posteo.net>,
Eli Zaretskii <eliz@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: [PATCH] icomplete-vertical
Date: Tue, 06 Apr 2021 20:09:56 +0000 [thread overview]
Message-ID: <acf6f0cd7e4f85dfd2fb@heytings.org> (raw)
In-Reply-To: <87im4z1gbc.fsf@mail.linkov.net>
>> Okay. Here is the final (?) version of the patch; I forgot to update
>> the docs in the previous one.
>
> I tried it out, and everything works nicely.
>
Thanks for reviewing!
>
> The only problem I see this code is too hackish:
>
>> +(defun icomplete--vertical-reformat-completions ()
>> + "Reformat the completion candidates returned by `icomplete-completions'."
>> + (save-match-data
>> + (setq icomplete-current-completions
>> + (if (string-match "^\\((.*)\\|\\[.*\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}"
>> + icomplete-current-completions)
>> + (format "%s \n%s"
>> + (or (match-string 1 icomplete-current-completions) "")
>> + (match-string 2 icomplete-current-completions))
>> + icomplete-current-completions))))
>
> I guess like there are variables that affect formatting of the output
> e.g. 'icomplete-hide-common-prefix', there could be a new similar
> variable 'icomplete-add-initial-newline' to add a newline in the
> 'icomplete-completions' formatting function.
>
It is (a bit) hackish because the output of icomplete-completions is (a
bit) hackish.
Adding an initial newline to the output of icomplete-completions wouldn't
be enough, icomplete-completions uses () [] {} and | as delimiters. Of
course one could change all these delimiters into user options, but IMO it
would add more complexity than necessary, and with the new
icomplete-completions-filter-hook anyone can reformat the output the way
they want it.
next prev parent reply other threads:[~2021-04-06 20:09 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 22:23 [PATCH] icomplete-vertical Gregory Heytings
2021-04-05 23:04 ` Philip Kaludercic
2021-04-05 23:09 ` Gregory Heytings
2021-04-06 1:08 ` Stefan Kangas
2021-04-06 2:31 ` Eli Zaretskii
2021-04-06 7:44 ` Gregory Heytings
2021-04-06 8:54 ` Philip Kaludercic
2021-04-06 9:10 ` Gregory Heytings
2021-04-06 9:30 ` Philip Kaludercic
2021-04-06 10:20 ` Gregory Heytings
2021-04-06 13:20 ` Stefan Monnier
2021-04-06 13:50 ` Gregory Heytings
2021-04-06 14:11 ` Stefan Monnier
2021-04-06 14:19 ` Gregory Heytings
2021-04-06 14:26 ` Stefan Monnier
2021-04-06 14:46 ` Gregory Heytings
2021-04-06 18:49 ` Juri Linkov
2021-04-06 20:09 ` Gregory Heytings [this message]
2021-04-10 20:56 ` Juri Linkov
2021-04-10 22:01 ` João Távora
2021-04-10 22:39 ` Juri Linkov
2021-04-10 22:56 ` João Távora
2021-04-10 23:00 ` Gregory Heytings
2021-04-10 23:05 ` João Távora
2021-04-11 7:14 ` Eli Zaretskii
2021-05-13 10:01 ` João Távora
2021-04-11 7:12 ` Eli Zaretskii
2021-04-10 22:23 ` Gregory Heytings
2021-04-06 14:25 ` Ergus
2021-04-06 15:17 ` Philip Kaludercic
2021-04-06 16:18 ` Ergus
2021-04-06 11:33 ` Dmitry Gutov
2021-04-06 11:52 ` Gregory Heytings
2021-04-06 12:21 ` Eli Zaretskii
2021-04-06 12:48 ` Gregory Heytings
2021-04-06 13:48 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acf6f0cd7e4f85dfd2fb@heytings.org \
--to=gregory@heytings.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.