all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ELPA] New package: bufferlo
@ 2023-10-22 19:50 Florian Rommel
  2023-10-28 15:21 ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Rommel @ 2023-10-22 19:50 UTC (permalink / raw)
  To: emacs-devel

Hi all,

I propose the following package for inclusion in ELPA:
https://github.com/florommel/bufferlo

It provides additional separate buffer lists per frame and (tab-bar)
tab and functions to manage them.

Different from similar buffer-isolation solutions it supports tabs.
It also integrates well with all the standard frame and tab management
facilities and has support for persisting sessions via desktop.el.

Thanks for your feedback.

Best,
Flo




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-10-22 19:50 [ELPA] New package: bufferlo Florian Rommel
@ 2023-10-28 15:21 ` Stefan Kangas
  2023-11-04 22:13   ` Florian Rommel
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2023-10-28 15:21 UTC (permalink / raw)
  To: Florian Rommel, emacs-devel

Florian Rommel <mail@florommel.de> writes:

> I propose the following package for inclusion in ELPA:
> https://github.com/florommel/bufferlo
>
> It provides additional separate buffer lists per frame and (tab-bar)
> tab and functions to manage them.
>
> Different from similar buffer-isolation solutions it supports tabs.
> It also integrates well with all the standard frame and tab management
> facilities and has support for persisting sessions via desktop.el.
>
> Thanks for your feedback.

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.

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'.
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.

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

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

diff --git a/bufferlo.el b/bufferlo.el
index 3bc92b5..daecb85 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -1,4 +1,5 @@
 ;;; bufferlo.el --- Manage frame/tab-local buffer lists -*-
lexical-binding: t -*-
+
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.

 ;; Author: Florian Rommel <mail@florommel.de>
@@ -6,7 +7,7 @@
 ;; Url: https://github.com/florommel/bufferlo
 ;; Created: 2021-09-15
 ;; Version: 0.2
-;; Package-Requires: ((emacs "27.1"))
+;; Package-Requires: ((emacs "29.1"))
 ;; Keywords: buffer frame tabs local

 ;; This program is free software: you can redistribute it and/or modify
@@ -69,41 +70,36 @@ This is also required to make `next-buffer' and
`previous-buffer'
 work as expected.
 Changes to this variable must be made before enabling
 `bufferlo-mode' in order to take effect."
-  :group 'bufferlo
   :type 'boolean)

 (defcustom bufferlo-include-buried-buffers t
   "Include buried buffers in the local list (`bufferlo-buffer-list').
 Use `bufferlo-bury' to remove and bury a buffer if this is set to t."
-  :group 'bufferlo
   :type 'boolean)

 (defcustom bufferlo-include-buffer-filters nil
   "Buffers that should always get included in a new tab or frame.
 This is a list of regular expressions that match buffer names.
 This overrides buffers excluded by `bufferlo-exclude-buffer-filters.'"
-  :group 'bufferlo
   :type '(repeat string))

 (defcustom bufferlo-exclude-buffer-filters '(".*")
   "Buffers that should always get excluded in a new tab or frame.
 This is a list of regular expressions that match buffer names.
 Buffers included by `bufferlo-include-buffer-filters' take precedence."
-  :group 'bufferlo
   :type '(repeat string))

 (defcustom bufferlo-hidden-buffers nil
-  "Buffers that should be hidden in the local buffer lists,
-even if they are displayed in the current frame or tab.
-This is a list of regular expressions that match buffer names."
-  :group 'bufferlo
+  "List of regexps matching names of buffers to hide in the local buffer lists.
+They are hidden even if they are displayed in the current frame
+or tab.  This is a list of regular expressions that match buffer
+names."
   :type '(repeat string))

 (defcustom bufferlo-kill-buffers-exclude-filters
   '("\\` " "\\`\\*Messages\\*\\'" "\\`\\*scratch\\*\\'")
   "Buffers that should not be killed by `bufferlo-kill-buffers'.
 This is a list of regular expressions that match buffer names."
-  :group 'bufferlo
   :type '(repeat string))

 (defcustom bufferlo-ibuffer-bind-local-buffer-filter t



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-10-28 15:21 ` Stefan Kangas
@ 2023-11-04 22:13   ` Florian Rommel
  2023-11-05 14:32     ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Rommel @ 2023-11-04 22:13 UTC (permalink / raw)
  To: Stefan Kangas, emacs-devel

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-11-04 22:13   ` Florian Rommel
@ 2023-11-05 14:32     ` Stefan Kangas
  2023-11-05 14:47       ` Florian Rommel
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2023-11-05 14:32 UTC (permalink / raw)
  To: Florian Rommel, emacs-devel

Florian Rommel <mail@florommel.de> writes:

> 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.

Thanks, I have now added the package to GNU ELPA, and it should be
installable within 24-48 hours.

BTW, could you add COPYING to .elpaignore?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-11-05 14:32     ` Stefan Kangas
@ 2023-11-05 14:47       ` Florian Rommel
  2023-11-05 15:00         ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Rommel @ 2023-11-05 14:47 UTC (permalink / raw)
  To: Stefan Kangas, emacs-devel

On Sun, 2023-11-05 at 06:32 -0800, Stefan Kangas wrote:
> Florian Rommel <mail@florommel.de> writes:
> 
> > 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.
> 
> Thanks, I have now added the package to GNU ELPA, and it should be
> installable within 24-48 hours.
> 
> BTW, could you add COPYING to .elpaignore?
> 

Thank you!  I added COPYING to .elpaignore.

To understand the process:  How are updates to the package pulled to
ELPA?  Does it happen automatically?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-11-05 14:47       ` Florian Rommel
@ 2023-11-05 15:00         ` Stefan Kangas
  2023-11-05 15:02           ` Florian Rommel
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2023-11-05 15:00 UTC (permalink / raw)
  To: Florian Rommel, emacs-devel

Florian Rommel <mail@florommel.de> writes:

> To understand the process:  How are updates to the package pulled to
> ELPA?  Does it happen automatically?

Yes, the default is that it happens automatically.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ELPA] New package: bufferlo
  2023-11-05 15:00         ` Stefan Kangas
@ 2023-11-05 15:02           ` Florian Rommel
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Rommel @ 2023-11-05 15:02 UTC (permalink / raw)
  To: Stefan Kangas, emacs-devel

On Sun, 2023-11-05 at 07:00 -0800, Stefan Kangas wrote:
> Florian Rommel <mail@florommel.de> writes:
> 
> > To understand the process:  How are updates to the package pulled to
> > ELPA?  Does it happen automatically?
> 
> Yes, the default is that it happens automatically.

Okay, thanks!



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-05 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-22 19:50 [ELPA] New package: bufferlo Florian Rommel
2023-10-28 15:21 ` Stefan Kangas
2023-11-04 22:13   ` Florian Rommel
2023-11-05 14:32     ` Stefan Kangas
2023-11-05 14:47       ` Florian Rommel
2023-11-05 15:00         ` Stefan Kangas
2023-11-05 15:02           ` Florian Rommel

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.