From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: North Year Newsgroups: gmane.emacs.devel Subject: Re: Eglot, project.el, and python virtual environments Date: Thu, 17 Nov 2022 01:47:08 -0500 Message-ID: References: <87zgcq68zp.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23792"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.10; emacs 28.2 Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 07:55:57 2022 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 1ovYoW-0005xa-TD for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 07:55:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovYo9-0000kW-FY; Thu, 17 Nov 2022 01:55:33 -0500 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 1ovYo5-0000k9-L2 for emacs-devel@gnu.org; Thu, 17 Nov 2022 01:55:31 -0500 Original-Received: from mail-bn7nam10olkn2012.outbound.protection.outlook.com ([40.92.40.12] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovYo3-0007sv-Oj for emacs-devel@gnu.org; Thu, 17 Nov 2022 01:55:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EwL6J7CkOJz9kVoaRkN3qcFduUg/7gBEYxTr6RVfepW6BZxAfFbhu3rW44BTKFcNMAD9YogA9zzJTkF3QPnrq7XTuWvuZ6QYY8Z5Q6i7y3aGUyZkMJJ8sC28edbqLjIPwW7fKN/xunNIgtTxcbd/TK7guVyI6Io0A/YSUecbs7Mb0iprcZX9VlI2ddO9X46gBFQHGAhHa4jy/P7EPPlunNQcu0Fs2kRNVeZQqXIJxcZ45xjpSc6TQqlafy+N8KGdNhE91rScmq639e1Z1ExwIK8EaFdx//Im66+ijLV3wUDvOcos2n+X35Z9XH/gE16bMq3zri3gUBqScFxg9Nn/Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dp9S9nbO1FVR0Ze/M1Rneqio62QIH0I3cFmfq6rMZoA=; b=OeRDzh1lXgdTl9G2U5Z3jtUousLVaRu0LIycvxvy0z3cQWX8D47rwpC+HFm904FGvvqg5f2eyYBbEThksJP+zSZZW+Dc90j0G1HKZVFVBdV71x/XS6nEhZSVcYK6GWgMtBNJu/AtvKbsL1sxt/EfqgI1rPEgVR1pZCLMxuC5JxNb74brhl/tnrQbnt4RT1lFLC24KPB/S20QPIk2C77AmnBjHvDtbvCnRYENoNsEpVFflAM/hxR861a8muRyneSaQbvApLBZCwRx1Rv7t7VbLIg858stIJMCuBfASYN8PJArG1d78ppPV2uOb6rxvt4QWnaioK9tg0sgcd8EBTTtXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dp9S9nbO1FVR0Ze/M1Rneqio62QIH0I3cFmfq6rMZoA=; b=LFTSaFovt0Tp5a+u4tcMykkqU+PHogNuTGV5glxmhSxRbjQZOXxLZBNYgu7FMNGKy6o3MMNPDNAw7Umj6lHHp6Z2/NCk65xO01t6HcFlefo4ehr/XMWTvFNb3mZ8ItWohZmMOtJNf6vCvI4AYdFD3k5+l/4mWslpK54K4rjU04gb0FnlWujqrG2GhjUL0wJSS5acvrX95aQAd+Qn9PARaJezb4ZXPgwFDQWSvfztFCkrRMnoQqDwD383H91Pvdg6uP+ttXWaOow4vvPXePoJXEZ/fe/Tf4zHypezci999bflyRqHAtxKUMfCPO6kg3oPd7U6+mUHnk0mAAq2ICDUkA== Original-Received: from MW4PR14MB5327.namprd14.prod.outlook.com (2603:10b6:303:186::9) by CH3PR14MB6323.namprd14.prod.outlook.com (2603:10b6:610:14f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Thu, 17 Nov 2022 06:55:25 +0000 Original-Received: from MW4PR14MB5327.namprd14.prod.outlook.com ([fe80::dba6:bcfd:576c:f8cc]) by MW4PR14MB5327.namprd14.prod.outlook.com ([fe80::dba6:bcfd:576c:f8cc%6]) with mapi id 15.20.5834.009; Thu, 17 Nov 2022 06:55:24 +0000 In-reply-to: <87zgcq68zp.fsf@ericabrahamsen.net> X-TMN: [c0pxImI+BXch2rvM7UCuJFEUt04XYfvCuz/KWwBh2r7O9dHU5e6Q1UwH3Sk07lq/] X-ClientProxiedBy: MN2PR07CA0028.namprd07.prod.outlook.com (2603:10b6:208:1a0::38) To MW4PR14MB5327.namprd14.prod.outlook.com (2603:10b6:303:186::9) X-Microsoft-Original-Message-ID: X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR14MB5327:EE_|CH3PR14MB6323:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f0e5de1-b9b7-4648-00f5-08dac868b3bb X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BkiKpDFbUyFj0SkbqLbpxe1EnoW1myxTsDeo98eQ31IfHmoc/J5blX17lTZYEHWiZ1NPoNyc+rh6R3d97tHo4UsAfOzqktxMhR2w1P8o1MAQNNHOsxM/fQnGwBKwr3pcR/rt9gFReZ1IevZKZVRuEt/TstSqkA1yJRD147AdwBt5K+aqn/zlThCqO9lpLako9PwXLsMptrEHjoVbTuPUuDlcLg0W3dlthJ60y0JrbKbQ9tMwrQOFA6aUxM/ipmG+5Iz8suU4RAqSrOu3ophZo6AZbLOTkBifIZhZIf7WcU1tgcksZ3L73uB4s+Cyyst9MBXd8pAIg6ZUrkq4FDVNVYREQMoWcmwvNC9ynPE/Lex1lXabDUK5JHehOJoCl8M5wrzcoxgYRchbbI+mbB3k4c/m1711wPE157hPWYXEtRzpL6RqeOnPPQTKWVq8OAweEUTaJKpy6shz8V4EePDiw5X5vIO6JWQbAVwVB2ZL2lSr0LnrQdAbK0fLw0p9HkBb2/YIYFnPmIwDNvEuGh9tbB/hULDcqFQu4KlSQqVZ0keA4yMx83Gmg2zwThwsncGoe47itg3muNHY/lUbAA4+jnxzH0c0xzlpKoHaXdLGgKBXviNakqd/33DLi2HHXRa+tQc10xoR1/VEcAqftGohLQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bE91bDhxS2dvcjJ2eHRVOG5xRDJ3Rzd4cWNCMEk2Q3VzdDAxTm1HbWZhbTM1?= =?utf-8?B?MTJjSFNqUXNOVjJhMUFCQWZEYVRJU0Y1eWlGenQ2ckk0bDFaYy9wTmpFclAz?= =?utf-8?B?RklFcVhvM0hXKzQzQTdYMUI3VkFCUHdHc1Bkc2oxeEtXb04xM1hqN1ZuRU5r?= =?utf-8?B?bGRJUGNOZk1PSHNYUnRzVk5xZy9NUlpyMENNQ3JKZkhsTDM1WE56MkFCQ0JX?= =?utf-8?B?NGZEVi9aZjl0R25obVJ1Z21RZEZUNmJCQk9OOWJTaWF5QlZHanAyK0xHMUFq?= =?utf-8?B?LytORWlNZXB5THBlbEFvRWNvYmxQdXBYNk1LdVE2S2dQbjZJakYyR0w1dEpH?= =?utf-8?B?WFFsUEtUTmdZRzBXQXlnRDlsZ3F4bno1Rm1qYndTOURSejd1dHFBTWt5Y0R6?= =?utf-8?B?cUdlRy9kUkJNbTBWT3Y4VFJTdzMzUUtPdFRZUHJSckJ1V1J6VnBoOVBUSTIz?= =?utf-8?B?eHdObXVsSHVNY1I0dXA5YzIyTDZSV0JMYkxzVmIwK3pYWGtTQmFmT0NpR29J?= =?utf-8?B?NHhaeWhqaGtBRnZmeHNhak10ZHFSZ2tlY290WHNtZWlIcmMvdVR5Z2k2cHJX?= =?utf-8?B?TGJTdlNpMU1NQTFSNk9WR0dNSDVuRkN3aXFmNGlVWFdoektseDhyZEkxYTcv?= =?utf-8?B?ZzlVVm5GdkhlalIxb0VIWTF3ZjZKT1JUU04vQU X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f0e5de1-b9b7-4648-00f5-08dac868b3bb X-MS-Exchange-CrossTenant-AuthSource: MW4PR14MB5327.namprd14.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2022 06:55:24.8407 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR14MB6323 Received-SPF: pass client-ip=40.92.40.12; envelope-from=ny-ml@outlook.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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:300012 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Eric Abrahamsen writes: > Hi, > > Here=E2=80=99s another issue that=E2=80=99s technically a emacs.help ques= tion, but might > result in some code/documentation updates, so I=E2=80=99m sending it here= . > > My main day-job code base is an AWS CloudFormation monstrosity involving > several Python Lambdas, among other things. Basic project structure > looks like: > > project_root > =E2=94=9C=E2=94=80=E2=94=80 .git > =E2=94=9C=E2=94=80=E2=94=80 src > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 python > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 VeryImportantLambda > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .venv > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 MoreImportance > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .venv > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 RunInCaseOfEmergency > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .venv > > I=E2=80=99m using the python-lsp-server python package in each Python > subdirectory, and the key is that each of those directories is a virtual > environment that needs to stay isolated from the others. Each has > different packages installed, and in some cases even the Python versions > are different (though I=E2=80=99m trying to get rid of that). Maybe I have a silly solution, Since you are using .git, then maybe you can create a .hg, .svn, or what ever CVS tools other than svn, in VeryImportantLambda folder, MoreImportance folder, and RunInCaseOfEmerge= ncy folder. Then when you visit files in VeryImportantLambda folder, then project.el will set the project root at VeryImportantLambda, I think everything would just be fine there. As long as you don=E2=80=99t launch eglot python lsp in the =E2=80=9Cactual= =E2=80=9D project (which is .git), which for example is project_root/src/python/main.py then everything should be fine. Just have a try where test is a .git folder and test/test2 and test/test3 are two .hg folde= r, then eglot will launch two lsps at test2 and test3 folder. You can just add .hg to your .gitignore and magit can used as usual with no= pain. This is a really stupid but I think with not too much effort try. =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95 [eglot] Connected! Server `EGLOT (test3/python-mode)=E2=80=99 now managing = `python-mode=E2=80=99 buffers in project `test3=E2=80=99. [eglot] (warning) Server tried to register unsupported capability `workspac= e/didChangeWorkspaceFolders=E2=80=99 Wrote /Users/me/Downloads/test/test3/cat.py =E2=80=9Ctest3/cat.py=E2=80=9D 1L, 23C written dog.py has auto save data; consider M-x recover-this-file [eglot] Connected! Server `EGLOT (test2/python-mode)=E2=80=99 now managing = `python-mode=E2=80=99 buffers in project `test2=E2=80=99. [eglot] (warning) Server tried to register unsupported capability `workspac= e/didChangeWorkspaceFolders=E2=80=99 =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95 --=-=-=--