emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: bufferlo


From: Florian Rommel
Subject: Re: [ELPA] New package: bufferlo
Date: Sat, 04 Nov 2023 23:13:29 +0100
User-agent: Evolution 3.50.1

On Sat, 2023-10-28 at 08:21 -0700, Stefan Kangas wrote:
> Thanks, do you mean to add it to GNU ELPA?  If so, I see no reason why
> we can't add it.  Please find some comments on your code below.

Yes, I would like to have it added to GNU ELPA.


> 1. Here are some warnings from `package-lint':
> 
> 6 issues found:
> 
> 146:22: error: You should depend on (emacs "28.1") if you need `clone-frame'.
> 147:22: error: You should depend on (emacs "29.1") if you need 
> `undelete-frame'.
> 166:21: error: You should depend on (emacs "28.1") if you need `clone-frame'.
> 167:21: error: You should depend on (emacs "29.1") if you need 
> `undelete-frame'.

The package works with 27.1.
The advices for `clone-frame' and `undelete-frame' are just
supplementary and not necessary for the functioning of bufferlo.

`add-advice' does not fail for undefined functions but seems to define
nonexistent functions as empty functions.  To avoid this, I now check
`emacs-major-version' before adding the advice for `clone-frame' and
`undelete-frame'.  Of course, this does not fix the warnings.


> 517:1: warning: `with-eval-after-load' is for use in configurations,
> and should rarely be used in packages.
> 523:1: warning: `with-eval-after-load' is for use in configurations,
> and should rarely be used in packages.
> 
> 2. Here are some byte-compiler warnings:
> 
> Compiling file /Users/skangas/wip/bufferlo/bufferlo.el at Sat Oct 28
> 17:12:56 2023
> bufferlo.el:518:26: Warning: reference to free variable
>     ‘ibuffer-filtering-alist’
> bufferlo.el:517:24: Warning: assignment to free variable
>     ‘ibuffer-filtering-alist’
> bufferlo.el:526:17: Warning: reference to free variable ‘ibuffer--filter-map’
> 
> In end of data:
> bufferlo.el:527:19: Warning: the function
>     ‘ibuffer-filter-by-bufferlo-local-buffers’ is not known to be defined.
> bufferlo.el: Warning: the function ‘ibuffer-pop-filter’ is not known to be
>     defined.
> bufferlo.el: Warning: the function ‘ibuffer-update’ is not known to be
>     defined.
> bufferlo.el: Warning: the function ‘ibuffer-push-filter’ is not known to be
>     defined.
> 

Bufferlo has ibuffer support but does not need ibuffer to be useful.
Therefore, I use `with-eval-after-load' blocks for the ibuffer-related
code.  The free-variable warnings arise from the usage of ibuffer
variables in these blocks.
As an alternative, I could require ibuffer, which, however, would load
ibuffer for all users of bufferlo, even if they don't use it.
What is the preferred solution?


> 3. You might want to consider running `M-x checkdoc' as well.

I resolved all the remaining checkdoc warnings.


> 4. See the below diff with some stylistic improvements that I found
>    while skimming the code:

Thanks, I applied your improvements.
For now, minus 'Package-Requires: ((emacs "29.1"))'


Regards, 
Flo





reply via email to

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