GNU bug report logs -
#65401
30.0.50; custom-theme-directory :type could be enhanced
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Sun, 20 Aug 2023 10:49:01 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
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 65401 in the body.
You can then email your comments to 65401 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#65401
; Package
emacs
.
(Sun, 20 Aug 2023 10:49:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mauro Aranda <maurooaranda <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 20 Aug 2023 10:49:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The user option custom-theme-directory is supposed to hold a directory
name. But its :type is a string.
I realize that it isn't really a bug, but in order to offer better
completion, at least, I'd like to change the type to be directory. So
I'm filing this bug report to see if people would object to such a
change.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 11:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65401 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 20 Aug 2023 07:48:09 -0300
> From: Mauro Aranda <maurooaranda <at> gmail.com>
>
> The user option custom-theme-directory is supposed to hold a directory
> name. But its :type is a string.
>
> I realize that it isn't really a bug, but in order to offer better
> completion, at least, I'd like to change the type to be directory. So
> I'm filing this bug report to see if people would object to such a
> change.
Does the directory have to exist?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 11:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65401 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 20 Aug 2023 07:48:09 -0300
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>>
>> The user option custom-theme-directory is supposed to hold a directory
>> name. But its :type is a string.
>>
>> I realize that it isn't really a bug, but in order to offer better
>> completion, at least, I'd like to change the type to be directory. So
>> I'm filing this bug report to see if people would object to such a
>> change.
>
> Does the directory have to exist?
I don't think so. And I don't see a reason to force the existence by
putting a non-nil :must-match property.
The function custom-theme--load-path takes care of filtering out
custom-theme-directory if it doesn't exist.
And to check I evaled:
(defcustom custom-theme-directory user-emacs-directory
"Default user directory for storing custom theme files.
The command `customize-create-theme' writes theme files into this
directory. By default, Emacs searches for custom themes in this
directory first---see `custom-theme-load-path'."
:initialize #'custom-initialize-delay
:type 'directory
:group 'customize
:version "22.1")
M-x customize-option RET custom-theme-directory
Changed the value to something like "~/nonexistent" and set it for the
session.
M-x customize-create-theme
Answer y at the prompt
Give the theme a dummy name.
Action the Save Theme button
The theme was created under: ~/nonexistent/dummy-theme.el
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 12:27:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 65401 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 20 Aug 2023 08:28:48 -0300
> Cc: 65401 <at> debbugs.gnu.org
> From: Mauro Aranda <maurooaranda <at> gmail.com>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Does the directory have to exist?
>
> I don't think so. And I don't see a reason to force the existence by
> putting a non-nil :must-match property.
>
> The function custom-theme--load-path takes care of filtering out
> custom-theme-directory if it doesn't exist.
If the directory doesn't have to exist, then what is the difference
between :directory and :string?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 12:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 65401 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 20 Aug 2023 08:28:48 -0300
>> Cc: 65401 <at> debbugs.gnu.org
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > Does the directory have to exist?
>>
>> I don't think so. And I don't see a reason to force the existence by
>> putting a non-nil :must-match property.
>>
>> The function custom-theme--load-path takes care of filtering out
>> custom-theme-directory if it doesn't exist.
>
> If the directory doesn't have to exist, then what is the difference
> between :directory and :string?
Completion when editing via Customize is the only one it comes to my
mind right now (useful when the user wants to edit it to some directory
it already exists). Compare the results of:
emacs -Q
M-x customize-option RET custom-theme-directory
Enter ~/
M-TAB
and
emacs -Q
Eval the following
(defcustom custom-theme-directory user-emacs-directory
"Default user directory for storing custom theme files.
The command `customize-create-theme' writes theme files into this
directory. By default, Emacs searches for custom themes in this
directory first---see `custom-theme-load-path'."
:initialize #'custom-initialize-delay
:type 'directory
:group 'customize
:version "22.1")
M-x customize-option RET custom-theme-directory
Enter ~/
M-TAB
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 13:33:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 65401 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 20 Aug 2023 09:35:17 -0300
> Cc: 65401 <at> debbugs.gnu.org
> From: Mauro Aranda <maurooaranda <at> gmail.com>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > If the directory doesn't have to exist, then what is the difference
> > between :directory and :string?
>
> Completion when editing via Customize is the only one it comes to my
> mind right now (useful when the user wants to edit it to some directory
> it already exists).
Then I don't see why would anyone object to the change you propose.
It has no downsides, AFAICT.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Sun, 20 Aug 2023 13:44:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 65401 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 20 Aug 2023 09:35:17 -0300
>> Cc: 65401 <at> debbugs.gnu.org
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > If the directory doesn't have to exist, then what is the difference
>> > between :directory and :string?
>>
>> Completion when editing via Customize is the only one it comes to my
>> mind right now (useful when the user wants to edit it to some directory
>> it already exists).
>
> Then I don't see why would anyone object to the change you propose.
> It has no downsides, AFAICT.
>
> Thanks.
OK, thank you. I attach the patch.
[0001-Improve-type-of-custom-theme-directory-Bug-65401.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Mon, 21 Aug 2023 08:01:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 65401 <at> debbugs.gnu.org (full text, mbox):
Mauro Aranda <maurooaranda <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Date: Sun, 20 Aug 2023 09:35:17 -0300
>>> Cc: 65401 <at> debbugs.gnu.org
>>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>>>
>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>
>>> > If the directory doesn't have to exist, then what is the difference
>>> > between :directory and :string?
>>>
>>> Completion when editing via Customize is the only one it comes to my
>>> mind right now (useful when the user wants to edit it to some directory
>>> it already exists).
>>
>> Then I don't see why would anyone object to the change you propose.
>> It has no downsides, AFAICT.
>>
>> Thanks.
>
> OK, thank you. I attach the patch.
>
> From c34dea06956f2a3d098badf9cea089bee0f7b61b Mon Sep 17 00:00:00 2001
> From: Mauro Aranda <maurooaranda <at> gmail.com>
> Date: Sun, 20 Aug 2023 10:39:49 -0300
> Subject: [PATCH] Improve type of custom-theme-directory (Bug#65401)
>
> * lisp/custom.el (custom-theme-directory): Make it of type directory.
> ---
> lisp/custom.el | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/custom.el b/lisp/custom.el
> index 083349e3591..5b244464d0b 100644
> --- a/lisp/custom.el
> +++ b/lisp/custom.el
> @@ -1208,9 +1208,9 @@ custom-theme-directory
> directory. By default, Emacs searches for custom themes in this
> directory first---see `custom-theme-load-path'."
> :initialize #'custom-initialize-delay
> - :type 'string
> + :type 'directory
> :group 'customize
> - :version "22.1")
> + :version "30.1")
Does the version tag have to be bumped, for a metadata change this like?
>
> (defvar custom-theme-load-path (list 'custom-theme-directory t)
> "List of directories to search for custom theme files.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Mon, 21 Aug 2023 11:05:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 65401 <at> debbugs.gnu.org (full text, mbox):
> From: Philip Kaludercic <philipk <at> posteo.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 65401 <at> debbugs.gnu.org
> Date: Mon, 21 Aug 2023 08:00:35 +0000
>
> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> >>> Date: Sun, 20 Aug 2023 09:35:17 -0300
> >>> Cc: 65401 <at> debbugs.gnu.org
> >>> From: Mauro Aranda <maurooaranda <at> gmail.com>
> >>>
> >>> Eli Zaretskii <eliz <at> gnu.org> writes:
> >>>
> >>> > If the directory doesn't have to exist, then what is the difference
> >>> > between :directory and :string?
> >>>
> >>> Completion when editing via Customize is the only one it comes to my
> >>> mind right now (useful when the user wants to edit it to some directory
> >>> it already exists).
> >>
> >> Then I don't see why would anyone object to the change you propose.
> >> It has no downsides, AFAICT.
> >>
> >> Thanks.
> >
> > OK, thank you. I attach the patch.
> >
> > From c34dea06956f2a3d098badf9cea089bee0f7b61b Mon Sep 17 00:00:00 2001
> > From: Mauro Aranda <maurooaranda <at> gmail.com>
> > Date: Sun, 20 Aug 2023 10:39:49 -0300
> > Subject: [PATCH] Improve type of custom-theme-directory (Bug#65401)
> >
> > * lisp/custom.el (custom-theme-directory): Make it of type directory.
> > ---
> > lisp/custom.el | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lisp/custom.el b/lisp/custom.el
> > index 083349e3591..5b244464d0b 100644
> > --- a/lisp/custom.el
> > +++ b/lisp/custom.el
> > @@ -1208,9 +1208,9 @@ custom-theme-directory
> > directory. By default, Emacs searches for custom themes in this
> > directory first---see `custom-theme-load-path'."
> > :initialize #'custom-initialize-delay
> > - :type 'string
> > + :type 'directory
> > :group 'customize
> > - :version "22.1")
> > + :version "30.1")
>
> Does the version tag have to be bumped, for a metadata change this like?
Probably not. AFAIK, this is only used for showing "new and changed"
options when users upgrade, and this change will be invisible at user
level.
Stefan, am I missing something?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Mon, 21 Aug 2023 12:40:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 65401 <at> debbugs.gnu.org (full text, mbox):
>> > - :type 'string
>> > + :type 'directory
>> > :group 'customize
>> > - :version "22.1")
>> > + :version "30.1")
>>
>> Does the version tag have to be bumped, for a metadata change this like?
>
> Probably not. AFAIK, this is only used for showing "new and changed"
> options when users upgrade, and this change will be invisible at
> user level.
Agreed.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Mon, 21 Aug 2023 14:43:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 65401 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>>
>> OK, thank you. I attach the patch.
>>
>> From c34dea06956f2a3d098badf9cea089bee0f7b61b Mon Sep 17 00:00:00 2001
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>> Date: Sun, 20 Aug 2023 10:39:49 -0300
>> Subject: [PATCH] Improve type of custom-theme-directory (Bug#65401)
>>
>> * lisp/custom.el (custom-theme-directory): Make it of type directory.
>> ---
>> lisp/custom.el | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lisp/custom.el b/lisp/custom.el
>> index 083349e3591..5b244464d0b 100644
>> --- a/lisp/custom.el
>> +++ b/lisp/custom.el
>> @@ -1208,9 +1208,9 @@ custom-theme-directory
>> directory. By default, Emacs searches for custom themes in this
>> directory first---see `custom-theme-load-path'."
>> :initialize #'custom-initialize-delay
>> - :type 'string
>> + :type 'directory
>> :group 'customize
>> - :version "22.1")
>> + :version "30.1")
>
> Does the version tag have to be bumped, for a metadata change this like?
>
I wasn't sure. But now I can see why it was wrong to update it. Thank
you for noticing it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65401
; Package
emacs
.
(Mon, 21 Aug 2023 14:47:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 65401 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> > - :type 'string
>>> > + :type 'directory
>>> > :group 'customize
>>> > - :version "22.1")
>>> > + :version "30.1")
>>>
>>> Does the version tag have to be bumped, for a metadata change this
like?
>>
>> Probably not. AFAIK, this is only used for showing "new and changed"
>> options when users upgrade, and this change will be invisible at
>> user level.
>
> Agreed.
>
>
> Stefan
Sending an updated patch. Thanks.
[0001-Improve-type-of-custom-theme-directory-Bug-65401.patch (text/x-patch, attachment)]
Added tag(s) patch.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 23 Aug 2023 23:13:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 26 Aug 2023 08:03:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mauro Aranda <maurooaranda <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 26 Aug 2023 08:03:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 65401-done <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 21 Aug 2023 11:46:26 -0300
> Cc: Philip Kaludercic <philipk <at> posteo.net>, 65401 <at> debbugs.gnu.org
> From: Mauro Aranda <maurooaranda <at> gmail.com>
>
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
> >>> > - :type 'string
> >>> > + :type 'directory
> >>> > :group 'customize
> >>> > - :version "22.1")
> >>> > + :version "30.1")
> >>>
> >>> Does the version tag have to be bumped, for a metadata change this
> like?
> >>
> >> Probably not. AFAIK, this is only used for showing "new and changed"
> >> options when users upgrade, and this change will be invisible at
> >> user level.
> >
> > Agreed.
> >
> >
> > Stefan
>
> Sending an updated patch. Thanks.
Thanks, installed on the master branch, and closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Sep 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.