Subject: Re: bug#68915: Request to include a couple of packages in GNU ELPA

From: Rahguzar <[email-masked]>
Date: Mon, 05 Feb 2024 22:51:21 +0100

Philip Kaludercic <[email-masked]> writes:

> Rahguzar <[email-masked]> writes:
>
> I wouldn't worry too much about that, being able to easily and
> predictably display all the options that a package or feature provides
> is IMO preferable, considering that the number of groups is usually
> nothing users have to concern themselves with too much.
>

I have defined a new group now.

>>> @@ -80,7 +84,7 @@ default it uses `cabal-hoogle' https://github.com/kokobd/cabal-hoogle ."
>>>    "Fontify TEXT, returning the fontified text.
>>>  This is adapted from `haskell-fontify-as-mode' but for better performance
>>>  we use the same buffer throughout."
>>> -  (with-current-buffer " *Hoogle Fontification*"
>>> +  (with-current-buffer " *Hoogle Fontification*" ;why not use a temporary buffer?
>>
>> 'haskell-mode' can be slow and with preview and vertical completion UIs
>> the temporary buffer will be created many many times. I started with
>> that and changed to this approach since there were noticeable pauses.
>
> OK, then that is worth adding as a comment.
>

The documentation mentions the rationale for using the same buffer
throughout. Is that not adequate?

>>> @@ -242,11 +246,11 @@ STATE is the optional state function passed to the `consult--read'."
>>>  (defun consult-hoogle (arg)
>>>    "Search the local hoogle database.
>>>  By default this shows the documentation for the current candidate in a side
>>> -window. This can be disabled by a prefix ARG."
>>> +window.  This can be disabled by a prefix ARG."
>>>    (interactive (list current-prefix-arg))
>>>    (if arg (consult-hoogle--search)
>>>      (let* ((buf (get-buffer-create " *Hoogle Documentation*" t))
>>> -           (height (if (bound-and-true-p vertico-count)
>>> +           (height (if (bound-and-true-p vertico-count) ;can this support icomplete as well?
>>
>> This is indeed hack and I am more inclined to remove it and make the
>> height a custom variable. Another route would be to make the display
>> action a custom variable. What do you think?
>
> I cannot comment, since I don't understand the intended effect well enough.
>

Thinking about this, that usage of vertico count wasn't doing anything.
So I have just used a constant height for window. Customizing the
preview window is (and was) possible through `display-buffer-alist`

Thanks a lot for comments and suggestions,
Rahguzar