From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#51196: 29.0.50; python.el eldoc problems Date: Sat, 16 Oct 2021 15:49:38 -0300 Message-ID: References: <87o87qdomy.fsf@gmail.com> <87zgr949fr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25878"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51196@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 16 20:50:51 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mbole-0006VX-K5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Oct 2021 20:50:50 +0200 Original-Received: from localhost ([::1]:57698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbolY-0001If-8V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Oct 2021 14:50:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mboku-0001IT-VF for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 14:50:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mboks-0002v8-42 for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 14:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mboks-00055h-21 for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 14:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Oct 2021 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51196 X-GNU-PR-Package: emacs Original-Received: via spool by 51196-submit@debbugs.gnu.org id=B51196.163441019719554 (code B ref 51196); Sat, 16 Oct 2021 18:50:01 +0000 Original-Received: (at 51196) by debbugs.gnu.org; 16 Oct 2021 18:49:57 +0000 Original-Received: from localhost ([127.0.0.1]:43053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbokm-00055K-RC for submit@debbugs.gnu.org; Sat, 16 Oct 2021 14:49:57 -0400 Original-Received: from mail-yb1-f170.google.com ([209.85.219.170]:37725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbokl-000557-QD for 51196@debbugs.gnu.org; Sat, 16 Oct 2021 14:49:56 -0400 Original-Received: by mail-yb1-f170.google.com with SMTP id w10so1047445ybt.4 for <51196@debbugs.gnu.org>; Sat, 16 Oct 2021 11:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TcGOr1BlOolDzwBoREWpKGVe6X7utMBtvun1OOfebto=; b=fPm5Zul8PKo/JlDD5JzcBYNKRhfqxX1803fPoQSWWOXAtNam7fI9fZPcwcm0PQmaGB rCHm9XwgzTSsuFS6k+jw/95SE+Sx6QdF+CQWXjw44F524OzgAgcDBQIuHsmYPyXb3vG8 Zud3C6M/tek+d6vPwZ0wio0HR4mr1CjhRmsLdu6xerDYmb7w5EVxOdxd1e0hTtEF7qHu 7X6yuREr6GREv871kCOslZebYfGBcqGBhrkGT+XM2r4+3b3qbtxK6hwv91OYJlKN1caK v2oaT9vTPKBokFAoG7UCasnsZAFEjSEE5E16/D9XBVMzz8VaWhziDGpcmgXy04IAx3WX nZSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TcGOr1BlOolDzwBoREWpKGVe6X7utMBtvun1OOfebto=; b=arw2QafUOoxpMe3pZaVdTFDWVggYlzb5kT7yXSOuEImrNG6qbk7DNpNtHkFdxQPA2E iPZ/Dad+jH+//3XaxF2aJcUth37T+DebepjRomtAuPlR3MqBMnPb3VLpNqvxcpci8Mq2 4p1EcYs2eUvMjeJwWtN9uF6mqAs9wkrouKndttu4WFDTbGXc1L5FAYMqPsdkqISdvpcg QHA1lqXRio+Eze3DcYpSNF3pj9bqF/tI+5iV3Pcu8zag+O5OS2adHb/hSVvnlVrKTv5v gAHf5Hw1dqMNZalnIBc8GkPXOtF/jNkVqU6KCzxbIrmkkRwYxBOPXKD3nr0+u39z6Isj 5JFw== X-Gm-Message-State: AOAM532rfSymvSVFmeIId+QmWws4LZI4bo19dbZYn46bfEcGco7EkbON 29OLSAnZtpECuJDGGm4nntymCQ36FVy6SMzA1Ej1P3GzHv4= X-Google-Smtp-Source: ABdhPJyZEeEbU3HlyRdcU49TEKJQe14+W2xgpmdXKotXAUjgdUTG9VK2UKOBpg8wNOcnRZqClkPwZmjkki5KHyfRmzU= X-Received: by 2002:a25:ae92:: with SMTP id b18mr20532090ybj.220.1634410190227; Sat, 16 Oct 2021 11:49:50 -0700 (PDT) In-Reply-To: <87zgr949fr.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217387 Archived-At: Hi Augusto, > I see. I never noticed this because Eglot masks the completion/eldoc > functions from python.el. I guess this is often the case. There are some scenarios in which you mainly interact with your interpreter from a python buffer (as in your code-cells) for which naive (not naTive :) ) runtime completion with no static inference bells and whistles may still be desirable. IIRC elpy has some kind of fallback from jedi completion to runtime completion fed by the inferior interpreter. elpy also implements a small rpc mechanism for all this stuff, so it doesn't share the shortcomings of python.el while still not requiring a full-fledged static analyzer. Sadly elpy is in low-maintenance mode now. emacs-jupyter also gets this right when completing from its inferior kernels, it even provides a minor mode that is able to pull off its magic inside org babel blocks! Anyway, static analyzers are getting better every day and the point of runtime completion is in turn getting mooter every day, except perhaps in that it still is the more lightweight alternative. > As you already mentioned, the biggest problem here is to use the same > Python process/thread for both REPL interaction _and_ > completion/documentation stuff. Yes, there are race conditions between emacs and its user, to put it somehow. > > But that's not true of non-native completion AFAICS and > > it certainly isn't of C-c C-f (help on symbol). > > If the user explicitly types C-c C-f, then I see no problem in the > blocking behavior. I don't think we can ask the user to remember checking its inferior process before requesting quick help on a symbol and, anyway, we don't need to agree on this because after fixing the implicit cases this one will follow suit for free. I'm about to retire in a few months and I will have the time to undertake a slightly more ambitious change regarding these rough edges of python.el, but I won't start without some level of consensus around the issues and the solution. After that, I wouldn't mind doing some maintenance of the module. Best regards, Carlos