I am trying to achieve a slightly smart package management in my
init.el file but can't achieve it because of ELisp ignorance. Here is the case.
;; package loader function (defun load-packages-context-sensitively (plist) (dolist (ppack plist) (unless (and ((not window-system) (string= (assoc ppack plist) "GUI"))) (require '(ppack))))) (defconst package-assoc-list '((package-1 "CLI") ;here (package-2 "CLI") ; I (package-3 "GUI") ; declare (package-4 "GUI") ; my packages (package-5 "CLI"))) (load-packages-context-sensitively (package-assoc-list)) ; here we need a happy ending
I simply want to generate an associated list (I'm not even sure if its the right data structure) and map each package name
(provide 'package-x)'ed in another file to "GUI" and "CLI" strings. What I want to achieve is to pass the list to my slightly-smart-function and prevent GUI packages being loaded in CLI environments...
It gives me
Symbol's function definition is void: package-assoc-list error now. Yes it looks very self-explanatory, it is well documented but I couldn't find a way to overcome it.
Any help, any correction, any suggestion, any cringe is more than welcome.