From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 22 11:38:32 2025 Received: (at submit) by debbugs.gnu.org; 22 Aug 2025 15:38:32 +0000 Received: from localhost ([127.0.0.1]:37205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upTqa-00082h-0f for submit@debbugs.gnu.org; Fri, 22 Aug 2025 11:38:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53202) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upTqV-000820-Aw for submit@debbugs.gnu.org; Fri, 22 Aug 2025 11:38:28 -0400 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 1upTq4-0005e0-9T for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2025 11:38:04 -0400 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1upTpq-000230-7x for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2025 11:37:57 -0400 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id DD24AEC0832 for ; Fri, 22 Aug 2025 11:37:39 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 22 Aug 2025 11:37:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm1; t=1755877059; x=1755963459; bh=wySJzr5Nb20HdgMR3SrHPmGRe7pD4X7R uXeZCVm4UAc=; b=VOLRuK/j/YKAadEkBrB0TIgIwMduMqn1ERdoNDcV8F35uWPw qumm21NSJxZgL+YjqrtQoX1Wk/zMf4NQRYjtLVAwtJ9QYAotk/MrKwckvrPU1iLC 6aVmZnGTEb6RGy/P/kuA1A5dUr3HqDRr3uNUIEL2XkY+uedoPldjfALNE9CnmhnZ IUQAT4ZF6Ri36d0f/e2+v4qvq40w1wHwtwCanMSHtF1uYx1J76dOKUXjMVT/lMIK xcrKVVCBFp8bCCgaJGk6Ty66h0tes/5zLyUDf3WlSOSZ0Lnh8BH4IbXS6rKo/FZR 8f9Ym9AdI838GBBfQ2/NTdBjKbopWtdP+XgtiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1755877059; x= 1755963459; bh=wySJzr5Nb20HdgMR3SrHPmGRe7pD4X7RuXeZCVm4UAc=; b=F 1MdHjHbumSfMre7N73erN/Ru2OPlXa26pxZj2dYiBND/SRNC1AKdvabtTk7o9AOK gK6P0qx8lUq/4D2ojC7g1r/pYyM3ZLMQpGM5HAW1wwUSb+PVUjRfqM6EvBWGGViT ou9XIqCrFa+41c1cvkN8Vpby2cXey319gqqe/TZvjFkXtsysm372TC4I3LEs6pkC yKWeY7OjsViNwBUOF/7usC3WBBv6quZOitc7twS9hm1FWhGnzhJS2dgXY8VHiiqc d6NJEWFRHOMv7H6H6/rmpYJ61MWQF74ZYWAsIkB2BLR/ToxRlRNcvzO3Ih3BwzD+ 5zE2wJ8VztWLfy+CCqGgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduieegudegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvffufgffkfggtgesthdtredttdertd enucfhrhhomhepffhouhhgucffrghvihhsuceouggurghvihhsseguuggrvhhishdrihho qeenucggtffrrghtthgvrhhnpeetjefgveejvddtlefhveetffelhffgieevkeevvdffff dvfedthfdttdegteffieenucffohhmrghinheprghsthhrrghlrdhshhenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguuggrvhhishesuggurg hvihhsrdhiohdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: iae51443f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 22 Aug 2025 11:37:39 -0400 (EDT) From: Doug Davis To: bug-gnu-emacs@gnu.org Subject: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands User-Agent: mu4e 1.12.12; emacs 30.2 Date: Fri, 22 Aug 2025 10:37:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.151; envelope-from=ddavis@ddavis.io; helo=fout-a8-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) When writing an `eglot-alternatives' that looks like this: (add-to-list 'eglot-server-programs `(python-base-mode . ,(eglot-alternatives '(("basedpyright-langserver" "--stdio") ("uv" "run" "pyright-langserver" "--stdio") ("uv" "run" "ty" "server") "jedi-language-server" ("pyright-langserver" "--stdio"))))) an invocation of M-x eglot will fail to show the second instance of using uv in the resulting list that appears to be passed on to `completing-read'. (Notice the repeated use of `uv run` https://docs.astral.sh/uv/reference/cli/#uv-run) more info: the benefit of using `uv run` unloads the burden of using emacs to property setup a virtual environment; uv automatically handles running the correct installation of the invoked subcommand. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 23 09:00:45 2025 Received: (at 79290) by debbugs.gnu.org; 23 Aug 2025 13:00:45 +0000 Received: from localhost ([127.0.0.1]:39051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upnrR-0006ed-B7 for submit@debbugs.gnu.org; Sat, 23 Aug 2025 09:00:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38774) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upnrO-0006eJ-Cv for 79290@debbugs.gnu.org; Sat, 23 Aug 2025 09:00:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1upnrI-0004Ad-5k; Sat, 23 Aug 2025 09:00:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=y66cRzLkBX8SsYsv+swldEgnmAPXuLfA1R7o/rAuXsY=; b=LtqxF9vc0sDR2kkcF22b OJiBognjshtkFAfDnxJqWaYRePTce9qKEq74zZPAgly0ETWqY0LcCXHYVyov8aSdOC9wYtTd+9TO0 C0KKtpXXTYy6UH4Gwh47l/PGP0+q9MsGpC8r+v5edzyGLseVpsXASdrBOn0FPkYdJxVC7To9DTIYU 15GazQp+7LD4Tz5ZU8j6XfpZ2ChS+KnCk0KmAHaFDQX9Gi80W/SOAE3/yMZe4KBKoQk45jWSTKscf 8kWBLsfYn2Gp7ZkD6ejN9/OyqFk33kT1ZCEXp6lONTqr/J7bDLWuNKZfY+EqQUxy3XI68Zy7yx1sg ChkSv1CfHOslsA==; Date: Sat, 23 Aug 2025 16:00:32 +0300 Message-Id: <86v7me9or3.fsf@gnu.org> From: Eli Zaretskii To: Doug Davis , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= In-Reply-To: (message from Doug Davis on Fri, 22 Aug 2025 10:37:38 -0500) Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands References: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79290 Cc: 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Doug Davis > Date: Fri, 22 Aug 2025 10:37:38 -0500 > > When writing an `eglot-alternatives' that looks like this: > > (add-to-list 'eglot-server-programs > `(python-base-mode > . ,(eglot-alternatives '(("basedpyright-langserver" "--stdio") > ("uv" "run" "pyright-langserver" "--stdio") > ("uv" "run" "ty" "server") > "jedi-language-server" > ("pyright-langserver" "--stdio"))))) > > an invocation of M-x eglot will fail to show the second instance of > using uv in the resulting list that appears to be passed on to > `completing-read'. (Notice the repeated use of `uv run` > https://docs.astral.sh/uv/reference/cli/#uv-run) > > more info: the benefit of using `uv run` unloads the burden of using > emacs to property setup a virtual environment; uv automatically handles > running the correct installation of the invoked subcommand. João, any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 23 10:19:13 2025 Received: (at 79290) by debbugs.gnu.org; 23 Aug 2025 14:19:13 +0000 Received: from localhost ([127.0.0.1]:41248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upp5N-0002YJ-0y for submit@debbugs.gnu.org; Sat, 23 Aug 2025 10:19:13 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:58677) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1upp5J-0002Y0-TM for 79290@debbugs.gnu.org; Sat, 23 Aug 2025 10:19:11 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-afcb78f5df4so518993166b.1 for <79290@debbugs.gnu.org>; Sat, 23 Aug 2025 07:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755958743; x=1756563543; darn=debbugs.gnu.org; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nrhlu6TCl0ijiZvg9nT0ZUfHFgfj+3BUcs6533pYiCs=; b=iHAneADsV1AbVhgMoijFGc2diDbFO0cuNpc+QeGNclBcfBTwL2pYSQAyXILjD11FHJ +zy8VpDArqsopx6KGxsppChiCYCei4Tr8anyaiq3BowfagRIxV1CTRJ9qh+VTHd/eM89 1gegOlWg1vD6i1dPmpZ9U8BvqqoGSe44vwIQ8tQW06dGiMuaCXVS/J/RkVr7So14buZR RLsvlgkmfYTzmHg7QIGT3YaFPcIfuhx6VB0PvoRU+feswIPFlJsKd3x8gvfNb2JSMv/1 8veFc2KQP9o/rU+dMjx89WE0vCziJ3ERLClYBnpN/zs88gATXKTU4MJkpfZ19YHVLZtI MQwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755958743; x=1756563543; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nrhlu6TCl0ijiZvg9nT0ZUfHFgfj+3BUcs6533pYiCs=; b=QTP3DoqFsBJOLCtWa9EEJvItddtYETgOGZ+o8mTCKqPzlhEkM9KQwFoHRYStyJZ7hp XisxdQqanjLkVPTt/Y0I9M3xd1XiYu0aWmpHb72NRP8bYbohoGsdkQaCMm7iPkk2gtqY x/6WnyDCZsPso9nPGVDnB0cNMfYRw4bKuqNdILxq/derDLO7Y5KZiHMoHLZNn9YpTSR2 PcDLEHJd1F/VbjZuiVu0/xaJu6uA1ero3gWtZuZsyBPm692lG8oegD+AuU7EMAb03oev c2EnYXauG+zkFwt3EXt1a/Mbxuh6K0g3E01jGtv7726TyGXfoOcEwTL+SEBl5eOgN7SE ODJg== X-Forwarded-Encrypted: i=1; AJvYcCWYR093E0J+9L7DgKZvdWQ/8nSNXKw5UI8sISWUkCaqesmT/ObxuIga2Kez00VrG6Rz+Cpv1Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzxt9Eg57cOzZaubVt71Egnr7rsDWW12GQ96BnShFK1OQNpyG0z X6HFqSjS5bONenLtXDHs1bO9xbhcY1FdQ0kKuC55dCfrlQI2s9TpieDLvnbCCg== X-Gm-Gg: ASbGncsQVWe3wirOZZ9PLY4DDTAHrkf0n8P9sElgheANufTRruE2hn9zQ6DO3nHu4jH dTXsTvltdXzFIRKZoCp1oJewZHidkdUsd+983k0FPMAnhg3GvqLCRPRIIdf18syava4ChA5As54 biuKSxzGLWhvneYCN8T9RzP332uZDUW/CSrCA9g+cpY00cJEeppCk8Ky/cYtkIJ3VWfLGFfVqZ3 EnvU1+qTcKKtzcfYNjsD+oxpGAGfTUhNFLpW2extdsmGiQsfsu05AIki3ZaW4p038kKtK8JQHml H4B7Vo1B4ernoMjH6Ulrk1b/GoQRe9cRCVXUAT2zWSIarDD/OycPGMRicPz0ehRRJuslphPCiZO /kyXieEDUqLmOmMdbne0ux4KP1/YKc2o80QK1mNPX/PikoISi82pdzG65ip5ta7Iac//1H6sbLd l31rc= X-Google-Smtp-Source: AGHT+IHPdDiX/qPoNeNPbuABOhWF7Xz0B2Sv54Cau4wwGdyM1g/1WJKsjN5gtBEz5STPpTvVrtpYKg== X-Received: by 2002:a17:906:c14b:b0:afd:bc2d:f77b with SMTP id a640c23a62f3a-afe29544cacmr663966366b.30.1755958743138; Sat, 23 Aug 2025 07:19:03 -0700 (PDT) Received: from betli.gmail.com (catv-213-222-160-137.catv.fixed.one.hu. [213.222.160.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-afe5d2feec1sm74105966b.117.2025.08.23.07.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Aug 2025 07:19:02 -0700 (PDT) From: Felician Nemeth To: Eli Zaretskii Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands References: <86v7me9or3.fsf@gnu.org> Date: Sat, 23 Aug 2025 16:19:01 +0200 In-Reply-To: <86v7me9or3.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Aug 2025 16:00:32 +0300") Message-ID: <874itynmsq.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX5+fmhoaEwMDD/ ///TMNVWAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAPEgAADxIBIZvyMwAAAAd0SU1FB+AICBUfHgLs gGoAAAGXSURBVCjPRdK/b5tAFAfw753gBEwM2ApMbuVIqf+Ko0qiyhOu4sj2xJBYMn/FUdX7UUUZ OjHgyvf+yj6IcW6Bjx53934ADEvs8bmEr8UVoTYTOyJO9KoYsVofN8kILdbeJ8Li6YpZWop4xOK0 VdfIoXmkHn5/5D7/Ts/8THacSqnkKTcMTxgUkVzFnEIRTKwwYYSCvzfg16f0i8YApW/XG/Pm8R49 dXjxKmRnxv3OwooQWcv4RUYem1fsNe/WU63uk7AmYxk78y32/ee2tZB4fO+WcZ7lnIGEolXW1EGw LfkSuQ0XTgRefgNlfNwRNV6QhBxJ8JNxTMUPyBqTd0bjaAP5G7NJRU39z80hLOZTjqB7K3tEEFSj aEsuQew6qBxxyhHjVUR7H7NpC9iHJZGLMCEuweqAqE1BHbfK2oRIz9EHYA/+wiFWru9smeVfuWNZ 2+NFtX80UA1TvJNdytM4DwO4kY7bJz8Qcd0G0ceslZGkkeoBsjUHwF1+jjM3XHaXEZ7mGLfwPFO+ RV9QLY2iEdmDo78D/gNPaXVYqd+pyQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wOC0wOFQyMzoz MDoyOCswMjowMGy/yHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMDgtMDhUMjM6MzA6MjgrMDI6 MDAd4nDKAAAAAElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79290 Cc: Doug Davis , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> From: Doug Davis >> Date: Fri, 22 Aug 2025 10:37:38 -0500 >> >> When writing an `eglot-alternatives' that looks like this: >> >> (add-to-list 'eglot-server-programs >> `(python-base-mode >> . ,(eglot-alternatives '(("basedpyright-langserver" "--stdio") >> ("uv" "run" "pyright-langserver" "--stdio") >> ("uv" "run" "ty" "server") >> "jedi-language-server" >> ("pyright-langserver" "--stdio"))))) >> >> an invocation of M-x eglot will fail to show the second instance of >> using uv in the resulting list that appears to be passed on to >> `completing-read'. (Notice the repeated use of `uv run` >> https://docs.astral.sh/uv/reference/cli/#uv-run) >> >> more info: the benefit of using `uv run` unloads the burden of using >> emacs to property setup a virtual environment; uv automatically handles >> running the correct installation of the invoked subcommand. Maybe an element of ALTERNATIVES of eglot-alternatives (or the CONTACT of eglot-server-programs) cloud have an additional property named :title or :label (similarly to the existing :initializationOptions) to be used in the completing-read call of eglot-alternatives. As a workaround, Doug can create two symlinks named uv-pyright-langserver and an uv-ty pointing to uv. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 23 13:38:28 2025 Received: (at 79290) by debbugs.gnu.org; 23 Aug 2025 17:38:28 +0000 Received: from localhost ([127.0.0.1]:41557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upsCB-0003Zc-Pi for submit@debbugs.gnu.org; Sat, 23 Aug 2025 13:38:28 -0400 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:48541) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upsC9-0003Z8-6c for 79290@debbugs.gnu.org; Sat, 23 Aug 2025 13:38:27 -0400 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id A8E301400057; Sat, 23 Aug 2025 13:38:19 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sat, 23 Aug 2025 13:38:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1755970699; x=1756057099; bh=0uQH8FJ/dlcn2qo7HYvve0tiSswXpAFWESomSoxhS60=; b= lpYMuqhLGZ1iejaiyirbNDYOx3owvuthrj+Ji5SY0auCYgZl4dS4KcyC9qlusHZJ g7eNbfWRIELql+j7S6HL/hNC6LccDitM7Mv0Ci7pZ6p6kKKLhN9GdA/qUi9IYSox DwexCUb3V2wQXzXTsthvr0FAYWJVjEwm2HPSQr9XSNQ3qu1Otjz3Kgyhm8FHCKCe KrZhfpcQNwFDsBd+L98ZiemwWJsCwnOalkkuJge+8p/7YvZP1cnZ3jEQWYIKPJXA AZeKoxoDBfSl2Utikl9UVXyRgh2nTNn/6j6YxcT2RgF6EOZX/Q4XG0hjc0AGFm+W l3n2VBTxRqU/ANOHy+fw1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1755970699; x= 1756057099; bh=0uQH8FJ/dlcn2qo7HYvve0tiSswXpAFWESomSoxhS60=; b=h D2sD9bf8QurTGouOgdAeDaVXxRr6hM4A/9CyEsu3DIEw0lwEp4DWp+Y/QV0cSR4q j7922iVaQOTHqIthY9Ahzlj5JbSfgor3zbAR6eKPyqiPo3OtsMJ+4d5s4YiyVp/o kEwp8flviSwMdzTsNFMoLisivNrx1aNf3HVvfH64UUKJA2U5SX9AHcOcaB5ykZNT eamIc0/Jk/2mh1wVhDtIoL+tiYOUoTv3bScePA2jHe5A+HXerOJuXw2rA9HuFXob qO5igPEP/D+6S12d1DEPnsa0LGdBSfetpFt78C+a248k71TeWMrqNuy4+VNswHQf Lmkm46LU/aQjs1z/zYGjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduieejvdeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpeffohhughcu ffgrvhhishcuoeguuggrvhhishesuggurghvihhsrdhioheqnecuggftrfgrthhtvghrnh epheffhfeludekgeduvdehfeefgfegleegheegvdetgfejfefhgeeuffdvheelvdeunecu ffhomhgrihhnpegrshhtrhgrlhdrshhhnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepuggurghvihhsseguuggrvhhishdrihhopdhnsggprhgt phhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuh drohhrghdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprhgt phhtthhopeejledvledtseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: iae51443f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 Aug 2025 13:38:19 -0400 (EDT) From: Doug Davis To: Eli Zaretskii Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands In-Reply-To: <86v7me9or3.fsf@gnu.org> References: <86v7me9or3.fsf@gnu.org> User-Agent: mu4e 1.12.12; emacs 31.0.50 Date: Sat, 23 Aug 2025 12:38:17 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79290 Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> From: Doug Davis >> Date: Fri, 22 Aug 2025 10:37:38 -0500 >> >> When writing an `eglot-alternatives' that looks like this: >> >> (add-to-list 'eglot-server-programs >> `(python-base-mode >> . ,(eglot-alternatives '(("basedpyright-langserver" "--= stdio") >> ("uv" "run" "pyright-langserve= r" "--stdio") >> ("uv" "run" "ty" "server") >> "jedi-language-server" >> ("pyright-langserver" "--stdio= "))))) >> >> an invocation of M-x eglot will fail to show the second instance of >> using uv in the resulting list that appears to be passed on to >> `completing-read'. (Notice the repeated use of `uv run` >> https://docs.astral.sh/uv/reference/cli/#uv-run) >> >> more info: the benefit of using `uv run` unloads the burden of using >> emacs to property setup a virtual environment; uv automatically handles >> running the correct installation of the invoked subcommand. > > Jo=C3=A3o, any comments or suggestions? Below is a patch on master that resolves ("server-program" "arg1" "arg2") to appear as "server-program arg1 arg2" in the completing read; just an idea diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 29e6c269fdf..d97624a33b9 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -214,7 +214,7 @@ eglot-alternatives (let ((found (eglot--executable-f= ind (car a) t))) (and found - (cons (car a) (cons found = (cdr a)))))) + (cons (mapconcat #'identit= y a " ") (cons found (cdr a)))))) listified)) (available (remove nil augmented))) (cond ((cdr available) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 24 08:39:58 2025 Received: (at 79290) by debbugs.gnu.org; 24 Aug 2025 12:39:58 +0000 Received: from localhost ([127.0.0.1]:44129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqA0r-0002Hi-H1 for submit@debbugs.gnu.org; Sun, 24 Aug 2025 08:39:58 -0400 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]:51312) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uqA0o-0002HT-9o for 79290@debbugs.gnu.org; Sun, 24 Aug 2025 08:39:55 -0400 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-61d99c87ddcso727645eaf.2 for <79290@debbugs.gnu.org>; Sun, 24 Aug 2025 05:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756039188; x=1756643988; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iDPYNxHhTe2hwWXFLoWOvRdAaIucB5jyqNbixGI0600=; b=kNzYCHROsuJoOPDaubwT5Tq+KU7nsCKq823sVxKH1/+Oz8UMZoPNqUyvG1H6TNqQGu a5SPBj9LQdkVwLDSTRNlr7ZHj+6VHNJKhAPwV6duRS9oT1IkTaeSEsFgtAUJkX4ou++N BDAogS4+u+17jVnR6LRYXGbszmaSIJoAu2OsE8f44Nck4cn8AhraedvOurgQ/C3ByeTj qcP0zSK3HIybBt2a0yJ66f/7S/k0iLDcCclIBogODWGOAS98FrzZybDn6ehkWCYxVGeW SSEyZhH0aHqQSRODmPP59Tn9vilI9hLZt17x7fLcdZUMDNQurUK4PC/nK+0YHnCfoAJc iCjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756039188; x=1756643988; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iDPYNxHhTe2hwWXFLoWOvRdAaIucB5jyqNbixGI0600=; b=BpImVNiNA7ZB2oTODZYR8AVChNTMUTJQt8J0HuMIFkuQ9/iQ9J6WgsSoY2xx5VXFmn DHfIgSgBcztIUwpx+DEYRS4knRdt3VgzousRmhUpCuFjxk93YOPyFUiqjCoN2YFuKS6B Yr0cOWTNm/6omC/XFYe80j0i3GE6ezbKpUjFQlKH1qCeayDA3obtdCjDspFOkwP1DMTJ GGNUTCcjnyxAZo5BfMzMMe//UFt2Q5I7mi+tnb5ZqtUaDM9Bwprww4TuNPsl8de725by NMDXHSgJlI75Zr6Z680txeyKtUuh7pwkzj8YYE/dHn/3uZGcVodXraCrlewMfZ17rm/R Qlkw== X-Forwarded-Encrypted: i=1; AJvYcCUMDKFPXLVJ7CGv2TFJ5jx/rJhKcFWOznCEhEVvmbSKIp3igiq22YaGrH2gyhz/n6kgZIbM2w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yys8f5me66HDHeM4b+7DsQx/FWz3bB0hNXK9mOU4dJ0YXP2pKrR dSRMAZX0y0O2XBuMhFYPLYFU1yh1U+U6Iio9du+yhsBkvAcOpGtgmK5lPwZt7z1Z8xi5lRlldhu QK6Xz/aRLejaIPqCGMYxeoz5Hq+QVrhM= X-Gm-Gg: ASbGncvUNfUgmDyInv4jfE8JL/oYQemiO8NUYF/I++3vlotOqlxXYQo/juKo0pPfw8j 8aOL+J7mnsub2g2g8AqJt1aAZbBoVuTpSiI+gs86zXIFWLuBkSx/x0f0gQmAJkCY5hrrp0EVO3R +q3BgZZj5r8QMXAO7ze5rtAgT3oZtElXt2qTQH52kK673VkLLQsCiGFrnaqAL6o/hYlBLsafqby IKcp7U= X-Google-Smtp-Source: AGHT+IF9w0zrEt47Nk0vunLg7qcetlhH6H9L+q+OYDCoiRQvd2gBwn/9j2hhilKb1J/bgJ23x/ssZC5wgIeH0cwYUys= X-Received: by 2002:a05:6820:22a7:b0:61d:9adf:eecc with SMTP id 006d021491bc7-61db9aa6f56mr3847150eaf.2.1756039188123; Sun, 24 Aug 2025 05:39:48 -0700 (PDT) MIME-Version: 1.0 References: <86v7me9or3.fsf@gnu.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sun, 24 Aug 2025 13:40:41 +0100 X-Gm-Features: Ac12FXxMnU0hxRSNWX5Ovg8rwePvH4jDWArzOIo6kMTJLg3vsE3aUAr8aCbmgog Message-ID: Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands To: Doug Davis , Felician Nemeth Content-Type: multipart/mixed; boundary="00000000000005312d063d1bbc7a" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79290 Cc: Eli Zaretskii , 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000005312d063d1bbc7a Content-Type: multipart/alternative; boundary="000000000000053128063d1bbc78" --000000000000053128063d1bbc78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 23, 2025 at 6:38=E2=80=AFPM Doug Davis wrote= : > >> an invocation of M-x eglot will fail to show the second instance of > >> using uv in the resulting list that appears to be passed on to > >> `completing-read'. (Notice the repeated use of `uv run` > >> https://docs.astral.sh/uv/reference/cli/#uv-run) > >> > >> more info: the benefit of using `uv run` unloads the burden of using > >> emacs to property setup a virtual environment; uv automatically handle= s > >> running the correct installation of the invoked subcommand. > > > > Jo=C3=A3o, any comments or suggestions? > No many: I run python servers myself and find that a simple handrolled "virtual environment" helper that sets exec-path, process-environment, and PATH works fine 99% of the time (if not 100% of the time) for my python programming needs, admittedly not very complex. This includes eglot. Attached my 50-line zenv.el in case is useful to anyone, though not related to this issue. > Below is a patch on master that resolves > > ("server-program" "arg1" "arg2") > > to appear as > > "server-program arg1 arg2" > > in the completing read; just an idea > I don't fully understand the issue, but I don't have anything against these quality-of-life patches if, and this is a big IF, they are small and very well tested. I'm thinking about C-u M-x eglot, and other interactive scenarios. eglot-server-program's syntax is crammed to the max already. Related to this, Philip K. had a good idea about eglot-alternatives, to make it "less functional", but I can't remember what it was exactly. Jo=C3=A3o --000000000000053128063d1bbc78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 23, 2025 at 6:38=E2=80=AFPM Doug = Davis <ddavis@ddavis.io> wrot= e:
>> an invocation of M-x eglot will fail to show the second instance o= f
>> using uv in the resulting list that appears to be passed on to
>> `completing-read'. (Notice the repeated use of `uv run`
>> https://docs.astral.sh/uv/reference/cli/#uv-= run)
>>
>> more info: the benefit of using `uv run` unloads the burden of usi= ng
>> emacs to property setup a virtual environment; uv automatically ha= ndles
>> running the correct installation of the invoked subcommand.
>
> Jo=C3=A3o, any comments or suggestions?

No many:

I run python servers myself and fin= d that a simple handrolled=C2=A0"virtual
environment" h= elper that sets exec-path, process-environment, and PATH
works fi= ne 99% of the time (if not 100% of the time) for my python programming
needs, admittedly not very complex.=C2=A0 This includes eglot. Attach= ed my 50-line
zenv.el in case is useful to anyone, though not=C2= =A0 related to=C2=A0 this issue.
=C2=A0
Below is a patch on master that resolves

=C2=A0 ("server-program" "arg1" "arg2")

to appear as

=C2=A0 "server-program arg1 arg2"

in the completing read; just an idea

I = don't fully understand the issue, but I don't have anything against= =C2=A0
these quality-of-life patches if, and this is a big IF, th= ey are small and=C2=A0
very well tested. I'm thinking about= =C2=A0C-u M-x eglot, and other interactive=C2=A0
scenarios.=C2=A0= eglot-server-program's syntax is crammed to the max
already.= =C2=A0 Related to this, Philip K. had a good idea about eglot-alternatives,=
to make it "less functional",=C2=A0but I can't rem= ember what it was exactly.

Jo=C3=A3o
--000000000000053128063d1bbc78-- --00000000000005312d063d1bbc7a Content-Type: text/x-emacs-lisp; charset="UTF-8"; name="zenv.el" Content-Disposition: attachment; filename="zenv.el" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_mepodx020 Ozs7IHplbnYuZWwgLS0tICBWaXJ0dWFsIGVudmlyb25tZW50IHRoaW5neSAgLSotIGxleGljYWwt YmluZGluZzogdDsgLSotCgo7OyBDb3B5cmlnaHQgKEMpIDIwMjMgIEpvw6NvIFTDoXZvcmEKOzsg QXV0aG9yOiBKb8OjbyBUw6F2b3JhIDxqb2FvdGF2b3JhQGdtYWlsLmNvbT4KOzs7IENvbW1lbnRh cnk6Cgo7OzsgQ29kZToKCihkZWZ2YXIgei8vY3VycmVudC12ZW52IG5pbCkKCjs7OyMjI2F1dG9s b2FkCihkZWZ1biB6L2FjdGl2YXRlIChwYXRoKQogIChpbnRlcmFjdGl2ZSAobGlzdCAocmVhZC1k aXJlY3RvcnktbmFtZQogICAgICAgICAgICAgICAgICAgICAgIlB5dGhvbiBWaXJ0dWFsIEVudmly b25tZW50IFBhdGg6ICIKICAgICAgICAgICAgICAgICAgICAgICJ+Ly5sb2NhbC92aXJ0dWFsZW52 cy8iIG5pbAogICAgICAgICAgICAgICAgICAgICAgbmlsCiAgICAgICAgICAgICAgICAgICAgICBu aWwpKSkKICAoei9kZWFjdGl2YXRlIHQpCiAgKG1lc3NhZ2UgIlt6ZW52XSBhY3RpdmF0aW5nICcl cyciIHBhdGgpCiAgKGxldCAoKGJpbiAoei8vYmluIHBhdGgpKSAocGVzdHJpbmcgKGZvcm1hdCAi VklSVFVBTF9FTlY9JXMiIHBhdGgpKSkKICAgIChzZXRxIHovL2N1cnJlbnQtdmVudiAobGlzdCBw YXRoIGJpbiBwZXN0cmluZykpCiAgICAocHVzaCBiaW4gZXhlYy1wYXRoKQogICAgKHB1c2ggcGVz dHJpbmcgcHJvY2Vzcy1lbnZpcm9ubWVudCkKICAgIChzZXRlbnYgIlBBVEgiIChjb25jYXQgYmlu IChwYXRoLXNlcGFyYXRvcikgKGdldGVudiAiUEFUSCIpKSkpKQoKCihkZWZhbGlhcyAnei93b3Jr b24gJ3ovYWN0aXZhdGUpCgo7OzsjIyNhdXRvbG9hZAooZGVmdW4gei9kZWFjdGl2YXRlICgmb3B0 aW9uYWwgbm9tc2cpCiAgKGludGVyYWN0aXZlKQogIChwY2FzZSB6Ly9jdXJyZW50LXZlbnYKICAg IChgKCxuYW1lICxiaW4gLHBlc3RyaW5nKQogICAgICh1bmxlc3Mgbm9tc2cgKG1lc3NhZ2UgIlt6 ZW52XSBkZWFjdGl2YXRpbmcgJyVzJyIgbmFtZSkpCiAgICAgKHNldHEgZXhlYy1wYXRoIChkZWxx IGJpbiBleGVjLXBhdGgpCiAgICAgICAgICAgcHJvY2Vzcy1lbnZpcm9ubWVudCAoZGVscSBwZXN0 cmluZyBwcm9jZXNzLWVudmlyb25tZW50KSkKICAgICAoc2V0ZW52ICJQQVRIIiAoc3RyaW5nLXJl cGxhY2UgKGNvbmNhdCBiaW4gKHBhdGgtc2VwYXJhdG9yKSkgIiIgKGdldGVudiAiUEFUSCIpKSkp KSkKCgooZGVmdW4gei8vYmluICh2ZW52LXBhdGgpCiAgKGV4cGFuZC1maWxlLW5hbWUgKGlmIChl cSBzeXN0ZW0tdHlwZSAnd2luZG93cy1udCkgIlNjcmlwdHMiICJiaW4iKSB2ZW52LXBhdGgpKQoK KHByb3ZpZGUgJ3plbnYpCgo7OzsgemVudi5lbCBlbmRzIGhlcmUKCjs7IExvY2FsIFZhcmlhYmxl czoKOzsgcmVhZC1zeW1ib2wtc2hvcnRoYW5kczogKCgiei8iIC4gInplbnYtIikpCjs7IEVuZDoK --00000000000005312d063d1bbc7a-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 24 08:49:04 2025 Received: (at 79290) by debbugs.gnu.org; 24 Aug 2025 12:49:05 +0000 Received: from localhost ([127.0.0.1]:44164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqA9g-0002kU-FC for submit@debbugs.gnu.org; Sun, 24 Aug 2025 08:49:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47674) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uqA9e-0002jr-Ng for 79290@debbugs.gnu.org; Sun, 24 Aug 2025 08:49:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uqA9Y-0002SG-Au; Sun, 24 Aug 2025 08:48:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZlQiuVWHJRro1whMNoStJamOBY5hL1YVmx2e0KAziVY=; b=rJD5DXvq+LgWyE29Xy4D sS3KzAd/B9d7g3Zl6VO64qBmreWoGm5nC4PgKKx1R3oXCwTTRRyzAQdq+2DurCAoNi3yZQOnsS4o6 Yko1orzYI0Qg+7CBdzGnUmyLCY0DulBPyH3ykgWUBgdJkvXvHZRV2Vl+/71QhjqEyrG71VvGSqH/h 6yCTXbFkBYxImB+vb/XxR8504PAbfl3wRL4nQd/RLssPf5KshajG3vf4noMCnQdvHs+l8h+wYTMr/ c4xKQUwswqaBG5QoPaThdxEo/6yJt7e+wQacmgMdjm5LnsmDMOrE64CskBJ932KbAK9EVD0u6iB4m EwmPcoEJkYCdUA==; Date: Sun, 24 Aug 2025 15:48:53 +0300 Message-Id: <86frdg7umi.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Philip Kaludercic In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Sun, 24 Aug 2025 13:40:41 +0100) Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands References: <86v7me9or3.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79290 Cc: felician.nemeth@gmail.com, ddavis@ddavis.io, 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Date: Sun, 24 Aug 2025 13:40:41 +0100 > Cc: Eli Zaretskii , 79290@debbugs.gnu.org > > On Sat, Aug 23, 2025 at 6:38 PM Doug Davis wrote: > > >> an invocation of M-x eglot will fail to show the second instance of > >> using uv in the resulting list that appears to be passed on to > >> `completing-read'. (Notice the repeated use of `uv run` > >> https://docs.astral.sh/uv/reference/cli/#uv-run) > >> > >> more info: the benefit of using `uv run` unloads the burden of using > >> emacs to property setup a virtual environment; uv automatically handles > >> running the correct installation of the invoked subcommand. > > > > João, any comments or suggestions? > > No many: > > I run python servers myself and find that a simple handrolled "virtual > environment" helper that sets exec-path, process-environment, and PATH > works fine 99% of the time (if not 100% of the time) for my python programming > needs, admittedly not very complex. This includes eglot. Attached my 50-line > zenv.el in case is useful to anyone, though not related to this issue. > > Below is a patch on master that resolves > > ("server-program" "arg1" "arg2") > > to appear as > > "server-program arg1 arg2" > > in the completing read; just an idea > > I don't fully understand the issue, but I don't have anything against > these quality-of-life patches if, and this is a big IF, they are small and > very well tested. I'm thinking about C-u M-x eglot, and other interactive > scenarios. eglot-server-program's syntax is crammed to the max > already. Related to this, Philip K. had a good idea about eglot-alternatives, > to make it "less functional", but I can't remember what it was exactly. Philip, do you remember? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 24 15:26:26 2025 Received: (at 79290) by debbugs.gnu.org; 24 Aug 2025 19:26:27 +0000 Received: from localhost ([127.0.0.1]:46847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqGME-0005im-Cl for submit@debbugs.gnu.org; Sun, 24 Aug 2025 15:26:26 -0400 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:59075) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uqGM9-0005iO-Vv for 79290@debbugs.gnu.org; Sun, 24 Aug 2025 15:26:22 -0400 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6182F1400035; Sun, 24 Aug 2025 15:26:16 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sun, 24 Aug 2025 15:26:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1756063576; x=1756149976; bh=Yds4b5CFC5M/jp1bZTPRpj4k7oCIO1oPEZFxLdELndI=; b= aZtI9lVCCnSbPvLrluhhE5dnylm9RlWICOiW76iqHLxrCOcZfdXmqHWRQAxqt3Jb IOnZYzUH9BozWQ/SD44E5anJtTtJ9XYtaeqAbsfSToOaG4YgurCZQd5tfl0z0xAN QVOkObUZUFqc4N5c+DhOnwErYzQScz0iE7AB066ZR0sjPvK4ASMWVsjQuxhaLjx5 elMcWwulTNHf0K9OYRmzg+sbdTZ0R6F3QFW5IDeRVq+9S3QPBXn0N5Zu3OxNvtWv QSzLiSaSMojJ1cjNmunvQhWYX8l8HHL6TAsLTt3Zne7RWLhGxMocA/XH2gTDYkLz 8zMvMkRPKQPPzVzS4LV6VA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1756063576; x= 1756149976; bh=Yds4b5CFC5M/jp1bZTPRpj4k7oCIO1oPEZFxLdELndI=; b=A CWBSiCEXPaPaty8scT2fYlvIAYFwz2LK/A3EH8zfDn/IzyBicc39rN3aT/yfq9mW 7F50foeHxF4UcseFw3G2gbWTb6V/Iko2zGl4bCS14U/usk/hQXzY37af0HMp48u/ XfGsMI2U2c991OsrplN8keDbba4tWpZ+LePUf+hjznGgV/LckWt6QvtNY/7upf9J Uz+HByNqpTmlH8BDeHSxl9LdDllG+gYjtDFJXkHrp3oeGnrTcOasRomKhTiNTVO3 JdTMYdeeN+CZeBeJcdvC3lNq+QbB3KmoDgK5heFAp13uCpc3yqbvEYI1APwhVthi R1mhWym+qrJJP0yWWg7YA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddujedtfeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpeffohhughcu ffgrvhhishcuoeguuggrvhhishesuggurghvihhsrdhioheqnecuggftrfgrthhtvghrnh epheffhfeludekgeduvdehfeefgfegleegheegvdetgfejfefhgeeuffdvheelvdeunecu ffhomhgrihhnpegrshhtrhgrlhdrshhhnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepuggurghvihhsseguuggrvhhishdrihhopdhnsggprhgt phhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjohgrohhtrghvoh hrrgesghhmrghilhdrtghomhdprhgtphhtthhopehfvghlihgtihgrnhdrnhgvmhgvthhh sehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpth htohepjeelvdeltdesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: iae51443f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Aug 2025 15:26:15 -0400 (EDT) From: Doug Davis To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Sun, 24 Aug 2025 13:40:41 +0100") References: <86v7me9or3.fsf@gnu.org> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Sun, 24 Aug 2025 14:26:14 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79290 Cc: Eli Zaretskii , Felician Nemeth , 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jo=C3=A3o T=C3=A1vora writes: > On Sat, Aug 23, 2025 at 6:38=E2=80=AFPM Doug Davis wro= te: > >> >> an invocation of M-x eglot will fail to show the second instance of >> >> using uv in the resulting list that appears to be passed on to >> >> `completing-read'. (Notice the repeated use of `uv run` >> >> https://docs.astral.sh/uv/reference/cli/#uv-run) >> >> >> >> more info: the benefit of using `uv run` unloads the burden of using >> >> emacs to property setup a virtual environment; uv automatically handl= es >> >> running the correct installation of the invoked subcommand. >> > >> > Jo=C3=A3o, any comments or suggestions? >> > > No many: > > I run python servers myself and find that a simple handrolled "virtual > environment" helper that sets exec-path, process-environment, and PATH > works fine 99% of the time (if not 100% of the time) for my python > programming needs, admittedly not very complex. This includes eglot. I can't argue with your point above (the pyvenv package solves this very well, I've used it for many years). I've typically leaned on .dir-locals.el or some function of my own (added to python mode hook) that finds and activates a virtualenv in a project. Using uv to launch an LSP server with `uv run ` just eliminates the need to worry about virtualenvs completely (uv automatically handles all venv creation/discovery). > Attached my 50-line zenv.el in case is useful to anyone, though not > related to this issue. > >> Below is a patch on master that resolves >> >> ("server-program" "arg1" "arg2") >> >> to appear as >> >> "server-program arg1 arg2" >> >> in the completing read; just an idea >> > > I don't fully understand the issue IMO the core of the issue is that completing-read is getting a list of programs, where each the program is resolved from (car a) where a is typically the entries of a list like: '(("uv" "run" "program1") ("uv" "run" "program2") ("program3")) So then the list passed to completing-read is '("uv" "uv" "program3") And completing-read just ignores repeated input; e.g. (completing-read "pick:" '("uv" "uv" "program3") ...) will only show "uv" and "program3"; so my diff from my previous reply just concats the lists to make the completing-read call: (completing-read "pick:" '("uv run program1" "uv run program2" "program3") ...) that is, with all unique entries. > >, but I don't have anything against > these quality-of-life patches if, and this is a big IF, they are small and > very well tested. I'm thinking about C-u M-x eglot, and other interactive > scenarios. eglot-server-program's syntax is crammed to the max > already. Related to this, Philip K. had a good idea about > eglot-alternatives, > to make it "less functional", but I can't remember what it was exactly. I'd completely understand if this QOL change is beyond the scope of some other larger work on eglot (also, I've personally never used C-u M-x eglot, but it appears to work fine with the diff from my previous reply, which has been working fine for me and my plain M-x eglot usage). cheers Doug > > Jo=C3=A3o > [4. text/x-emacs-lisp; zenv.el]... From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 24 17:16:57 2025 Received: (at 79290) by debbugs.gnu.org; 24 Aug 2025 21:16:57 +0000 Received: from localhost ([127.0.0.1]:47078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqI5B-0002UH-5i for submit@debbugs.gnu.org; Sun, 24 Aug 2025 17:16:57 -0400 Received: from mout02.posteo.de ([185.67.36.66]:59669) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uqI58-0002U3-Bm for 79290@debbugs.gnu.org; Sun, 24 Aug 2025 17:16:55 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id EE69B240101 for <79290@debbugs.gnu.org>; Sun, 24 Aug 2025 23:16:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1756070207; bh=YJT/gvaz23YAZfd+mjWFkfn2bp0az46NUEu626ByBx8=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=iFbFeiAvAXzWWFKheR81Z/yxGBgma4/BRq/3E7O98xNXvqf7QFpLnJTKtBlBrdKuP +KS81IMkWBda8ublbCSt9fCnyith3aAI0eqyzMv2ZbfJoWjO4BX/hZZnnTZx6mreol 5BnLcFn0GOPS4cSnfcrIGBf8v801ddUR5kXfgpMkEuRRaDmkub5DsjpZLbYNoksmwD W7Y5fZ0ZMRu0ouTI/stVXRpB/WHE0SImk242B0+r92ca75vSy1DzHFmNqdBeeRowm7 zDdowLhd1ulQE6wru0Qt4Zx+f+RMLIfmA28RfNbuxT/ryF9qsrTRUDZPsXbQ4lquEf 0pmPHfA7Xj/vw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c96Dt5S8vz9rxL; Sun, 24 Aug 2025 23:16:46 +0200 (CEST) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#79290: 30.2; eglot-alternatives doesn't support re-use of same program with different subcommands In-Reply-To: <86frdg7umi.fsf@gnu.org> References: <86v7me9or3.fsf@gnu.org> <86frdg7umi.fsf@gnu.org> 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 OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Sun, 24 Aug 2025 21:16:47 +0000 Message-ID: <87zfboju82.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79290 Cc: felician.nemeth@gmail.com, ddavis@ddavis.io, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 79290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Date: Sun, 24 Aug 2025 13:40:41 +0100 >> Cc: Eli Zaretskii , 79290@debbugs.gnu.org >>=20 >> On Sat, Aug 23, 2025 at 6:38=E2=80=AFPM Doug Davis wr= ote: >>=20 >> >> an invocation of M-x eglot will fail to show the second instance of >> >> using uv in the resulting list that appears to be passed on to >> >> `completing-read'. (Notice the repeated use of `uv run` >> >> https://docs.astral.sh/uv/reference/cli/#uv-run) >> >> >> >> more info: the benefit of using `uv run` unloads the burden of using >> >> emacs to property setup a virtual environment; uv automatically hand= les >> >> running the correct installation of the invoked subcommand. >> > >> > Jo=C3=A3o, any comments or suggestions? >>=20 >> No many: >>=20 >> I run python servers myself and find that a simple handrolled "virtual >> environment" helper that sets exec-path, process-environment, and PATH >> works fine 99% of the time (if not 100% of the time) for my python progr= amming >> needs, admittedly not very complex. This includes eglot. Attached my 50= -line >> zenv.el in case is useful to anyone, though not related to this issue. >>=20=20 >> Below is a patch on master that resolves >>=20 >> ("server-program" "arg1" "arg2") >>=20 >> to appear as >>=20 >> "server-program arg1 arg2" >>=20 >> in the completing read; just an idea >>=20 >> I don't fully understand the issue, but I don't have anything against=20 >> these quality-of-life patches if, and this is a big IF, they are small a= nd=20 >> very well tested. I'm thinking about C-u M-x eglot, and other interactiv= e=20 >> scenarios. eglot-server-program's syntax is crammed to the max >> already. Related to this, Philip K. had a good idea about eglot-alterna= tives, >> to make it "less functional", but I can't remember what it was exactly. > > Philip, do you remember? The best I could find in my backlog was this message yhetil.org/emacs-devel/87o6zc86dk.fsf@posteo.net/. This was an attempt to move the contents of `eglot-server-programs' out of Eglot and into their related major-modes. I never completed it (which reminds me once more that I should maintain a list of these kinds of initiatives somewhere), but Jo=C3=A3o mentioned that he found the usage of arrays to denote alternative commands to start the LSP servers interesting, as opposed to injecting `eglot-alternatives' calls using quasi-quoting. My idea here was just to allow configuring the variable without having to load eglot.el. I didn't have the time to follow up on the entire bug report to evaluate how relevant this hack is to the bug report at hand.