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: Sun, 21 Jan 2024 18:34:53 +0900 Message-ID: References: <83zfx39mcy.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16595"; 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 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 21 10:36:21 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 1rRUFY-00049r-7n for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jan 2024 10:36:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRUFF-00057a-I7; Sun, 21 Jan 2024 04:36:01 -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 1rRUFD-00057J-QM for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:35:59 -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 1rRUFD-0004Vo-64 for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:35:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRUFF-0003Vh-UQ for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jan 2024 09:36:01 +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.170582970713422 (code B ref 68559); Sun, 21 Jan 2024 09:36:01 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 21 Jan 2024 09:35:07 +0000 Original-Received: from localhost ([127.0.0.1]:36604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRUEN-0003UP-4X for submit@debbugs.gnu.org; Sun, 21 Jan 2024 04:35:07 -0500 Original-Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:49476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRUEH-0003Ti-EY for 68559@debbugs.gnu.org; Sun, 21 Jan 2024 04:35:05 -0500 Original-Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6dbdb1cb23fso337147b3a.3 for <68559@debbugs.gnu.org>; Sun, 21 Jan 2024 01:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705829692; x=1706434492; darn=debbugs.gnu.org; h=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=xV4T3Lh2L/+z2MqvNqUtxaIq2wZM50sJeOCJ7DvAzxI=; b=McYEm7RpjukAfewkB7E1ChnKuETjkbVobl+oQiRDSXsC8teBHyRQ7HhupcuYkrmJTM RVnV4ZDovXsOjwYLH4KxkJVBV9Klotfmphkgdo3MXCDb++NHc0Pj0mzD4pAEndBj9dOG 9KOYTxwxTDK6J4IpTpVh49MwsVo7P7v02suRoXuQ5JDPNS+eeuMFcdV8p7EoiUBuMMj2 TI0zKksL5uJDYiwVGa43MA/T8lbha+viDfUx80VsaV/2PaOZHe5KESo0toFXUCurWumV 4jI8wBg7PJnE0T2EdQr7f5kweuZ+lQ2ZBR116yKxnDAGvZ86SHruxFEaA1LRvD1ZZVlr fnVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705829692; x=1706434492; h=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=xV4T3Lh2L/+z2MqvNqUtxaIq2wZM50sJeOCJ7DvAzxI=; b=gD+HnG+O2XLBpT+x3EyP8VLEvTo+pjWfQM9ckpE2eI3qW3Tn1H6gyO6nK7hvcyQr7a VoSZ/i+43iz2Y7MbJcweQd1Gm+XpGnLjfjzTEMrZjjsTCQtD3An/do9NbtMwsOTBY9sV P1mEv4qHimp9/rkpSNND2My7OikHjtwG6IpGjjJE7HhbxOwsFWkQvyW/bcjXMvxHX5mD 7xqEEgnah7Kvtv0lNqPG6s2Nz+1PCJzZvSn/aRlD0edONK+9l6dEDS9xZiA4UqsVQQ5V BfhWkQcGmHzoWjW0HQ8YST3fj3iMKIHJySk7PxNpherD7PGb6cHFBQ42KBFo31LGVf/U T3lg== X-Gm-Message-State: AOJu0Yy20i+cqivSSagjc3ZDZ4s8rpjjO4nKaCF3NZm8af+5vo2y+G7Z eQL3WAykgYo29Xps9b4EYcHdYOMEMCPeGs3O+maYvgfERlGgOdl5 X-Google-Smtp-Source: AGHT+IFo24ee1G74wPR65ivw+Nj/RxwtN01iefI8d6hO0K9gVVYSy3J9HCO5uPkP6c34WWa6TetxDQ== X-Received: by 2002:a05:6a00:4b0c:b0:6db:d2be:e66c with SMTP id kq12-20020a056a004b0c00b006dbd2bee66cmr2374926pfb.4.1705829692014; Sun, 21 Jan 2024 01:34:52 -0800 (PST) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id x21-20020a056a00189500b006dbd890c5e0sm947032pfh.97.2024.01.21.01.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 01:34:51 -0800 (PST) In-Reply-To: <83zfx39mcy.fsf@gnu.org> 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:278660 Archived-At: Eli Zaretskii wrote: > > > From: Liu Hui > > Date: Thu, 18 Jan 2024 12:48:37 +0800 > > > > Currently python-shell-completion-at-point doesn't respect the > > delimiter setting of readline completer and always split the text, > > resulting in poor completions when completers that don't need word > > splitting, e.g. jedi[1], is used. This patch fixes the problem. > > > > Meanwhile, this patch adds an option 'python-shell-readline-completer' > > to make Python shell provide better completion experience (e.g. > > completing function parameters, dictionary keys) by default if users > > are using vanilla Python interpreter with jedi or using IPython, where > > the completion support for IPython has been enhanced (e.g. showing > > type annotations and function signatures). > > > > BTW, I think it may make sense to move Python snippets to a separate > > file to make them easier to be maintained. > > Thanks. Let's see what others think about this (I don't use Python > enough to have an opinion that matters). Thanks for the patch. I have tried it and found it to be a very powerful enhancement. Is it possible to allow completion of keyword arguments in a multi-line function call like the following? #+begin_src python re.split( 'b', 'abc', maxs #+end_src I am not sure if Python snippets should be separated. Do other language supports keep them separate?