I heard it’s better to use Customize
to define variables/settings instead of just some setq
inside .emacs.d
… because it autoloads when loading packages, because it’s more consistent, more checked/restricted, better updated, etc. I heard the only case where it could be better not to use Customize is setting programmatically variables. Like depending upon context or other variables with functions, etc.
But is it really always the case or is there even with Customize some way of doing it? Especially, is there a way to define a variable within Customize, that would depend upon another? like org-agenda-files
depending on org-directory
((setq org-agenda-files (concat org-directory "agenda.org"))
)? Because I’d like it to being updated wether I update org-directory
. And I’d like for consistency being able to set everything within setq
or Customize
, and I don’t know how to do it programmatically within Customize
.
EDIT : also, if that’s not possible, I’d like to know at least how to make setq
acts after the definition of a variable by customize. To take again the previous example: org-directory
get defined only when org
is loaded, so I can’t define org-agenda-files
before in my .emacs.d
: what’s the proper solution? (eval-after-load 'org […])
?
setq
? – galex-713 Mar 20 '16 at 14:15____
for parts you would like to be able to fill in? Or in some other way make clear what you are looking for. – Drew Mar 20 '16 at 15:58(defcustom get-org-directory 'get-org-directory-func ...)
then(defun get-org-directory-func () "~/org")
. And then whoever usesorg-agenda-files
would have to do it via(expand-file-name "agenda.org" (funcall get-org-directory))
. – wvxvw Mar 20 '16 at 16:47