GNU bug report logs -
#16023
24.3; [PATCH] process-live-p tweak
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Mon, 2 Dec 2013 01:34:01 UTC
Severity: wishlist
Tags: patch
Found in version 24.3
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16023 in the body.
You can then email your comments to 16023 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#16023; Package
emacs.
(Mon, 02 Dec 2013 01:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to
larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org.
(Mon, 02 Dec 2013 01:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It seems inconvenient for a predicate to throw type error. I have used
process-live-p a few times and was always surprised. It seems better to
simply return nil for non-process arg. buffer-live-p does something
similar.
In octave.el, I have to use another one-liner
(defun inferior-octave-process-live-p ()
(and inferior-octave-process (process-live-p inferior-octave-process)))
to mitigate this problem which would be redundant if process-live-p
doesn't throw error for non-process arg. So I wonder if you object to
the following tweak:
=== modified file 'lisp/subr.el'
--- lisp/subr.el 2013-11-24 08:49:44 +0000
+++ lisp/subr.el 2013-12-02 01:30:08 +0000
@@ -1885,9 +1885,11 @@
(defun process-live-p (process)
"Returns non-nil if PROCESS is alive.
A process is considered alive if its status is `run', `open',
-`listen', `connect' or `stop'."
- (memq (process-status process)
- '(run open listen connect stop)))
+`listen', `connect' or `stop'. Value is nil if PROCESS is not a
+process."
+ (and (processp process)
+ (memq (process-status process)
+ '(run open listen connect stop))))
;; compatibility
Thanks,
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#16023; Package
emacs.
(Mon, 02 Dec 2013 06:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 16023 <at> debbugs.gnu.org (full text, mbox):
Leo Liu <sdl.web <at> gmail.com> writes:
> It seems inconvenient for a predicate to throw type error. I have used
> process-live-p a few times and was always surprised. It seems better to
> simply return nil for non-process arg. buffer-live-p does something
> similar.
Seems like a good idea to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Reply sent
to
Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility.
(Mon, 02 Dec 2013 07:48:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer.
(Mon, 02 Dec 2013 07:48:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 16023-done <at> debbugs.gnu.org (full text, mbox):
Fixed in 24.4
On 2013-12-02 14:50 +0800, Lars Magne Ingebrigtsen wrote:
[snipped 7 lines]
> Seems like a good idea to me.
done.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#16023; Package
emacs.
(Mon, 02 Dec 2013 14:34:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 16023 <at> debbugs.gnu.org (full text, mbox):
> It seems inconvenient for a predicate to throw type error.
Generally agreed, and in this particular case as well, please go ahead,
thank you,
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Tue, 31 Dec 2013 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.