GNU bug report logs -
#1251
23.0.60; `process-status' does not work with buffer names
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1251 in the body.
You can then email your comments to 1251 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1251
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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 <markus.triska <at> gmx.at>
* 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
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1251
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1251
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Reply sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Markus Triska <markus.triska <at> gmx.at>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #20 received at 1251-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> > 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.
Message #21 received at 1251-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Chong Yidong <cyd <at> stupidchicken.com> 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.
Message #22 received at 1251-done <at> emacsbugs.donarmstrong.com (full text, mbox):
>> 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
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 26 Nov 2008 15:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.