From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: python-mode: Why python-interpreter defaults to "python" instead of looking for python/python3 Date: Thu, 16 Mar 2023 11:09:10 +0100 Message-ID: <87ilf1atyx.fsf@gmail.com> References: <874jqv3uab.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5613"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Mart=C3=ADn_Fern=C3=A1ndez?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 16 11:11:11 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pckZh-0001Ec-IU for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Mar 2023 11:11:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pckYC-00038w-46; Thu, 16 Mar 2023 06:09:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pckYA-00038D-0Z for emacs-devel@gnu.org; Thu, 16 Mar 2023 06:09:34 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pckXt-0006ZB-6c for emacs-devel@gnu.org; Thu, 16 Mar 2023 06:09:33 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id fd5so5309407edb.7 for ; Thu, 16 Mar 2023 03:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678961352; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DxUwZVtxAz5O88vh964ZE58mgtmNO9GUD1KKZUpHWyI=; b=FVx/3tmg4VxKRShH+SGnZ6ldW5wRZ+F0k1BhZu46pRqbuPFFG52rG3efZqltZqlcGD RqkbvzSVzRP1PBuekem+hpDmvpfaWjj7fX5F+NnH6nSKaAdMyieRKXh5dXMrPjfy1YbP F+NNNaN/hBxd9EhrIyxNt4Fd/k/MaJ+cuU4jeRv/daIHdfUmyS9hHKHwX2jXIrQr6eKr E9D+ejOX9cf4avb+WyGqG/34sNse5JEafMfMa3IjIen6D31dW8ln6miEZLST302lv3In m6saUo3SJrMXJAzHoaypzFHA13GdaUo7HJ88Y/ATXkkwwIS3J457IdzvqJR8TTxs4gwe xPWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678961352; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DxUwZVtxAz5O88vh964ZE58mgtmNO9GUD1KKZUpHWyI=; b=pNhsNEdbYQ241oUqTAbxOhpzzvJWGSXyp/7w3uUgHcmYEMG6/4AkOSzzPLd0ioH4eD cjNOLjbR5n7h6pvx5id04ucAXOfWBkMXyo7ZjW66AQzMC5Vzh9i2PMj2AM6dlqs3HTfU W46MFGcFCMRiw5kij3uKFCwFga48UqhIfgCOGc9loyx9Si7+anDHJwo1RFWkZjHGLddK WxS92SGAFje4dcaK/mXlUN3cvyPVlTvxIe3O9Khpk/MB1mWruDKwnVr0FL/iboh0bvbS wegmy+SL7pv1zSKZuiP5ZL0UTJ9M5OAV7apHcKoldasSahnxAt2yzc4ISZq7Aj5x3tE6 RG6Q== X-Gm-Message-State: AO0yUKX/ihfGZWjfR+0xFWp2sUUzflbH30Z0jm4DWDIWMNjIaDIa6E0g 6G6KIEhpsKigx/tkfniXq4M3Gj4soOM= X-Google-Smtp-Source: AK7set99FzASP+6AmkM5clV6KKE2MaZXwxKLArpGRdfJTPu0HJfF8Um/2J83fkSdbeXPP43SVwt7wA== X-Received: by 2002:a17:906:4dd0:b0:929:37c3:1021 with SMTP id f16-20020a1709064dd000b0092937c31021mr9208434ejw.48.1678961352531; Thu, 16 Mar 2023 03:09:12 -0700 (PDT) Original-Received: from ars3 (pd95c95b0.dip0.t-ipconnect.de. [217.92.149.176]) by smtp.gmail.com with ESMTPSA id v11-20020a17090651cb00b008f7f6943d1dsm3639646ejk.42.2023.03.16.03.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 03:09:11 -0700 (PDT) In-Reply-To: <874jqv3uab.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 08 Mar 2023 20:41:32 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x530.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304514 Archived-At: Hi again Mart=C3=ADn, On Wed, 8 Mar 2023 at 20:41, Augusto Stoffel wrote: > On Wed, 8 Mar 2023 at 11:03, Mart=C3=ADn Fern=C3=A1ndez wrote: > >> Hey, >> >> I'm wondering why there is no logic to find the latest python >> executable installed (python vs python3) when setting >> `python-interpreter`, as it is done with `python-shell-interpreter`. >> >> I think it should be added, but since it is a straightforward change I >> assume there are reasons for it. Otherwise I'm happy to send a patch. Can you expand a bit on why you think so? I just noticed that Debian doesn't provide a `python' command by default, so indeed some logic might be needed. But then it should look for python, then python3, and finally fall back to python. Still, doing so has its downsides, as I mentioned in my previous message. > IMO the logic to choose `python-shell-interpreter' is misguided. The > default value should be just "python", since if you are doing anything > with Python and "python" doesn't point to the right version, then you > are in trouble anyway. OTOH, if you really need to work with Python 2 > and symlink "python" accordingly then the current default proactively > puts you in trouble. > > Personally I'd be happy to see a patch fixing `python-shell-interpreter'.