From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lin Sun Newsgroups: gmane.emacs.bugs Subject: bug#70707: 30.0.50; [PATCH] ; Check the process param in function (python-shell-completion-at-point) Date: Wed, 1 May 2024 22:49:29 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000004630cf06176c4d6a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8458"; mail-complaints-to="usenet@ciao.gmane.io" To: 70707@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 02 00:51:07 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 1s2In5-00020Q-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 May 2024 00:51:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Imm-0001gb-BR; Wed, 01 May 2024 18:50:48 -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 1s2Imf-0001fB-Mp for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 18:50:42 -0400 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 1s2Imf-0005F7-En for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 18:50:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2In0-00053d-FV for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 18:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 May 2024 22:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171460381419418 (code B ref -1); Wed, 01 May 2024 22:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 May 2024 22:50:14 +0000 Original-Received: from localhost ([127.0.0.1]:39878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2ImE-000538-Dp for submit@debbugs.gnu.org; Wed, 01 May 2024 18:50:14 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:46340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2ImB-000532-Ld for submit@debbugs.gnu.org; Wed, 01 May 2024 18:50:12 -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 1s2Ilk-0001Jb-68 for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 18:49:44 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2Ili-0004qr-F5 for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 18:49:43 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-572a93890d1so1652875a12.3 for ; Wed, 01 May 2024 15:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714603781; x=1715208581; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=SihBBAxVxhTzbPFFe3EYQXRBZaZzLj3kXgMOwtXaAfs=; b=C4dIVFOWfB5aPuYYUwGGRuLH0q896f27HksRPV9gkW7r3B2f1uHGIvjvxTWNbhJNBO nqmIz4jWYCaUsNCO6mZoqhmJhNhEmcFIXEEO3Bpmz72KeJmrSJMOG5728zbnbapJ2IE+ jGveuhrcaTUQBcjHCpui5RconVsZir+R2YL+ovsPJ97DlJLrAojgf9gxGhZpmRkHzCFb 7HJLNZxB7CGwgY9aA8kT+Rlp3in0H8kB4XovyDjrL7JnjBcPoA4ggwNKrAOMdSR5goj3 4bO6V9DHQFZVhHElyBsHL6Pv5z9S5zi588oW0LEjiA0Z7f0fLFQPRT+F03BAMw0EOleR LTgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714603781; x=1715208581; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SihBBAxVxhTzbPFFe3EYQXRBZaZzLj3kXgMOwtXaAfs=; b=dgk79+msF4ZLIBPcoWxOjdi1Q2UeNDyEBBM+fm8S8sM/b3Uw0fFR71i/XGeabo3YCN WNdt9ym5U5HTsmXXOU0h4npDHIiP9aLtLhV22xwIM97gvf9WlAGwWYm7Ac9wIoYmNzbe nmv6QFmCft6Vw8t3zSlxihP16KXdPJoQBc7XSI3rUpLIhiZTOHRWFZMp/4NwAaqDbnSo RvT8NumSWa88y1Ok2t5P78tXOX5xd/JsfR5MewiESxcl9YrzLcB26hMtlMGGPPixuCat JWw12YJVVqHWLR5d7YJ6EQ9J886vd6u1sdIUvLiGJgl4TjDH4r4enBgrp84n27pJ8Dv3 Qifw== X-Gm-Message-State: AOJu0Yw4qr56u3I5FMnx+diibEC4lfzfBZapgN0dGExjppygzdvaxWyL RzJT0iQuf92XGAyDJQNzcGNuijKcznZLgQkv5e0RuRNd6cjzocNQUiZ0vhmBcPp1n4z1MM2+B5W e9fWfCub4DJW5+17bJmopQ1FHOmwNsG/O X-Google-Smtp-Source: AGHT+IEz7ddEeasuiVf4LT7fmpYZp+MCXiVDhwuzEQZ6kz6GvjaWP5Ekx+NX8X0FBlkCXn5rvC570UvIlCToeop8zDs= X-Received: by 2002:a50:9ee2:0:b0:56d:fb36:c388 with SMTP id a89-20020a509ee2000000b0056dfb36c388mr331051edf.9.1714603780601; Wed, 01 May 2024 15:49:40 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=sunlin7.mail@gmail.com; helo=mail-ed1-x531.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:284263 Archived-At: --0000000000004630cf06176c4d6a Content-Type: text/plain; charset="UTF-8" Hi, There is an unexpected error message happening with function `python-shell-completion-at-point`. > Wrong type argument: processp, nil It happened because the function does NOT check the process param. The patch will check the param and display a user error message gracefully. Steps to reproduce the issue. 1. $ emacs -q /tmp/a.py # start emacs and open a python source file 2. type "C-c C-p" (or M-x run-python) to start a python shell 3. type exit() to stop the python process but the buffer still exists 4. M-x python-shell-completion-at-point will get the error message Please help review the patch. Thanks. Regards --0000000000004630cf06176c4d6a Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Check-the-process-param-in-function-python-shell-com.patch" Content-Disposition: attachment; filename="0001-Check-the-process-param-in-function-python-shell-com.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lvoesrqy0 RnJvbSBhYTQ0Yzk1YzdmMTNmMmQ2OGJlODMyNjBlNjE4Y2Y0ZDgwNmIzMTNiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW4gU3VuIDxzdW5saW43QGhvdG1haWwuY29tPgpEYXRlOiBX ZWQsIDEgTWF5IDIwMjQgMDY6NTU6MzEgKzAwMDAKU3ViamVjdDogW1BBVENIXSA7IENoZWNrIHRo ZSBwcm9jZXNzIHBhcmFtIGluIGZ1bmN0aW9uCiAocHl0aG9uLXNoZWxsLWNvbXBsZXRpb24tYXQt cG9pbnQpCgoqIGxpc3AvcHJvZ21vZGVzL3B5dGhvbi5lbCAocHl0aG9uLXNoZWxsLWNvbXBsZXRp b24tYXQtcG9pbnQpOgogIENoZWNrIHRoZSBwcm9jZXNzIHBhcmFtIGF0IHRoZSBiZWdpbm5pbmcg b2YgdGhlIGZ1bmN0aW9uLgotLS0KIGxpc3AvcHJvZ21vZGVzL3B5dGhvbi5lbCB8IDIgKysKIDEg ZmlsZSBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rl cy9weXRob24uZWwgYi9saXNwL3Byb2dtb2Rlcy9weXRob24uZWwKaW5kZXggZDZjMjllNWZmYy4u NGIyZTJmODIxNSAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMvcHl0aG9uLmVsCisrKyBiL2xp c3AvcHJvZ21vZGVzL3B5dGhvbi5lbApAQCAtNDcwO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