From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Proposal for 'package-isolate' command Date: Thu, 17 Aug 2023 05:53:23 -0500 Message-ID: <1ad02200-31fd-b0c5-a10d-ab4cc556618d@alphapapa.net> References: <87v8dgjdrm.fsf_-_@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33756"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cc: emacs-devel@gnu.org, me@eshelyaron.com, thievol@posteo.net To: philipk@posteo.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 17 12:54:24 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 1qWae0-0008bQ-E1 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Aug 2023 12:54:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWadK-00015p-Ok; Thu, 17 Aug 2023 06:53:42 -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 1qWadI-00011C-IP for emacs-devel@gnu.org; Thu, 17 Aug 2023 06:53:40 -0400 Original-Received: from gecko.ash.relay.mailchannels.net ([23.83.222.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWadF-0002GS-Bs for emacs-devel@gnu.org; Thu, 17 Aug 2023 06:53:40 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 223A6101C4F; Thu, 17 Aug 2023 10:53:25 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a311.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id ABF10101B18; Thu, 17 Aug 2023 10:53:24 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1692269604; a=rsa-sha256; cv=none; b=eG7Xvj9M8uTwNGjOCmaAU5w7MM5oD0ysvGFgUWZwBwNhyuiA84lnMBMziR0MJnh+th/Aw7 M20pArXPE6/DGattI2PRiPKrB2bdWIJHNr8XMxJpE0PRNyTuZssyPffOMaPLyYZcN7EFRR y3NdG/M3c91f3G/jOL48pQyhUfyWnd06chrYxfSHLhP1b368w++ntkNImVWd52HNHFy2bD rR0MXiXIMKXQs+/Eksl/cPiGFJakVv6F3rRu49g+vcur74g1eIj4kH4VGFf9EmGMifjQTa xdpYRj+4p59JviUWoxUFKTTaGg2DdnEHK9mhYZ4eZN7/5eGToVnARYGFYaBXDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1692269604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CerXedE1luB5wzUoM26DXsc6rEXoHpa0nqzFNptVz0Y=; b=bZyxEaa/CkxgheTr+EdbwxDIOLmAytORPVDanYkw7HYYuN99aIKq05OcbBducokiLSehh3 MjWeFbxuSmPhj9Go930NUqTyY1+3CsMgfmlTTZWih6lkCb+Sxg8Oi4eXgAL6V7HdPf2pDx mJOvnVeTpiGZ6J4593mTXwOyfcLafqhBugXv86q/rvzFbydl5BAKshaFGC+kDLTcOH9OJN 8vFoEgP2WS+gmj41+/ye8zrSBD4CDDpbW8C0ZIXCzGphL7EQ2vEaV8JdCHiPR7EB3r251U vpjGWEPf4RkJPHli76zyUBQ2Jea94xpNhF8PsxnqgGKKWyGyjpKa+PzoqWgBeg== ARC-Authentication-Results: i=1; rspamd-749bd77c9c-8vqk2; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Oafish-Industry: 54445b014c8d4300_1692269604954_907595923 X-MC-Loop-Signature: 1692269604954:2097750944 X-MC-Ingress-Time: 1692269604954 Original-Received: from pdx1-sub0-mail-a311.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.48.126 (trex/6.9.1); Thu, 17 Aug 2023 10:53:24 +0000 Original-Received: from [10.43.3.66] (unknown [193.56.116.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a311.dreamhost.com (Postfix) with ESMTPSA id 4RRMLC6dtHz13; Thu, 17 Aug 2023 03:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1692269604; bh=CerXedE1luB5wzUoM26DXsc6rEXoHpa0nqzFNptVz0Y=; h=Date:To:Cc:Subject:From:Content-Type:Content-Transfer-Encoding; b=iDjKva2iMKZYQFSWX+SmBDrOwxNVpR/soxIyT19xfPr/Elws9bijuuEIH+ubwAtaC rJ2/KEJlcBkpVTPD6Qt8SPJEs/YyQjTU0fUC74dwrGub6llCK6fGlPGb+TVNhqeEsH QGAFEEf6ukmCxNuTHBOm8vNZMITpJPrBePZlXqAVyj+dNKixWVzPOrWjjNHN95rTe5 Uz15jGY9Ei2yinhcRBFnzj5WVAuYmo755hY1/JUeg0R5bFsPyhdDK3PUMK22t12qU5 lzmSV2rXqiKBX64LXI0kh2mNIjxBvqphb0EpGLLnEEqybka3l4NVvNiZeAYkD4F12C 1xnzzFwhNcQwA== Content-Language: en-US In-Reply-To: <87v8dgjdrm.fsf_-_@posteo.net> Received-SPF: neutral client-ip=23.83.222.66; envelope-from=adam@alphapapa.net; helo=gecko.ash.relay.mailchannels.net X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 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, NICE_REPLY_A=-3.165, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 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:308854 Archived-At: FWIW, I've been using this script of mine, with-emacs.sh, to do the equivalent for nearly four years now: https://github.com/alphapapa/with-emacs.sh It works on older Emacs versions from before the "--init-directory" option was added, as well as Emacs 29.1. For example: with-emacs.sh --install org-ql That starts Emacs in a clean, temporary config directory (which is deleted after exit), runs package-refresh-contents, and installs org-ql and its dependencies. Or if you want to run in a specific config directory, which will not be deleted on exit, use the option, e.g. with-emacs.sh -d ~/src/emacs/configs/ap.el It sets the frame title accordingly, so multiple Emacs sessions in multiple config directories can be run simultaneously and distinguished: https://github.com/alphapapa/with-emacs.sh/blob/0bc4f216ed101d86d2e5d52919bad39bc041bdbe/with-emacs.sh#L187-L188 I've found it invaluable for debugging problems that users of my packages report. It's mostly implemented in Bash, with some embedded Elisp. It could be written entirely as an Elisp library, if desired. Anyway, feel free to draw any inspiration or code from this script if it helps.