From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Proposal for 'package-isolate' command Date: Wed, 16 Aug 2023 18:34:42 +0000 Message-ID: <87pm3mj0ot.fsf_-_@posteo.net> References: <87r0oftgye.fsf@posteo.net> <87350vt1wz.fsf@posteo.net> <871qgen1ln.fsf@posteo.net> <87edke4mou.fsf@posteo.net> <87wmy6kuan.fsf@posteo.net> <87wmy6w070.fsf@posteo.net> <87zg2sjleg.fsf@posteo.net> <87pm3nlbm7.fsf@posteo.net> <87zg2ri9g9.fsf@posteo.net> <87bkf7b7ls.fsf@posteo.net> <87v8dfi6zy.fsf@posteo.net> <877cpvb361.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5345"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 16 20:35:33 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qWLMh-000178-Nt for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Aug 2023 20:35:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWLM3-0000WM-VH; Wed, 16 Aug 2023 14:34:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWLM2-0000WD-BK for emacs-devel@gnu.org; Wed, 16 Aug 2023 14:34:50 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWLLz-0000Jb-KU for emacs-devel@gnu.org; Wed, 16 Aug 2023 14:34:50 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4BC9A240027 for ; Wed, 16 Aug 2023 20:34:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692210884; bh=zRxpS//5lA2vUlMWGFM+9wTVHNEfg6NxwPch50yKQeQ=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=g/XFARebrrbtEXVt7G9Sic8ZzACc28hlQzJytyu8Bsc2C4nxGmEwn8aP08GogCe6s 2hV/p3k4MdhaHbvfmLcbAZYSkJS9Ne5An3uzRmsyQWjXectZ2RbBtDxSJs6mftwt1b sQDb09VLZr4tx7e1g/XGVmp3semN2ncSkKwwPgNCu+63/Pc7PuqyLlDaHBWI3gQSCU 9Rsl3emvOx3WkoK10vGTDl8wKpN4ViGKy80zJuhj8jyAo1E6GAkRK/MM+nUvSpiwId tUUSVMlrmANyXNdvPfo2tkbpYrCVzGvfb49vNCHxHR/j6gmNJr6cqNpmpqtnrVpMdy vENG8q0oGKehQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RQxcz60G9z6txD; Wed, 16 Aug 2023 20:34:43 +0200 (CEST) In-Reply-To: <877cpvb361.fsf@posteo.net> (Thierry Volpiatto's message of "Wed, 16 Aug 2023 11:55:13 +0000") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308832 Archived-At: Thierry Volpiatto writes: >>>> I don't know much about Helm, but does it not support CRM? >>> >>> It does, but this is a much better interface than CRM. >> >> I don't think it makes sense to add support like this in the core, > > Perhaps yes. However it doesn't requires helm: > > (let ((helm-comp-read-use-marked t)) > (if (and (boundp 'helm-mode) helm-mode) > (completing-read ...) > (completing-read-multiple ...) > >> but is there something we should keep in mind to not hinder >> integration with Helm? > > 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. [...] >>>>> (let* ((name (concat "package-isolate-" (mapconcat #'identity >>>>> packages ","))) >>>> >>>> This doesn't work, because the above returns a string, not a list of strings. >>> >>> No, it works, the above returns a list of strings (the completing-read >>> allows marking and returns always a list). >> >> Not in my case, I got a type error. > > Yes, because the let-bounded var had no effect in your case, otherwise > when helm is installed and helm-mode enabled the completing-read will > always return a list. Right, but that is the issue here, because using completing-read, especially in the core, shouldn't make any assumptions like that. In the end this boils down to the fact that completing-read and co. are a over-burned interface... [...] >>>> It seems to me, that for a proper isolated environment, we should add >>>> a --init-directory option. >>> >>> Why as long as other directories in elpa are not in load-path? >> >> 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. >> Upon reflection, my approach might have an issue if the user wishes to >> install a package, for the sake of testing within the isolated >> environment. > > Yes, one more reason to use the original elpa dir ;-) No, because in that case the package installed in the temporary environment would be retained in the original elpa/ directory, which I think we /don't/ want. >> Perhaps it would be better to set `package-directory-list' instead? > > Don't know yet. Even better, I have added all directories that `package-load-all-descriptors' would load to `package-directory-list', which should be more robust. >> Also, would it make sense to have some visual/textual indication that >> this is a testing environment? Perhaps the *scratch* buffer string >> could be modified or the default background colour could be set to >> something else. > > No particular opinions about this. I guess this is too controversial. Perhaps just adjusting `frame-title-format' would be enough. [...]