[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal for 'package-isolate' command
From: |
Philip Kaludercic |
Subject: |
Re: Proposal for 'package-isolate' command |
Date: |
Thu, 17 Aug 2023 14:04:09 +0000 |
Thierry Volpiatto <thievol@posteo.net> writes:
> Hello Philip,
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Thierry Volpiatto <thievol@posteo.net> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>>> No don't worry, helm will work in any cases, thanks.
>>>>
>>>> OK, in that case I'd prefer to keep it the way it is.
>>>
>>> Ok, fair enough.
>>>
>>>>>> Mainly to avoid issues with packages that might place files in the
>>>>>> configuration directory, which might hinder the reproduction of bugs.
>>>>>
>>>>> Hmm, maybe, I don't have an example in mind though.
>>>>
>>>> It might not be the best example, but my package autocrypt generates a
>>>> file in the `user-emacs-directory'. If we don't use --init-directory,
>>>> the existing file would be re-used.
>>>
>>> Ok, for such case it is easy to either rename the file temporarily to
>>> foo_ori or foo_save or to set the variable handling the file (generally
>>> it is not harcoded) to something else. But another issue is if your
>>> isolated package needs the history file or tramp file or whatever file
>>> ~/.emacs.d is handling; e.g. a package providing completion on history.
>>> I still think it is more handy to reuse user-emacs-directory and its
>>> elpa directory where the packages are already installed.
>>
>> How about this patch, that will use a temporary directory when
>> `package-isolate' is invoked with a prefix argument (not sure what the
>> default should be, I guess reusing `user-emacs-directory' is less
>> surprising):
>
> Yes.
>
> Isn't these two loop the same? (save one loop)
No, because that assumes that we are only interested in the first
package descriptor in every package--alist entry, while there might be
multiple.
> (cl-loop for p in (cl-loop for p in (package--alist) append (cdr p))
> unless (package-built-in-p p)
Also, do we want this or wouldn't it be useful to be able to force a
built-in package being loaded?
> collect (cons (package-desc-full-name p) p) into table
> finally return
> (list (cl-loop for c in (completing-read-multiple
> "Isolate packages: " table
> nil t)
> collect (alist-get c table nil nil #'string=))
> current-prefix-arg))
>
> (cl-loop for p in (package--alist)
> for desc = (cadr p)
> for name = (car p)
> unless (package-built-in-p desc)
> collect (cons (package-desc-full-name desc) p) into table
> finally return
> (list (cl-loop for c in (completing-read-multiple
> "Isolate packages: " table
> nil t)
> append (cdr (alist-get c table nil nil #'string=)))
> current-prefix-arg))
>
>
>> [2. text/x-diff;
>> 0001-Add-command-to-start-Emacs-with-specific-packages.patch]...
- Re: Changes to make in elpa-packages file for nongnu elpa, (continued)
- 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
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/17
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/17
- Re: Proposal for 'package-isolate' command, Eshel Yaron, 2023/08/17
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/17
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/17
- Re: Proposal for 'package-isolate' command,
Philip Kaludercic <=
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/17
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/17
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/17
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/17
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/17
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/18
- Re: Proposal for 'package-isolate' command, Eli Zaretskii, 2023/08/18
- Re: Proposal for 'package-isolate' command, Philip Kaludercic, 2023/08/18
- Re: Proposal for 'package-isolate' command, Thierry Volpiatto, 2023/08/18
- Re: Adding package and package-vc to ELPA, Philip Kaludercic, 2023/08/18