Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: emacs-devel@gnu.org >> Date: Tue, 15 Aug 2023 16:55:03 +0000 >> >> +*** New command to start Emacs only with specific packages >> +The command 'package-isolate' is equivalent to starting Emacs with the >> +-Q flag and loading specific packages (and their dependencies) >> +manually. > > Seems strange to me to have a command to start another Emacs. Why not > implement this as a command-line option instead? That would be > consistent with the several options we already have, like -q, -Q, -D, > which already contrl what happens at startup. Mainly because this wouldn't support a completing-read interface, that simplifies prompting the user for a set of packages. But perhaps the bulk of this command could be implemented as a CLI option, that this command could wrap? >> + (let* ((real (package-desc-dir package)) >> + (link (expand-file-name (file-name-nondirectory real) elpa))) >> + (make-symbolic-link real link t) > > Using symbolic links makes the program less portable, so it is best to > avoid them. The reason I used them here, instead of just adding the directories under ~/.config/emacs/elpa/ is that startup.el issues a warning along the lines of Your `load-path' seems to contain your `user-emacs-directory' ... My previous patch actually included the code that suppresses all warnings during initialisation, so I've removed this hack. >> + (apply #'start-process (concat "*" name "*") nil >> + (append (list (or (emacs-executable) "emacs") > > I don't think it's a good idea to invoke just "emacs", it could be a > completely different version of Emacs. > >> +DEFUN ("emacs-executable", Femacs_executable, Semacs_executable, 0, 0, "", >> + doc: /* Return a string with the file name of the Emacs executable. >> +If this is not known, nil will be returned instead. */) >> + (void) > > I don't understand why you need this primitive. What's wrong with the > usual paradigm we use everywhere else: > > (expand-file-name invocation-name invocation-directory) Because I failed to remember it. This also appears to not have the risk of returning nil, as my proposed command could have. I've applies these and related changes below: