Subject: bug#65401: 30.0.50; custom-theme-directory :type could be enhanced

From: Mauro Aranda <[email-masked]>
Date: Sun, 20 Aug 2023 09:35:17 -0300

Eli Zaretskii <[email-masked]> writes:

 >> Date: Sun, 20 Aug 2023 08:28:48 -0300
 >> Cc: [email-masked]
 >> From: Mauro Aranda <[email-masked]>
 >>
 >> Eli Zaretskii <[email-masked]> 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