GNU bug report logs -
#59438
29.0.50; [PATCH] Make defvar's into defcustom's in tab-line
Previous Next
Reported by: Gabriel <gabriel376 <at> hotmail.com>
Date: Mon, 21 Nov 2022 09:30:01 UTC
Severity: wishlist
Tags: patch
Found in version 29.0.50
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59438 in the body.
You can then email your comments to 59438 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59438
; Package
emacs
.
(Mon, 21 Nov 2022 09:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gabriel <gabriel376 <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 21 Nov 2022 09:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Description:
Please find attached a patch that proposes the following minor changes
to tab-line. I can refactor the patch if we decide that some change are
not worth or if it's better to split it into smaller patches.
1) Turn the following defvar's into defcustom's:
- `tab-line-tabs-buffer-group-function'
- `tab-line-tabs-buffer-group-sort-function'
- `tab-line-tabs-buffer-groups-sort-function'
2) Add conditional around function call of
`tab-line-tabs-buffer-groups-sort-function', in
`tab-line-tabs-buffer-groups'. This guards against nil values, similar
to how `tab-line-tabs-buffer-group-sort-function is handled, making the
behavior more consistent across these two (similar) variables.
Should we announce these "new" defcustom's in NEWS?
[0001-Make-defvar-s-into-defcustom-s-in-tab-line.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
---
Gabriel
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 24 Nov 2022 18:27:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59438
; Package
emacs
.
(Fri, 25 Nov 2022 01:17:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 59438 <at> debbugs.gnu.org (full text, mbox):
Gabriel <gabriel376 <at> hotmail.com> writes:
> Please find attached a patch that proposes the following minor changes
> to tab-line. I can refactor the patch if we decide that some change are
> not worth or if it's better to split it into smaller patches.
>
> 1) Turn the following defvar's into defcustom's:
>
> - `tab-line-tabs-buffer-group-function'
> - `tab-line-tabs-buffer-group-sort-function'
> - `tab-line-tabs-buffer-groups-sort-function'
>
> 2) Add conditional around function call of
> `tab-line-tabs-buffer-groups-sort-function', in
> `tab-line-tabs-buffer-groups'. This guards against nil values, similar
> to how `tab-line-tabs-buffer-group-sort-function is handled, making the
> behavior more consistent across these two (similar) variables.
>
> Should we announce these "new" defcustom's in NEWS?
Juri, thoughts?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59438
; Package
emacs
.
(Thu, 07 Sep 2023 21:08:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 59438 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Gabriel <gabriel376 <at> hotmail.com> writes:
>
>> Please find attached a patch that proposes the following minor changes
>> to tab-line. I can refactor the patch if we decide that some change are
>> not worth or if it's better to split it into smaller patches.
>>
>> 1) Turn the following defvar's into defcustom's:
>>
>> - `tab-line-tabs-buffer-group-function'
>> - `tab-line-tabs-buffer-group-sort-function'
>> - `tab-line-tabs-buffer-groups-sort-function'
>>
>> 2) Add conditional around function call of
>> `tab-line-tabs-buffer-groups-sort-function', in
>> `tab-line-tabs-buffer-groups'. This guards against nil values, similar
>> to how `tab-line-tabs-buffer-group-sort-function is handled, making the
>> behavior more consistent across these two (similar) variables.
>>
>> Should we announce these "new" defcustom's in NEWS?
>
> Juri, thoughts?
Ping. Does anyone have any comments?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59438
; Package
emacs
.
(Fri, 08 Sep 2023 10:44:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 59438 <at> debbugs.gnu.org (full text, mbox):
On 7/9/23 18:07, Stefan Kangas wrote:
> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> Gabriel <gabriel376 <at> hotmail.com> writes:
>>
>>> Please find attached a patch that proposes the following minor changes
>>> to tab-line. I can refactor the patch if we decide that some change are
>>> not worth or if it's better to split it into smaller patches.
>>>
>>> 1) Turn the following defvar's into defcustom's:
>>>
>>> - `tab-line-tabs-buffer-group-function'
>>> - `tab-line-tabs-buffer-group-sort-function'
>>> - `tab-line-tabs-buffer-groups-sort-function'
>>>
>>> 2) Add conditional around function call of
>>> `tab-line-tabs-buffer-groups-sort-function', in
>>> `tab-line-tabs-buffer-groups'. This guards against nil values, similar
>>> to how `tab-line-tabs-buffer-group-sort-function is handled, making the
>>> behavior more consistent across these two (similar) variables.
>>>
>>> Should we announce these "new" defcustom's in NEWS?
>>
>> Juri, thoughts?
>
> Ping. Does anyone have any comments?
I do have minor comments about the defcustom changes.
Gabriel <gabriel376 <at> hotmail.com> writes:
>>From da1053e7211d8bb17769fe43650a9bcdd359aeab Mon Sep 17 00:00:00 2001
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Mon, 21 Nov 2022 06:17:49 -0300
> Subject: [PATCH 1/1] Make defvar's into defcustom's in tab-line
>
> * lisp/tab-line.el (tab-line-tabs-buffer-group-function)
> (tab-line-tabs-buffer-group-sort-function)
> (tab-line-tabs-buffer-groups-sort-function): Make into defcustom's.
> (Make defvar's into defcustom's in tab-line): Handle case when
> variable tab-line-tabs-buffer-groups-sort-function is nil.
> ---
> lisp/tab-line.el | 51 ++++++++++++++++++++++++++++--------------------
> 1 file changed, 30 insertions(+), 21 deletions(-)
>
> diff --git a/lisp/tab-line.el b/lisp/tab-line.el
> index 99a785ee3e..9b1c101718 100644
> --- a/lisp/tab-line.el
> +++ b/lisp/tab-line.el
> @@ -341,16 +341,26 @@ tab-line-tabs-mode-buffers
> (derived-mode-p mode)))
> (funcall
tab-line-tabs-buffer-list-function)))))
>
> -(defvar tab-line-tabs-buffer-group-function nil
> +(defcustom tab-line-tabs-buffer-group-function nil
> "Function to add a buffer to the appropriate group of tabs.
> -Takes a buffer as arg and should return a group name as a string.
> -If the return value is nil, the buffer should be filtered out.")
> +Takes a buffer as argument and should return a group name as a
> +string. If the return value is nil, the buffer should be
> + filtered out."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
Since the option can be nil, please add a choice type here.
> -(defvar tab-line-tabs-buffer-group-sort-function nil
> - "Function to sort buffers in a group.")
> +(defcustom tab-line-tabs-buffer-group-sort-function nil
> + "Function to sort buffers in a group."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
Same here.
> -(defvar tab-line-tabs-buffer-groups-sort-function #'string<
> - "Function to sort group names.")
> +(defcustom tab-line-tabs-buffer-groups-sort-function #'string<
> + "Function to sort group names."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
And version should be updated, I guess.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59438
; Package
emacs
.
(Sun, 05 May 2024 18:42:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 59438 <at> debbugs.gnu.org (full text, mbox):
close 59438 30.0.50
thanks
> Description:
>
> Please find attached a patch that proposes the following minor changes
> to tab-line. I can refactor the patch if we decide that some change are
> not worth or if it's better to split it into smaller patches.
>
> 1) Turn the following defvar's into defcustom's:
>
> - `tab-line-tabs-buffer-group-function'
> - `tab-line-tabs-buffer-group-sort-function'
> - `tab-line-tabs-buffer-groups-sort-function'
>
> 2) Add conditional around function call of
> `tab-line-tabs-buffer-groups-sort-function', in
> `tab-line-tabs-buffer-groups'. This guards against nil values, similar
> to how `tab-line-tabs-buffer-group-sort-function is handled, making the
> behavior more consistent across these two (similar) variables.
I'm very sorry this took so long since I wanted first to do some related changes.
But your patch will get into the next release anyway. Thanks for the patch.
So now everything is pushed together with the suggestion by Mauro
to add choice type with nil.
bug marked as fixed in version 30.0.50, send any further explanations to
59438 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 May 2024 18:42:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 03 Jun 2024 11:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.