GNU bug report logs - #56997
[PATCH] Analogue of project-shell for Python

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Augusto Stoffel <arstoffel@HIDDEN>; Keywords: patch; dated Fri, 5 Aug 2022 07:32:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 11:43:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 05 07:43:42 2022
Received: from localhost ([127.0.0.1]:56398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oJvjx-00050o-C0
	for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 07:43:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:35896)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1oJvjh-00050T-T2
 for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 07:43:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41138)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJvjh-0006xv-0l
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 07:43:25 -0400
Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:45660)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJvjf-0006TB-EZ
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 07:43:24 -0400
Received: by mail-ej1-x630.google.com with SMTP id dc19so4497300ejb.12
 for <bug-gnu-emacs@HIDDEN>; Fri, 05 Aug 2022 04:43:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc;
 bh=3Ls6IKhiAFGopnz/xUDArH9cZ9bEyG7x6xPYtPk0peg=;
 b=N8uL2Vm+ROFaDq766T7k/7IbGN24M0j9bA5DZG7fBRMBXJgGvrSTI41GaE5BdJYpx2
 8VTC3N4pMZTRcIXo+uLQT4svORPzxKk/4rLZeyOCImnK7Z9PwsZ/BA/sbPGUQJtfYZb4
 WaEp5YzbyAQFDE6x3D3CpdqRkfqir3FzNlnr23Tp1LxubJtOtzvJ0pFK+bTGR/rAgfpX
 iFUPCxH85EOJdCKjHQD37WV+unqCDkS4QoJd4uT8T/mrscogRzs5KZUa3FpdXHMoqtav
 dX7goHO6WYvqQAv80dcWg3ERC3d1E9l+sRVIIXOHeSD/qb+K6XqtjypKe8awXzNnii5k
 KgYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc;
 bh=3Ls6IKhiAFGopnz/xUDArH9cZ9bEyG7x6xPYtPk0peg=;
 b=1MtGz4IHKjrQ+S+VbDEV26KU46IyY5vFWi1YgMGpVIZ2xMcsi77zy0t9pJy20nRHol
 xjlbmITX9RNEqN9DzyNJQwv80v4QueIDQv8qn9pnnAg4CWee6uK+8zxp3z9mmtKLUufy
 me0sz9mN2l5k7uKjEf+uVFskPYPstLDliZvdNBPt6qUX+Fbi81ihNcfuNv9/D7gUI9fy
 q1jcClMh8jMb9Uv0IKrJp+3wZVT1ctmlWm1Q7i41csLip42yo2QKvSi01O+siIbxNzZz
 IDz0XMQjQSR2tAW6YN2J+IaHPQCbdoN5qGXgDMwCQThgjwZegeJjbeWSOPBm+1i99WI6
 v8MQ==
X-Gm-Message-State: ACgBeo2OjVO/D2A9e5NTxAaj7xUWf7dMi/MsayNm8M0IKfmbYY2reO+X
 uoj1Pu3hLaRQAYElMwhxKVY=
X-Google-Smtp-Source: AA6agR6kiLLz8rMk4EVaxFHdIv0thWV/hRYxE/lGj/fPJM48YJdg6Ut433tzx9v/NEs19guEXIqksQ==
X-Received: by 2002:a17:907:6089:b0:72f:56db:ccb6 with SMTP id
 ht9-20020a170907608900b0072f56dbccb6mr4964434ejc.318.1659699802041; 
 Fri, 05 Aug 2022 04:43:22 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ac0:56d0::a827])
 by smtp.gmail.com with ESMTPSA id
 v9-20020aa7cd49000000b0043d2424aeefsm1991554edw.87.2022.08.05.04.43.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 05 Aug 2022 04:43:21 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: [PATCH] Analogue of project-shell for Python
In-Reply-To: <8735eb3qgj.fsf@HIDDEN> (Philip Kaludercic's message of "Fri, 
 05 Aug 2022 11:00:28 +0000")
References: <874jyr87ux.fsf@HIDDEN> <874jyrjb8y.fsf@HIDDEN>
 <87mtcj6mq0.fsf@HIDDEN> <8735eb3qgj.fsf@HIDDEN>
Date: Fri, 05 Aug 2022 13:43:20 +0200
Message-ID: <87czde7w6f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::630;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x630.google.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_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Fri,  5 Aug 2022 at 11:00, Philip Kaludercic <philipk@HIDDEN> wrote:

> Would this be enough: https://git.sr.ht/~pkal/compat/commit/1250ea050737db8ba07c44eaeab7be2e4faefe0a?

Definitely!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56997; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 11:00:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 05 07:00:42 2022
Received: from localhost ([127.0.0.1]:56364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oJv4M-0001pT-51
	for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 07:00:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:47962)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1oJv4I-0001pK-VN
 for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 07:00:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33946)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1oJv4F-0007hg-P2
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 07:00:38 -0400
Received: from mout01.posteo.de ([185.67.36.65]:59051)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1oJv4D-0006Tw-E8
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 07:00:35 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id EF19C240026
 for <bug-gnu-emacs@HIDDEN>; Fri,  5 Aug 2022 13:00:30 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1659697231; bh=aON8vhBDDw3TFtM3bldGvoC1cJzuimBccLVc+JH2SeY=;
 h=From:To:Cc:Subject:Autocrypt:Date:From;
 b=NbqdRw7z0rhWbLda05PVYZ4dl5nl3Z77RvjjuUPB24GLaiA58cqloqhtOAXd3mifY
 lKwTgUFaAS3juDnusANjJvYjgNynvsK9t2UaUDi99hrl2qq9q5iaMI5K9Q/N76qyPa
 j2ThtTajW/nAOFBaj3krlG/DKbnrOfAaENuU38LLq+9xrdnEHs54QHkF/YaCOegV/d
 I1KKmpZ6NqqMRgYz8Dg54FkDjKqARkOoIHUx1u57ngCR5ROayA5V2wRa1KQTIDCf34
 pdc5UCF0DxusrkqPgpzm1olu/ixj5eJr62goD3AX769uTTqYO2oBzysfwrz42pxcB3
 c+9K1DV2CRW5Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4LzjLP2v4Mz9rxM;
 Fri,  5 Aug 2022 13:00:29 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: [PATCH] Analogue of project-shell for Python
In-Reply-To: <87mtcj6mq0.fsf@HIDDEN> (Augusto Stoffel's message of "Fri, 05
 Aug 2022 11:52:55 +0200")
References: <874jyr87ux.fsf@HIDDEN> <874jyrjb8y.fsf@HIDDEN>
 <87mtcj6mq0.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Fri, 05 Aug 2022 11:00:28 +0000
Message-ID: <8735eb3qgj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@HIDDEN;
 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Augusto Stoffel <arstoffel@HIDDEN> writes:

> On Fri,  5 Aug 2022 at 09:22, Philip Kaludercic <philipk@HIDDEN> wrote:
>
>> Augusto Stoffel <arstoffel@HIDDEN> writes:
>>
>>> Philip: I'm working around the possible absence of
>>> 'read-multiple-choice' here.  Not sure it's a popular/useful enough
>>> function to include in compat, but I thought I would bring this up.
>>
>> I have considered it, but the code in rmc.el is about 230 lines of code,
>> that I didn't want to copy verbatim.  If you think it is worthwhile, I
>> can try to add `read-multiple-choice' in some form or another.
>
> A bare-bones version that ignores the optional arguments could be much
> smaller, but I think it's at best borderline worth implementing it.

Would this be enough: https://git.sr.ht/~pkal/compat/commit/1250ea050737db8ba07c44eaeab7be2e4faefe0a?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56997; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 09:53:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 05 05:53:06 2022
Received: from localhost ([127.0.0.1]:56267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oJu0w-0008He-7K
	for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 05:53:06 -0400
Received: from lists.gnu.org ([209.51.188.17]:40686)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1oJu0r-0008HC-AU
 for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 05:53:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52254)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJu0r-0006Rw-3U
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 05:53:01 -0400
Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:43665)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJu0o-0003iT-MT
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 05:53:00 -0400
Received: by mail-ej1-x633.google.com with SMTP id gb36so4049262ejc.10
 for <bug-gnu-emacs@HIDDEN>; Fri, 05 Aug 2022 02:52:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc;
 bh=8onAGs6OL9ei0EAEBFSEa/E6sFaqDbtx1n4f8BcHxbo=;
 b=lQjIJt4liPGXraMsCm3sm968SnKM6MV8Q9E+SWm2+cj5BxWUp7EOUpJy/IH7aMgW/7
 3oOWjbTkhGQK7mc2VBJi99e+xzGtNSNnukBkT6r7LrE9rlsUf1Zw2rw/o+dqBJOv8dr3
 wcem2f6ObMAJZ4OkW8DQSM2XHHzSwvcPYORvclKvdT2NrQbiUWckaILcrluWlB9K+BNG
 0cHPYwubXVspg19U0cAbCkKMMOgNq2aRp7TBUPfOdPu8CaYXyyOlCROdID4O20btmEdf
 iIJVsD68H4HIO/h16HT6St6a4Wqoc6QX/IBN988h5F6s/XF6+8CVSO7KX7RrhpWYECFg
 p33w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc;
 bh=8onAGs6OL9ei0EAEBFSEa/E6sFaqDbtx1n4f8BcHxbo=;
 b=lfRhVLk0pOxJYlWAOEV/XMCvc3ZFqTRqo32DwgzRZ9QaP0vwWe+G1dNAGsLK+TDxP3
 IHyYY2UzRZQYLeIvWjvjWQJeniyIy9QhEbzBX9ePs8WtUOcL0ItVXaqhcW+9mktt4XYB
 rHw7kS0v9DshfBdVOeAk6EKGm/Pyf0QTwReW6yzwZUfhhtCpuiUhfKy4o3iR2YRtO3Ce
 Ifc0hdA1ji/j7Ey62t5wcvVYBx6kxqyeYX9OKpM7A8eYV3BMpFdbWWuBs8X9mSUIDDyk
 gyyqCFhMKqqP/bHVNl8ygMwth+xTrC+Sz+o0YQELEV/jhaUM05hKDbHTAlbkGVtXb3LP
 Dw5Q==
X-Gm-Message-State: ACgBeo0jsE3ALEnWGuHljFAhb8tJhbA4mesCsoNSm74iplOrZGML16wB
 AjfuQSWmscqRa73A5SmWLnU=
X-Google-Smtp-Source: AA6agR5pfptt4Pw0SGqHosMNhPYxGlN9hZLy9gn/G/oG2CG7QAN96w4GAR9//Tn2MZtPmeQXu0MtZg==
X-Received: by 2002:a17:907:2854:b0:72b:7daf:cc0d with SMTP id
 el20-20020a170907285400b0072b7dafcc0dmr4779827ejc.524.1659693176985; 
 Fri, 05 Aug 2022 02:52:56 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ac0:56d0::a827])
 by smtp.gmail.com with ESMTPSA id
 g12-20020a170906348c00b00711edab7622sm1367771ejb.40.2022.08.05.02.52.55
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 05 Aug 2022 02:52:56 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: [PATCH] Analogue of project-shell for Python
In-Reply-To: <874jyrjb8y.fsf@HIDDEN> (Philip Kaludercic's message of "Fri, 
 05 Aug 2022 09:22:21 +0000")
References: <874jyr87ux.fsf@HIDDEN> <874jyrjb8y.fsf@HIDDEN>
Date: Fri, 05 Aug 2022 11:52:55 +0200
Message-ID: <87mtcj6mq0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::633;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x633.google.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_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Fri,  5 Aug 2022 at 09:22, Philip Kaludercic <philipk@HIDDEN> wrote:

> Augusto Stoffel <arstoffel@HIDDEN> writes:
>
>> Philip: I'm working around the possible absence of
>> 'read-multiple-choice' here.  Not sure it's a popular/useful enough
>> function to include in compat, but I thought I would bring this up.
>
> I have considered it, but the code in rmc.el is about 230 lines of code,
> that I didn't want to copy verbatim.  If you think it is worthwhile, I
> can try to add `read-multiple-choice' in some form or another.

A bare-bones version that ignores the optional arguments could be much
smaller, but I think it's at best borderline worth implementing it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56997; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 09:22:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 05 05:22:29 2022
Received: from localhost ([127.0.0.1]:56181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oJtXI-0007QR-Nx
	for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 05:22:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:59452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1oJtXH-0007QJ-AU
 for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 05:22:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46550)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1oJtXG-0003ph-MV
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 05:22:26 -0400
Received: from mout02.posteo.de ([185.67.36.66]:41343)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1oJtXF-00070H-3C
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 05:22:26 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 30517240101
 for <bug-gnu-emacs@HIDDEN>; Fri,  5 Aug 2022 11:22:23 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1659691343; bh=6GvmL3Jq+rzsuH9PBfZUNmRQicYB4/2BhmttBtiSBUA=;
 h=From:To:Cc:Subject:Autocrypt:Date:From;
 b=Eg+xH4sHCyyF7PKERSURMwMRE/aVlU7376X6MMac0LrPFAlGpIRuSKQDNAVVLgHDH
 R69YRM3exnz4pBO6DuaCXNU7tAPyW94PBroehTcbuXmfmK3tdxoICVBk6Xs5HBhOG8
 YeGoaG80qo4zQMnFvUwCVWgwOF0HbhTensBGbVqkU8USoTWARg+bO2OSf6siS+6rsE
 4fEATwHA1hvWRcXAets5WJ50JSx+TkcUSfOlVNXm11A4E5I8joORiLXTkGYl5TlO57
 oLqqIeYQtR9BsOAjEoET1ogX7kbn7g7wRRaiZLmqJoNLerSXqiA0h0OczmnDmCGtJ4
 NzIWH+Nm/jxyg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Lzg9B3W0jz9rxh;
 Fri,  5 Aug 2022 11:22:22 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: [PATCH] Analogue of project-shell for Python
In-Reply-To: <874jyr87ux.fsf@HIDDEN> (Augusto Stoffel's message of "Fri, 05
 Aug 2022 09:31:02 +0200")
References: <874jyr87ux.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Fri, 05 Aug 2022 09:22:21 +0000
Message-ID: <874jyrjb8y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@HIDDEN;
 helo=mout02.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_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Augusto Stoffel <arstoffel@HIDDEN> writes:

> Philip: I'm working around the possible absence of
> 'read-multiple-choice' here.  Not sure it's a popular/useful enough
> function to include in compat, but I thought I would bring this up.

I have considered it, but the code in rmc.el is about 230 lines of code,
that I didn't want to copy verbatim.  If you think it is worthwhile, I
can try to add `read-multiple-choice' in some form or another.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56997; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 07:31:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 05 03:31:14 2022
Received: from localhost ([127.0.0.1]:55999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oJrnd-0004Sg-Qd
	for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 03:31:14 -0400
Received: from lists.gnu.org ([209.51.188.17]:51294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1oJrnZ-0004SW-U4
 for submit <at> debbugs.gnu.org; Fri, 05 Aug 2022 03:31:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57204)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJrnZ-0001Pc-1Z
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 03:31:09 -0400
Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:37861)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1oJrnW-00068y-OJ
 for bug-gnu-emacs@HIDDEN; Fri, 05 Aug 2022 03:31:08 -0400
Received: by mail-ej1-x62c.google.com with SMTP id kb8so3549760ejc.4
 for <bug-gnu-emacs@HIDDEN>; Fri, 05 Aug 2022 00:31:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:date:subject:cc:to:from:from:to
 :cc; bh=mze4LXLfUjCp5B6lnhDW7T6B2lRMATKKh5tPbQawbhE=;
 b=jaV8vMtdLIa5nLW1ziLLu7jTjsEzvJpOn7GtYvNQQyPfF1gQYZa+6cd00h50EsMxmV
 FuSr2WbYjcv6uvzrUTuQH+hrPmnrUrTSzxPPVMfAvKWmPGN0TevgJDYTB3esOA9XLN6W
 p0wdlP2LeqIi10r8Vwe1F7tGKtG4VwcIiDVWLwyLxuHVQ7n+NUwEoLFFfh5Eh1XMOFtn
 abSUbsVTTI4oCR3lGWA6zDGCW0o4iH0RtZNAPlxG4pt3DdQ9nXtgbUPE1AVAw9Y4TeFy
 R1fDn90Wl95RzToqofbGw4m0cHokwCQLLG4Tlvf/DApWmL0kB74lKq9CRSJfKirsZay6
 +VNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:date:subject:cc:to:from
 :x-gm-message-state:from:to:cc;
 bh=mze4LXLfUjCp5B6lnhDW7T6B2lRMATKKh5tPbQawbhE=;
 b=m1OZc5vN7xP20jfMxDt+oqjoU/G4bmeL0KsJvGKjf6yBq9H5epaRN7KYZZkz8D3UcE
 CbuG0WvpKrUBk0mgJ8O1TSuLFAR73I3pND9XnS6OV7uTneGPHzr5rC0Pi/cz0Ms2YaUY
 LXuS0HusvV2yba37omZ1fcD51Ni6dU0w3NGGz0Z09eXrHGWZPr9uvf9g8MzBRVd7rxai
 qLCgw4PC8+xyaKu8ApciKllJh44LhL4tGeheu7TvvzkSG6xccoQcJAoKKXZfyGB01/Pd
 UKmKgZjiWef6BgW3Wgh1CDwy0ilzvkT14DclPlFad/k5gc/Z/pdDL0YJ0/gAMhK9pD6t
 cazw==
X-Gm-Message-State: ACgBeo3rgocyO1JXHglENxDCAdnFo1T4xjvVXTk5KU2YfU68xO+lSek1
 dixiTO9WDCmcmVZAoP9x1EY=
X-Google-Smtp-Source: AA6agR5qpLAPoKJhztfiX4WNCKyluM+LO/I6uHqtE7WWDO9B/vmpNh4WiJ14V+OrUwCGm8DYok7Yxw==
X-Received: by 2002:a17:907:1c1c:b0:730:9473:7a0e with SMTP id
 nc28-20020a1709071c1c00b0073094737a0emr4397493ejc.492.1659684664560; 
 Fri, 05 Aug 2022 00:31:04 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ac0:56d0::a827])
 by smtp.gmail.com with ESMTPSA id
 l1-20020a1709060cc100b0072ee9790894sm1243357ejh.197.2022.08.05.00.31.03
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 05 Aug 2022 00:31:03 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Analogue of project-shell for Python
Date: Fri, 05 Aug 2022 09:31:02 +0200
Message-ID: <874jyr87ux.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::62c;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x62c.google.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_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Philip Kaludercic <philipk@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

The Python shell already allows a shell to be "dedicated" to a buffer.
This patch adds the option to create a shell dedicated to a project, as
well as the option to make all Python shells dedicated by default.

Stefan: you mentioned python.el could use project.el without a hard
dependency, so it remains compatible with old Emacsen.  Is this a good
approach?  (Also: the added seq dependency is kinda superfluous now, but
it's nice to have it available for future developments as well.)

Philip: I'm working around the possible absence of
'read-multiple-choice' here.  Not sure it's a popular/useful enough
function to include in compat, but I thought I would bring this up.


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment;
 filename=0001-Python-shells-dedicated-to-a-project.patch
Content-Transfer-Encoding: quoted-printable

From 7174b34701cb201c088f0fce6a57aee9a75eef20 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Thu, 4 Aug 2022 12:08:58 +0200
Subject: [PATCH] Python shells dedicated to a project

These shells run in the project root directory and are shared among
all project buffers.

* lisp/progmodes/python.el: Require 'seq' and (optionally) 'project'
libraries.
(python-shell-dedicated): New user option
(python-shell-get-process-name): Adapt to project-dedicated shells.
(run-python): Offer possibility to create a project-dedicated shell,
or use 'python-shell-dedicated' as the default behavior.
(python-shell-get-buffer): Adapt to project-dedicated shells.
---
 etc/NEWS                 | 11 ++++++
 lisp/progmodes/python.el | 79 ++++++++++++++++++++++++++++------------
 2 files changed, 66 insertions(+), 24 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 963aa22c68..fcbf7deba7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2055,6 +2055,17 @@ the Galeon web browser was released in September, 20=
08.
 Note that this historical web browser is different from Mozilla
 Firefox; it is its predecessor.
=20
+** Python Mode
++++
+*** Project shells and a new user option 'python-shell-dedicated'
+When called with a prefix argument, 'run-python' now offers the choice
+of creating a shell dedicated to the current project.  This shell runs
+in the project root directory and is shared among all project buffers.
+
+Without a prefix argument, the kind of shell (buffer-dedicated,
+project-dedicated or global) is specified by the new
+'python-shell-dedicated' variable.
+
 ** Ruby Mode
=20
 ---
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index b8fc7d4c54..bbdd2a9502 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5,7 +5,7 @@
 ;; Author: Fabi=C3=A1n E. Gallina <fgallina@HIDDEN>
 ;; URL: https://github.com/fgallina/python.el
 ;; Version: 0.28
-;; Package-Requires: ((emacs "24.4") (cl-lib "1.0"))
+;; Package-Requires: ((emacs "24.4") (cl-lib "1.0") (seq "2.23"))
 ;; Maintainer: emacs-devel@HIDDEN
 ;; Created: Jul 2010
 ;; Keywords: languages
@@ -245,6 +245,8 @@
 (require 'ansi-color)
 (require 'cl-lib)
 (require 'comint)
+(require 'project nil 'noerror)
+(require 'seq)
 (eval-when-compile (require 'subr-x))   ;For `string-empty-p'.
=20
 ;; Avoid compiler warnings
@@ -2218,6 +2220,16 @@ python-shell-compilation-regexp-alist
   "`compilation-error-regexp-alist' for inferior Python."
   :type '(alist regexp))
=20
+(defcustom python-shell-dedicated nil
+  "Whether to make Python shells dedicated by default.
+This option influences `run-python' when called without a prefix
+argument.  If `buffer' or `project', create a Python shell
+dedicated to the current buffer or its project (if one is found)."
+  :version "29.1"
+  :type '(choice (const :tag "To buffer" buffer)
+                 (const :tag "To project" project)
+                 (const :tag "Not dedicated" nil)))
+
 (defvar python-shell-output-filter-in-progress nil)
 (defvar python-shell-output-filter-buffer nil)
=20
@@ -2580,12 +2592,19 @@ python-shell-prompt-set-calculated-regexps
=20
 (defun python-shell-get-process-name (dedicated)
   "Calculate the appropriate process name for inferior Python process.
-If DEDICATED is t returns a string with the form
-`python-shell-buffer-name'[`buffer-name'] else returns the value
-of `python-shell-buffer-name'."
-  (if dedicated
-      (format "%s[%s]" python-shell-buffer-name (buffer-name))
-    python-shell-buffer-name))
+If DEDICATED is nil, this is simply `python-shell-buffer-name'.
+If DEDICATED is `buffer' or `project', append the current buffer
+name respectively the current project name."
+  (pcase dedicated
+    ('nil python-shell-buffer-name)
+    ('project
+     (if-let ((proj (and (featurep 'project)
+                         (project-current))))
+         (format "%s[%s]" python-shell-buffer-name (file-name-nondirectory
+                                                    (directory-file-name
+                                                     (project-root proj))))
+       python-shell-buffer-name))
+    (_ (format "%s[%s]" python-shell-buffer-name (buffer-name)))))
=20
 (defun python-shell-internal-get-process-name ()
   "Calculate the appropriate process name for Internal Python process.
@@ -3043,8 +3062,8 @@ run-python
 Argument CMD defaults to `python-shell-calculate-command' return
 value.  When called interactively with `prefix-arg', it allows
 the user to edit such value and choose whether the interpreter
-should be DEDICATED for the current buffer.  When numeric prefix
-arg is other than 0 or 4 do not SHOW.
+should be DEDICATED to the current buffer or project.  When
+numeric prefix arg is other than 0 or 4 do not SHOW.
=20
 For a given buffer and same values of DEDICATED, if a process is
 already running for it, it will do nothing.  This means that if
@@ -3058,13 +3077,27 @@ run-python
    (if current-prefix-arg
        (list
         (read-shell-command "Run Python: " (python-shell-calculate-command=
))
-        (y-or-n-p "Make dedicated process? ")
+        (if (not (fboundp 'read-multiple-choice))
+            (y-or-n-p "Make dedicated process? ")
+          (alist-get (car (read-multiple-choice "Make dedicated process?"
+                                                '((?b "to buffer")
+                                                  (?p "to project")
+                                                  (?n "no"))))
+                     '((?b . buffer) (?p . project))))
         (=3D (prefix-numeric-value current-prefix-arg) 4))
-     (list (python-shell-calculate-command) nil t)))
-  (let ((buffer
-         (python-shell-make-comint
-          (or cmd (python-shell-calculate-command))
-          (python-shell-get-process-name dedicated) show)))
+     (list (python-shell-calculate-command)
+           python-shell-dedicated
+           t)))
+  (let* ((project (and (eq 'project dedicated)
+                       (featurep 'project)
+                       (project-current t)))
+         (default-directory (if project
+                                (project-root project)
+                              default-directory))
+         (buffer (python-shell-make-comint
+                  (or cmd (python-shell-calculate-command))
+                  (python-shell-get-process-name dedicated)
+                  show)))
     (get-buffer-process buffer)))
=20
 (defun run-python-internal ()
@@ -3094,15 +3127,13 @@ python-shell-get-buffer
 If current buffer is in `inferior-python-mode', return it."
   (if (derived-mode-p 'inferior-python-mode)
       (current-buffer)
-    (let* ((dedicated-proc-name (python-shell-get-process-name t))
-           (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
-           (global-proc-name  (python-shell-get-process-name nil))
-           (global-proc-buffer-name (format "*%s*" global-proc-name))
-           (dedicated-running (comint-check-proc dedicated-proc-buffer-nam=
e))
-           (global-running (comint-check-proc global-proc-buffer-name)))
-      ;; Always prefer dedicated
-      (or (and dedicated-running dedicated-proc-buffer-name)
-          (and global-running global-proc-buffer-name)))))
+    (seq-some
+     (lambda (dedicated)
+       (let* ((proc-name (python-shell-get-process-name dedicated))
+              (buffer-name (format "*%s*" proc-name)))
+         (when (comint-check-proc buffer-name)
+           buffer-name)))
+     '(buffer project nil))))
=20
 (defun python-shell-get-process ()
   "Return inferior Python process for current buffer."
--=20
2.37.1


--=-=-=--




Acknowledgement sent to Augusto Stoffel <arstoffel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#56997; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 8 Aug 2022 14:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.