You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for making a literate version of starter kit (and Org Babel for that matter). It's been a tremendous learning experience and the structure and literate format makes it much easier to understand what is going on and what I was thinking when I made decisions.
Now, the part that leaves me scratching my head for the past few days is this: is there any way to avoid using emacs's Customize facility and custom.el? The only thing missing from this setup is literate documentation of variables set through M-x customize-*, so I've tried to move as many of them as possible into <username>.org. But some built-in functions seem to rely on variables being set beforeafter-init-hook is called whereas starter kit kicks into action after all packages are loaded.
I submit the following as an example. I'd like to document (desktop-save-mode 1) in <username>.org. I've tried all sorts of tricks to set it and then call (desktop-read), but I always start getting random errors such as:
File mode specification error: (error "Don't know how to make a localized variable an alias")
It seems that desktop.el is designed not to work the way I would like it to as can be seen in the last few lines of the file:
;; ----------------------------------------------------------------------------
;; When `desktop-save-mode' is non-nil and "--no-desktop" is not specified on the
;; command line, we do the rest of what it takes to use desktop, but do it
;; after finishing loading the init file.
;; We cannot use `command-switch-alist' to process "--no-desktop" because these
;; functions are processed after `after-init-hook'.
(add-hook
'after-init-hook
(lambda ()
(let ((key "--no-desktop"))
(when (member key command-line-args)
(setq command-line-args (delete key command-line-args))
(setq desktop-save-mode nil)))
(when desktop-save-mode
(desktop-read)
(setq inhibit-startup-screen t))))
So is there any way of setting desktop.el to load the saved desktop on startup without essentially rewriting that code into <username>.el? And beyond that specific example, is there a particular pattern or technique that would make it possible to document all settings from /Customize/?
I guess a line could be added to init.el which would look for something like starter-kit-init.org and execute that code as part of init.el, but I didn't want to go down that path unless there is no other / better way.
The text was updated successfully, but these errors were encountered:
I've occasionally added lines directly to init.el when I need something loaded before the after-init-hook or before the full starter kit. Perhaps adding a couple of lines to init.el to load a starter-kit-init.org or starter-kit-preload.org or somesuch if it exists would be generally useful...
First, thank you for making a literate version of starter kit (and Org Babel for that matter). It's been a tremendous learning experience and the structure and literate format makes it much easier to understand what is going on and what I was thinking when I made decisions.
Now, the part that leaves me scratching my head for the past few days is this: is there any way to avoid using emacs's Customize facility and
custom.el
? The only thing missing from this setup is literate documentation of variables set throughM-x customize-*
, so I've tried to move as many of them as possible into<username>.org
. But some built-in functions seem to rely on variables being set beforeafter-init-hook
is called whereas starter kit kicks into action after all packages are loaded.I submit the following as an example. I'd like to document
(desktop-save-mode 1)
in<username>.org
. I've tried all sorts of tricks to set it and then call(desktop-read)
, but I always start getting random errors such as:It seems that
desktop.el
is designed not to work the way I would like it to as can be seen in the last few lines of the file:So is there any way of setting
desktop.el
to load the saved desktop on startup without essentially rewriting that code into<username>.el
? And beyond that specific example, is there a particular pattern or technique that would make it possible to document all settings from /Customize/?I guess a line could be added to
init.el
which would look for something likestarter-kit-init.org
and execute that code as part ofinit.el
, but I didn't want to go down that path unless there is no other / better way.The text was updated successfully, but these errors were encountered: