From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#68559: [PATCH] Improve Python shell completion Date: Fri, 23 Feb 2024 23:39:05 +0900 Message-ID: References: <6BAFD8BF-8F18-4D9F-9DB3-A185AEF2EBCA@gmail.com> <8B4172D0-FC31-4437-99C4-683C892C5F86@gmail.com> <3A206D3C-E193-4240-A6DB-D3EC7DAAE7C2@gmail.com> <16E39FDF-5F8E-4C1B-8BCD-A0147B97F2B8@gmail.com> <7150E568-B07D-4D92-8073-979387553394@gmail.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29007"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Eli Zaretskii , 68559@debbugs.gnu.org To: Liu Hui , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 23 15:54:39 2024 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 1rdWwh-0007KX-Gd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Feb 2024 15:54:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdWwF-0000Pt-1N; Fri, 23 Feb 2024 09:54:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdWjA-0004qC-Gk for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 09:40:41 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdWj9-0003E4-J5 for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 09:40:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdWjW-0006TT-OI for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 09:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Feb 2024 14:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68559-submit@debbugs.gnu.org id=B68559.170869925624856 (code B ref 68559); Fri, 23 Feb 2024 14:41:02 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 23 Feb 2024 14:40:56 +0000 Original-Received: from localhost ([127.0.0.1]:42471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdWjP-0006Sk-SU for submit@debbugs.gnu.org; Fri, 23 Feb 2024 09:40:56 -0500 Original-Received: from mail-pl1-f179.google.com ([209.85.214.179]:52379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdWjN-0006SM-K3 for 68559@debbugs.gnu.org; Fri, 23 Feb 2024 09:40:54 -0500 Original-Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1dc29f1956cso6060925ad.0 for <68559@debbugs.gnu.org>; Fri, 23 Feb 2024 06:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708699164; x=1709303964; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=7wbIm00xqxoaEsmvOtlakQ2k2rMsyoM4GR/9l4LAqvc=; b=nCL0mPlhTGWG779kEpWD34SoNuysm4908S75bBWLk45RNojjJhcoTpsqGnDnuny333 duZOSJNQhNPorXvHW3cnugu5nAlV+cBoBc8tKQnJeV+ON0QX/SDmOFbEpXwokiaV7t/t wPATYO0a8G3J3KkXXxEqeOiNAR08kpZZSO2FXLEDWfZ6CR0OFcqkXCV8sV4BxMr1IwuW A1bafPjSqaBUTjrRYDbnJLqjDM6DfEdSDHCkTKmEr71NddjW8UdfzukNWLN9NEWF7PEb xbQq4zMuJDK6izNZsjeggz9BqQvBHwVGnerYBTrEUP5QtObomfDTGjkgTn7xUyBOnZpw 3n0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708699164; x=1709303964; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7wbIm00xqxoaEsmvOtlakQ2k2rMsyoM4GR/9l4LAqvc=; b=XkbqTsRxS2xK0csLTHwBvHOSsWE3yb4fOABdn4dYeefcPB3r23iD/Ih9Tssh7upbZ3 s7jNYUjyRTakhyy3R3/U2MDsSfZirPftgHKuuSliOfgYLm/GU4VsA5tKWcHe/LyYPQI8 JINLXpjY2IlbSRNts6novV4DxHAvn49B63kQLMJfmTNF1CNfYczjL2nwl4NpWeGd/bnv KL1T5O6WNy/0dDJEei0q2KLH4byLo3RaDKybbxVPUVKkde2HsHmstBNWhk20H5RLXxHr iBtnn9S/tnkKCX+39hugPAc9OELnCl62IaherSw4dBB5OmI56+ZKWzNMY4gYHw/Eh9iZ aSXg== X-Forwarded-Encrypted: i=1; AJvYcCXeCNFVTm2bD8z7+UYQpDZPowUuivwfcqqppB8I+VNYmMYoNIg7gCsTtOYI5/A4MqNnIF2DSk0ibopOz3wKTcE+E3vlO3g= X-Gm-Message-State: AOJu0YyHSSpmRcNhivYUv3cW9Ter7ku9NglpGmHxP7fIV+k2Y/iF68dO NxhoUVOAPoZnPaveVihCbmT/1Q8xh4lO5EvIFrNRkj4148VzCDSm X-Google-Smtp-Source: AGHT+IGzkxuCDfMldW9BoW0Inua7leCMhk39HEOhijs7EFQDQbE9n7uXSjHJYwU0WHeGpQhFXqLU5w== X-Received: by 2002:a17:902:e548:b0:1dc:3261:ab7 with SMTP id n8-20020a170902e54800b001dc32610ab7mr2139789plf.49.1708699164003; Fri, 23 Feb 2024 06:39:24 -0800 (PST) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id jc13-20020a17090325cd00b001db6de983d3sm11743295plb.85.2024.02.23.06.39.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:39:23 -0800 (PST) In-Reply-To: <7150E568-B07D-4D92-8073-979387553394@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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280496 Archived-At: Hi Liu, I noticed that with Non-native completions, Jedi completion is not enabled even if PYTHONSTARTUP is set and "REPL completion using Jedi 0.18.2" is shown in inferior Python. Is this expected behavior? Jedi completion is enabled regardless of PYTHONSTARTUP setting when I use IPython with Non-native completions. Mattias Engdeg=E5rd wrote: > > I think we can also improve Non-native completions. Current > > implementation sends the definition of __PYTHON_EL_get_completions() > > every time. However, sending it once during initialization should be > > sufficient. Worse, if the number of characters sent exceeds > > `comint-max-line-length', it will be sent via file. This is happening > > in your environment. Here is the log you presented. > >=20 > > Test python-completion-at-point-1 backtrace: > > json-parse-string("__PYTHON_EL_eval_file(\"/var/folders/qy/zstv16390 > >=20 > > Thanks to the echo back, we can see __PYTHON_EL_eval_file() was used. >=20 > Right. (The need for a file is just an artefact of Comint limitations, is= n't it?) Yes, I think it is the limitation of comint. However, if the definition is omitted, it is unlikely to reach that limit, since all that is required is to send the string like '__PYTHON_EL_get_completions("subproc")'.