From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: bufferlo Date: Sat, 28 Oct 2023 08:21:31 -0700 Message-ID: References: <8c3006d57a5c18905267adccfb04caf5ee1721ab.camel@florommel.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36873"; mail-complaints-to="usenet@ciao.gmane.io" To: Florian Rommel , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 28 17:22:27 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qwl8t-0009Nd-11 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Oct 2023 17:22:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwl87-0005Oa-5H; Sat, 28 Oct 2023 11:21:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwl85-0005MQ-24 for emacs-devel@gnu.org; Sat, 28 Oct 2023 11:21:37 -0400 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwl82-0003SG-AW for emacs-devel@gnu.org; Sat, 28 Oct 2023 11:21:36 -0400 Original-Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c595f5dc84so46740351fa.0 for ; Sat, 28 Oct 2023 08:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698506492; x=1699111292; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=QaROAw+/j1yp8NqPOD08IOo0m5vJv8sIWGgffp7NZl0=; b=E1h8i1bcqX/as45sOc84sINGWu8iMTY9Nay94x7EwZTLlPCZW3HqLQutXxD4Iyz00J MLaQSAHKr31wmezaIG5tvg07XWImi4jsWUnMyGRfg7angmY4JYCqCivd+YKPFt+oViRh TaNyHX/p5Jk0yc1dClfiD1i3YjTDrrQ+Q6L4qAsQF/ov0we36recegZiazRoqliDPNeM ip1SmRbvCGgxU/oa9pm+3IpJ7SPOu6EHqcs7RYmKmJOnVLTCrHC46MIfA691h9PBFm/c n0Q+5qNMY7hyw5r0Ja1qeDyw8Ie92lDeqwQqbKt1G+9rzrkk/DQh1wXUpG2nI1Ua6hZ1 GYkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698506492; x=1699111292; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=QaROAw+/j1yp8NqPOD08IOo0m5vJv8sIWGgffp7NZl0=; b=SwLJdUIBu/v9mDtwzVPOCq+3Y8KqjkxjcKoMVtkby8VSRyBPOdN2Kc+JwezOYsiWZr CL5MAqN8ODW4xcqBPpIJoAiByRnKVDXNT1mF8hLFkb4xpGxD50MWvNKnDtNlqwiPx3bR tY03hsMqZ3hXk5K3dSalbYtKWZUWyn+PkFM5PuK77nD6ldLo2qCazlyhNAH8bqNpSnug p6db1ShOoCKzrbelRRzwC1TO+uFMUwwD0oVyLVRHHwcle36Q1eELgezr+U7CqW8PjAmm G9JNyxagyp1RPdP6uytM+m4nztq9+by+NqlcvPevaylR1h3cqHDX0ZtJVhCuAVYXtxMB OoOQ== X-Gm-Message-State: AOJu0Yx/z09+7/KP5hCJok3AlvJQ0SqKc+0sdurEFpRSGWsGsqJVQh9u sAtRHTbq2nqqCvggzvb7d2RgaXx60Qgs8YTV2DU= X-Google-Smtp-Source: AGHT+IFTaIWhXpVo5qeoKenkLijwPBZHBnd/wvcc0BiUUmpiQVipEdMofBUl3Dy6jLq4SIFKINTQOPSt51sIinhmpmg= X-Received: by 2002:a2e:2f15:0:b0:2c5:22cc:eb38 with SMTP id v21-20020a2e2f15000000b002c522cceb38mr1807114ljv.1.1698506492110; Sat, 28 Oct 2023 08:21:32 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 28 Oct 2023 08:21:31 -0700 In-Reply-To: <8c3006d57a5c18905267adccfb04caf5ee1721ab.camel@florommel.de> Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=stefankangas@gmail.com; helo=mail-lj1-x22a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311951 Archived-At: Florian Rommel 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-fr= ame'. 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-fr= ame'. 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 =E2=80=98ibuffer-filtering-alist=E2=80=99 bufferlo.el:517:24: Warning: assignment to free variable =E2=80=98ibuffer-filtering-alist=E2=80=99 bufferlo.el:526:17: Warning: reference to free variable =E2=80=98ibuffer--f= ilter-map=E2=80=99 In end of data: bufferlo.el:527:19: Warning: the function =E2=80=98ibuffer-filter-by-bufferlo-local-buffers=E2=80=99 is not known= to be defined. bufferlo.el: Warning: the function =E2=80=98ibuffer-pop-filter=E2=80=99 is = not known to be defined. bufferlo.el: Warning: the function =E2=80=98ibuffer-update=E2=80=99 is not = known to be defined. bufferlo.el: Warning: the function =E2=80=98ibuffer-push-filter=E2=80=99 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 @@ -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 l= ists. +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