Hi,
I want to make my EmacsConf22 demo self-contained. However, so far I'm failing in setting up the use-package.
I've included the start of my setup until the error occurs. I even stole from a different setup, ending up with the very same error (see "FIXXME").
Edit: the Elisp code is supposed to be part of a custom start file when started with \`emacs -q\`
;; parts of the Emacs setup is copied from: https://gitlab.com/skybert/my-little-friends/-/blob/master/emacs/.emacs
(defun my-message(string)
"Print out a message with mild formatting"
(interactive)
(message (concat "————→ " string " …"))
)
;; (my-message "")
(my-message "START of demo config setup")
(my-message "turn off backup files")
(setq-default backup-inhibited t)
(my-message "set start of week to Monday (not Sunday) as I prefer and it should be according to ISO: https://en.wikipedia.org/wiki/ISO_week_date")
(setq-default calendar-week-start-day 1)
(my-message "set encoding")
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(my-message "creating ephemeral configuration directories including ELPA storage")
(make-directory "configuration/elpa" "also create parents")
(my-message "setq user-emacs-directory to current directory")
(setq user-emacs-directory "configuration")
(my-message "setq package-user-dir as sub-directory")
(setq package-user-dir "configuration/elpa") ;; local demo elpa tree
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(my-message "Emacs package management")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(my-message "Initialise the emacs packages in case any of them overrides built-in Emacs packages")
(package-initialize)
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
(setq package-archives '(("melpa" . "http://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
)
gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"
)
(my-message "Ensure use-package is installed and loaded")
(condition-case nil
(require 'use-package)
(file-error
(my-message "require 'package")
(require 'package)
(my-message "package-initialize")
(package-initialize)
(my-message "package-refresh-contents")
(package-refresh-contents)
(my-message "package-install 'use-package")
(edebug-all-defs) ;; FIXXME: doesn't catch the issue
(package-install 'use-package) ;; FIXXME: I get "make-directory: Wrong type argument: stringp, nil"
(my-message "require 'use-package")
(require 'use-package)))
(my-message "setq use-package-always-ensure: Set to true to have use-package install all packages mentioned if they're not already installed.")
(setq use-package-always-ensure t)
;; ... more definitions and functions for the demo setup ...
Yes, this is not a minimal example. However, I wanted to make sure to include my whole setup until the issue arises in order to mention any side-effect and also to get feedback from you, if you've got improvement ideas. :-)
The end of the output is:
[...]
————→ package-install ’use-package …
Edebugging all definitions is on.
Setting ‘package-selected-packages’ temporarily since "emacs -q" would overwrite customizations [2 times]
Contacting host: melpa.org:80
Generating autoloads for bind-key.el...done
Wrote /home/vk/src/2022-12 EmacsConf22 - org-super-links demo/configuration/elpa/bind-key-20220910.2157/bind-key-autoloads.el [2 times]
Checking /home/vk/src/2022-12 EmacsConf22 - org-super-links demo/configuration/elpa/bind-key-20220910.2157... [3 times]
Compiling /home/vk/src/2022-12 EmacsConf22 - org-super-links demo/configuration/elpa/bind-key-20220910.2157/bind-key.el...done
Wrote /home/vk/src/2022-12 EmacsConf22 - org-super-links demo/configuration/elpa/bind-key-20220910.2157/bind-key.elc
Checking /home/vk/src/2022-12 EmacsConf22 - org-super-links demo/configuration/elpa/bind-key-20220910.2157...
Done (Total of 1 file compiled, 2 skipped)
Contacting host: melpa.org:80
Parsing tar file...done
Extracting use-package-20221012.1743/
make-directory: Wrong type argument: stringp, ni
There seems to be an issue with creating a directory. I don't know what to change to fix this. Do you have an idea?