From unknown Fri Jun 20 18:01:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1251 <1251@debbugs.gnu.org> To: bug#1251 <1251@debbugs.gnu.org> Subject: Status: 23.0.60; `process-status' does not work with buffer names Reply-To: bug#1251 <1251@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:01:46 +0000 retitle 1251 23.0.60; `process-status' does not work with buffer names reassign 1251 emacs submitter 1251 Markus Triska severity 1251 normal thanks From triska@gmx.at Sat Oct 25 10:14:30 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,FOURLA, IMPRONONCABLE_2,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Oct 2008 17:14:30 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9PHERhA032661 for ; Sat, 25 Oct 2008 10:14:28 -0700 Received: from mail.gnu.org ([199.232.76.166]:54971 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Ktmft-0001Dx-RV for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 13:11:41 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KtmiY-0003gL-4B for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 13:14:26 -0400 Received: from mail.gmx.net ([213.165.64.20]:60195) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KtmiX-0003dF-CQ for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 13:14:25 -0400 Received: (qmail invoked by alias); 25 Oct 2008 17:14:20 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp020) with SMTP; 25 Oct 2008 19:14:20 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX187Nkhou807skW9+z1+cnVOsPmRQu0OaXJjUxdkrD 709vuPdpbmMAyH Received: by mt-computer.local (Postfix, from userid 502) id 86510B45CE5; Sat, 25 Oct 2008 19:14:16 +0200 (CEST) From: Markus Triska To: emacs-pretest-bug@gnu.org Subject: 23.0.60; `process-status' does not work with buffer names Message-Id: <20081025171416.86510B45CE5@mt-computer.local> Date: Sat, 25 Oct 2008 19:14:16 +0200 (CEST) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.47 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Contrary to what its info entry says, process-status does not work if its argument is a buffer name; in emacs -Q, evaluating the form: (let* ((buffer "bc-buf") (bc (start-process "bc" buffer "/usr/bin/bc"))) (mapcar 'process-status (list buffer (get-buffer buffer)))) yields: (nil run) The following patch fixes this problem for me: 2008-10-25 Markus Triska * process.c (Fprocess_status): Accept buffer names. Update docstring to match info description. diff --git a/src/process.c b/src/process.c index b8e390e..4a238f7 100644 --- a/src/process.c +++ b/src/process.c @@ -828,18 +828,15 @@ closed -- for a network stream connection that is closed. connect -- when waiting for a non-blocking connection to complete. failed -- when a non-blocking connection has failed. nil -- if arg is a process name and no such process exists. -PROCESS may be a process, a buffer, the name of a process, or -nil, indicating the current buffer's process. */) +PROCESS may be a process, a buffer, a process name, a buffer name, or +nil, indicating the current buffer's process. */) (process) register Lisp_Object process; { register struct Lisp_Process *p; register Lisp_Object status; - if (STRINGP (process)) - process = Fget_process (process); - else - process = get_process (process); + process = get_process (process); if (NILP (process)) return process; In GNU Emacs 23.0.60.14 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9) of 2008-10-25 on mt-computer.local Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t From monnier@iro.umontreal.ca Sat Oct 25 12:11:31 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Oct 2008 19:11:31 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9PJBSQr030218 for ; Sat, 25 Oct 2008 12:11:29 -0700 Received: from mx10.gnu.org ([199.232.76.166]:43968) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KtoV9-0006ZV-6A for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 15:08:43 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KtoXn-0005E2-VL for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 15:11:28 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22708) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtoXn-0005De-Le for emacs-pretest-bug@gnu.org; Sat, 25 Oct 2008 15:11:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAF8MA0lFxLrB/2dsb2JhbACBdb5ig0+BDQ X-IronPort-AV: E=Sophos;i="4.33,484,1220241600"; d="scan'208";a="28859239" Received: from 69-196-186-193.dsl.teksavvy.com (HELO pastel.home) ([69.196.186.193]) by ironport2-out.teksavvy.com with ESMTP; 25 Oct 2008 15:11:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 19C718E6C; Sat, 25 Oct 2008 15:11:18 -0400 (EDT) From: Stefan Monnier To: Markus Triska Cc: 1251@debbugs.gnu.org, emacs-pretest-bug@gnu.org Subject: Re: bug#1251: 23.0.60; `process-status' does not work with buffer names Message-ID: References: <20081025171416.86510B45CE5@mt-computer.local> Date: Sat, 25 Oct 2008 15:11:18 -0400 In-Reply-To: <20081025171416.86510B45CE5@mt-computer.local> (Markus Triska's message of "Sat, 25 Oct 2008 19:14:16 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > Contrary to what its info entry says, process-status does not work if > its argument is a buffer name; in emacs -Q, evaluating the form: I think we should fix the info entry, rather than the code. Stefan From cyd@stupidchicken.com Tue Oct 28 13:17:40 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1251-done) by emacsbugs.donarmstrong.com; 28 Oct 2008 20:17:40 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9SKHbA0013730 for <1251-done@emacsbugs.donarmstrong.com>; Tue, 28 Oct 2008 13:17:38 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 29D6D57E0B2; Tue, 28 Oct 2008 16:17:43 -0400 (EDT) From: Chong Yidong To: Markus Triska Cc: Stefan Monnier , 1251-done@debbugs.gnu.org Subject: Re: 23.0.60; `process-status' does not work with buffer names Date: Tue, 28 Oct 2008 16:17:43 -0400 Message-ID: <877i7siie0.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > > Contrary to what its info entry says, process-status does not work if > > its argument is a buffer name; in emacs -Q, evaluating the form: > > I think we should fix the info entry, rather than the code. Yes, we can't accept buffer names in process-status because it already treats strings as process names. I've updated the lisp manual. Thanks for spotting this. From markus.triska@gmx.at Tue Oct 28 15:15:59 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1251-done) by emacsbugs.donarmstrong.com; 28 Oct 2008 22:15:59 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9SMFt0e010975 for <1251-done@emacsbugs.donarmstrong.com>; Tue, 28 Oct 2008 15:15:57 -0700 Received: (qmail invoked by alias); 28 Oct 2008 22:15:49 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp011) with SMTP; 28 Oct 2008 23:15:49 +0100 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1+wS+VQuL2wM5/Y1jShksu/qepXi2DcUJKfqYSweA ASz+cCV9Z3ymod Received: by mt-computer.local (Postfix, from userid 502) id A1A84B538DD; Tue, 28 Oct 2008 23:15:42 +0100 (CET) From: Markus Triska To: Chong Yidong Cc: Stefan Monnier , 1251-done@debbugs.gnu.org Subject: Re: 23.0.60; `process-status' does not work with buffer names References: <877i7siie0.fsf@cyd.mit.edu> Date: Tue, 28 Oct 2008 23:15:42 +0100 In-Reply-To: <877i7siie0.fsf@cyd.mit.edu> (Chong Yidong's message of "Tue, 28 Oct 2008 16:17:43 -0400") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 Chong Yidong writes: > Yes, we can't accept buffer names in process-status because it already > treats strings as process names. Only for completeness: There are several functions dealing with processes (e.g., `process-send-string') that allow strings to mean both process and buffer names. Unfortunately it's not very consistent, and sometimes incorrectly documented; for example, `comint-send-string': Like `process-send-string', ... but in `comint-send-string', you cannot use process names. From monnier@iro.umontreal.ca Wed Oct 29 07:45:22 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1251-done) by emacsbugs.donarmstrong.com; 29 Oct 2008 14:45:22 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9TEjFsL032013 for <1251-done@emacsbugs.donarmstrong.com>; Wed, 29 Oct 2008 07:45:17 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUEAFMTCElMCqyo/2dsb2JhbACBdstjg1GBDg X-IronPort-AV: E=Sophos;i="4.33,506,1220241600"; d="scan'208";a="29012469" Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 29 Oct 2008 10:45:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 788BF8E6F; Wed, 29 Oct 2008 10:45:03 -0400 (EDT) From: Stefan Monnier To: Markus Triska Cc: Chong Yidong , 1251-done@debbugs.gnu.org Subject: Re: 23.0.60; `process-status' does not work with buffer names Message-ID: References: <877i7siie0.fsf@cyd.mit.edu> Date: Wed, 29 Oct 2008 10:45:03 -0400 In-Reply-To: (Markus Triska's message of "Tue, 28 Oct 2008 23:15:42 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Yes, we can't accept buffer names in process-status because it already >> treats strings as process names. > Only for completeness: There are several functions dealing with > processes (e.g., `process-send-string') that allow strings to mean both > process and buffer names. Unfortunately it's not very consistent, and > sometimes incorrectly documented; for example, `comint-send-string': > Like `process-send-string', ... > but in `comint-send-string', you cannot use process names. We should discourage this use. I.e. we should start by removing mention of it in the docstrings (and/or manual). Stefan From unknown Fri Jun 20 18:01:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Nov 2008 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator