unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Ergus <spacibba@aol.com>
Cc: Gregory Heytings <ghe@sdf.org>, Eli Zaretskii <eliz@gnu.org>,
	emacs-devel <emacs-devel@gnu.org>, Yuan Fu <casouri@gmail.com>,
	Juri Linkov <juri@linkov.net>
Subject: Re: feature/icomplete-vertical
Date: Mon, 05 Oct 2020 10:06:22 +0100	[thread overview]
Message-ID: <87h7r9ghyp.fsf@gmail.com> (raw)
In-Reply-To: <20201005044823.b2ougsrgcpvsuj74@Ergus> (Ergus's message of "Mon,  5 Oct 2020 06:48:23 +0200")

Ergus <spacibba@aol.com> writes:

> On Mon, Oct 05, 2020 at 12:47:39AM +0100, Jo�o T�vora wrote:
>
> Hi Joao:
>
> Please look at the previous messages in this same thread to see the
> problems with your approach.
>
> So far there is:
>
> 1) The problem when using different font in minibuffer reported by
> Jixiuf 2) the long line issue from Gregory (but also mentioned before)
> 3) the ellipsis issue mentioned by Eli
> 4) The prompt issue (which seems is not going to be solved as it is more
> a design choice or a feature than a real issue)
> 5) Respect the user customs max-mini-window-height and
> resize-mini-windows so we shouldn't call enlarge-window and as an
> core package we must not conflict with such customs.
> 6) The removal of {} in vertical mode because in that case they are
> redundant.
> 7) The compatibility with packages like maple-minibuffer reported by
> Dimitry.
> 8) The case when using multiline separator.
> 9) Move the first candidate to a newline instead of keeping it inline.
>
> The patch I propose is not complex at all considering all the above
> conditions. The only complexity comes from the height calculation in
> pixels which is something that will need to be done in any case either
> for 1, 2, 3 or 4.

Thanks for listing these again, for my benefit.  I've not been following
this very closely, and needed a summary to give me context after trying
your patch again, as you requested.

To be clear: I'm not "against" this functionality or even against it
becoming a part of Emacs or Emacs core.  I think solving the problems
you list above is fine (though I haven't been by them, at least not yet)

I'm not too much concerned about the complexity of implementation (such
as the height calculation).  I am concerned the changes to the user
interface, of which your patch seems to bring many, or at least more
than I would have expected.  It seems to be that your solution mixes
bugfixes and new features, which is what I object to.  I think your
solution could be trimmed down so that it solves _only_ the technical
problems you list above without adding new user interfaces.

In other words, don't see why the points above, which sound like
basically bugs, need any new "defcustom".  This is why I asked you to
(re)list them.  Then I can start with my naive implementation and fix
them one by one, without adding new interfaces.  Of course, then I will
be repeating some work you've already done, so this is why I'm arguing
for this separation in _your_ work.

Could you structure your work so that one part fixes the above problems,
and another part adds the new features, like customizing bracket types
and such, and is should be discussed as a separate matter.

After my sig, some comments that illustrate my points.

I took this diff with git diff master...feature/icomplete-vertical

João

> -(defcustom icomplete-separator " | "
> -  "String used by Icomplete to separate alternatives in the minibuffer."
> -  :type 'string
> -  :version "24.4")
> +(defcustom icomplete-vertical nil
> +  "Enable `icomplete' vertical mode."
> +  :type 'bool
> +  :version "28.1")

I would think it more elegant to keep `icomplete-separator` as the entry
point to verticality.  Certainly it should be possible to analyse the
string and decide whether it implies verticality and needs special
worries.

  (defcustom icomplete-hide-common-prefix t
   "When non-nil, hide common prefix from completion candidates.
@@ -97,6 +97,12 @@ icomplete-first-match
   "Face used by Icomplete for highlighting first match."
   :version "24.4")
 
> +(defface icomplete-common-match '((t :inherit 'highlight
> +                                     :underline t
> +                                     :weight bold))
> +  "Face used by Icomplete for highlighting common completion."
> +  :version "28.1")


What is a "common match"?  Is this exclusive to icomplete verticalness?
Doesn't seem so, is this not a side feature?

> -(defcustom icomplete-minibuffer-setup-hook nil
> +(defvar icomplete-ellipsis nil)
> +
> +(defcustom icomplete--minibuffer-setup-hook nil
>    "Icomplete-specific customization of minibuffer setup.

Why has this minibuffer hook been made an internal variable?

> -    (define-key map (kbd "<right>") 'icomplete-forward-completions)
> -    (define-key map (kbd "<left>") 'icomplete-backward-completions)

Why have these been removed from icomplete-fido-mode-map?  Also, I have
C-r and C-r in that map, will it work in the verticality?  I would hope
it would, as it does not in my naive verticality implementation.

> -;;;_ > icomplete-minibuffer-setup ()
> -(defun icomplete-minibuffer-setup ()
> +;; Vertical functions
> +
> +(defcustom icomplete-separator-vertical " \n"
> +  "String used by Icomplete to separate alternatives in the minibuffer."
> +  :type 'string
> +  :version "28.1")
> +
> +(defcustom icomplete-list-indicators-vertical (cons "" "")
> +  "Indicator bounds to list alternatives in the minibuffer."
> +  :type 'string
> +  :version "28.1")
> +
> +(defcustom icomplete-require-indicators-vertical (cons "" "")
> +  "Indicator bounds for match in the minibuffer when require-match."
> +  :type 'string
> +  :version "28.1")
> +
> +(defcustom icomplete-not-require-indicators-vertical (cons "" "")
> +  "Indicator bounds for match in the minibuffer when not require-match."
> +  :type 'string
> +  :version "28.1")

These are examples of "interface bloat" that do not seem to directly
address the 9 problems you listed in the beginning of the message
(again, I am not against these features per se, mind you)

> +(defvar icomplete--vertical-mode-map

If this keymap is "internal" (as indicated by the two "--") how am I
supposed to customize the keybindings?

> +(defcustom icomplete-list-indicators-horizontal (cons "{" "}")
> +  "Indicator bounds to list alternatives in the minibuffer."
> +  :type 'string
> +  :version "28.1")
> +
> +(defcustom icomplete-require-indicators-horizontal (cons "(" ")")
> +  "Indicator bounds for match in the minibuffer when require-match."
> +  :type 'string
> +  :version "28.1")
> +
> +(defcustom icomplete-not-require-indicators-horizontal (cons "[" "]")
> +  "Indicator bounds for match in the minibuffer when not require-match."
> +  :type 'string
> +  :version "28.1")

Again, these seem like improvements that are not directly related to
verticality.  (Maybe they are very good improvements, but still...

João



  reply	other threads:[~2020-10-05  9:06 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     ` feature/icomplete-vertical Ergus
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                       ` João Távora [this message]
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=87h7r9ghyp.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=juri@linkov.net \
    --cc=spacibba@aol.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).