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: Tue, 23 Jan 2024 23:15:30 +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=ISO-2022-JP Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36200"; 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 Tue Jan 23 15:16:08 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 1rSHZQ-0009Gm-4x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jan 2024 15:16:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSHZJ-0006vj-FO; Tue, 23 Jan 2024 09:16:02 -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 1rSHZF-0006vK-Ah for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 09:15:57 -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 1rSHZF-0007NM-31 for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 09:15:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSHZJ-0007pD-N9 for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 09:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jan 2024 14:16: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.170601934330054 (code B ref 68559); Tue, 23 Jan 2024 14:16:01 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 23 Jan 2024 14:15:43 +0000 Original-Received: from localhost ([127.0.0.1]:42507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHZ1-0007og-IL for submit@debbugs.gnu.org; Tue, 23 Jan 2024 09:15:43 -0500 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:58870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHYy-0007oR-E7 for 68559@debbugs.gnu.org; Tue, 23 Jan 2024 09:15:41 -0500 Original-Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6dd85328325so114999b3a.1 for <68559@debbugs.gnu.org>; Tue, 23 Jan 2024 06:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706019330; x=1706624130; 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=RaEayjhGvJl6C2xo86ks6UjXhpqu4e6Wcu/OUKxTQOA=; b=Gghl2KgCAmg9nfxFWU5dJn6jrRpIVCbFduxuAKYEIACkQ4OgSBf9u5l1xmrXR/h0GA UCIUUxnYmjxuPiMjJNwc0AzwRcBiwhn7EX0Y6v0YN0vpE74U4mtclq07H71AvMUqa+fW iBcMLdUPfsMtwgq0+Ptkqun/QaBnH9BS9kAyOxIvjXeNmgTh/WvVUPEw8R2oHGva3ZOl dMlh3z2C6FP05yyMdiFAW4DQ16f01MwslPnXMiG6av8UjpIq2ttRXzfIs4R8Nh6EyVJC jrkcePijdM6rGC+l1z2uyZ33NPiZ4nU5oeX8rbuBA73WIUN2AAjnemFuLjoaw1oc8bwk RWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706019330; x=1706624130; 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=RaEayjhGvJl6C2xo86ks6UjXhpqu4e6Wcu/OUKxTQOA=; b=TAY86IBclX6rji/JPFU/qIvf8/Hsg4OzTVqjRzisHGRM1/meX2A99Yr5eTog7ErTDx cDDsHDDgg4GP/IrGbhzC9MBUP/KTXaNq3mcGcZy3Ib63yYmXHnvetgbQSX+fzzTwlqA1 qNmxRmrrNQRBa6qywffhVMVFJRURJH7F8aVeTr2HoT0nOG31Apc8CnekOuJqVCuLJsYO 7yKf43RWkUytRJYrjKq6auHxSVgwPt3NxxhFF3BHKli1+6yovx932gpKHCoOxCBhKjzF 1ePnHDVQVP/2uQvvkXqJ52HuJTgZJshIJJUWqcxAFac+TKnjvfCwstAQoOlOcydT6syE jvTQ== X-Gm-Message-State: AOJu0Yy6LW2NsdkUllZcAbFlNi8kv9yKX4FnSexfHh4Kkwl/JqdwLh0c YVs89DpsL1d4/xxaWFGmLOR7h7x+LlMFFJ3rS+89QWf6FHr+u1M9/0eqN5J1 X-Google-Smtp-Source: AGHT+IEK+ySysVvZJO7fYOHfYS6xrFCJiIQ66emncW0mZCUP/+pcjDKAT8QV0pva71S26L8gydkNrA== X-Received: by 2002:a05:6a00:4602:b0:6db:d978:9047 with SMTP id ko2-20020a056a00460200b006dbd9789047mr6446890pfb.1.1706019328829; Tue, 23 Jan 2024 06:15:28 -0800 (PST) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id x33-20020a631721000000b005ceac534e47sm10246672pgl.51.2024.01.23.06.15.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 06:15:28 -0800 (PST) In-Reply-To: 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:278738 Archived-At: Liu Hui wrote: > kobarity 于2024年1月21日周日 17:34写道: > > > 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 have added experimental support in the attached patch, can you test > it please? Thank you. I tried the new patch and confirmed that the Python Shell buffer allows keyword argument completion on multi-line function calls. However, my expectation is that it can be done in Python buffer as well (after calling `python-shell-send-buffer'). Is this also possible? > > I am not sure if Python snippets should be separated. Do other > > language supports keep them separate? > > I think it allows to reduce code duplication (e.g. the IPython support > code existing in both python-shell-completion-setup-code and > python-shell-readline-ipython-setup-code) and make code more simple. > It seems other languages do not contain as many code snippets as > python.el. Sorry, I misunderstood that snippets meant skeletons. I agree that python.el has long Python codes, which is not easy to maintain. Are you proposing to separate the snippets into .py file? If it's acceptable from the Emacs' source code management perspective, I think that is a good approach.