[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposal for 'package-isolate' command
From: |
Philip Kaludercic |
Subject: |
Proposal for 'package-isolate' command |
Date: |
Tue, 15 Aug 2023 19:52:32 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philip Kaludercic <philipk@posteo.net>
>> 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:
0001-Add-command-to-start-Emacs-with-specific-packages.patch
Description: Text Data
- Re: Changes to make in elpa-packages file for nongnu elpa, (continued)
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/07
- Re: Changes to make in elpa-packages file for nongnu elpa, Philip Kaludercic, 2023/08/07
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/08
- Re: Changes to make in elpa-packages file for nongnu elpa, Philip Kaludercic, 2023/08/08
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/08
- Re: Changes to make in elpa-packages file for nongnu elpa, Philip Kaludercic, 2023/08/15
- Re: Changes to make in elpa-packages file for nongnu elpa, Eshel Yaron, 2023/08/15
- Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/15
- Re: Proposal for 'package-isolate' command, Adam Porter, 2023/08/17
- Re: Changes to make in elpa-packages file for nongnu elpa, Eli Zaretskii, 2023/08/15
- Proposal for 'package-isolate' command,
Philip Kaludercic <=
- Re: Proposal for 'package-isolate' command, Eli Zaretskii, 2023/08/16
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/16
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/16
- Re: Changes to make in elpa-packages file for nongnu elpa, Philip Kaludercic, 2023/08/16
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/16
- Re: Changes to make in elpa-packages file for nongnu elpa, Philip Kaludercic, 2023/08/16
- Re: Changes to make in elpa-packages file for nongnu elpa, Thierry Volpiatto, 2023/08/16
- Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/16
- Re: Proposal for 'package-isolate' command, Stefan Kangas, 2023/08/16
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/16