From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Darwin support for lisp/battery.el. Date: Mon, 04 Jul 2005 12:43:31 +0200 Message-ID: <874qbax358.fsf@xs4all.nl> References: <8764vtxusp.fsf@xs4all.nl> <85mzp3a8am.fsf@lola.goethe.zz> <87d5pz8qoq.fsf@xs4all.nl> <851x6fa4pa.fsf@lola.goethe.zz> <87y88nvx36.fsf@xs4all.nl> <87wto7rn4z.fsf@seamus.arnested.dk> <87d5pyx5vc.fsf@xs4all.nl> <87pstysxke.fsf@seamus.arnested.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1120474969 8976 80.91.229.2 (4 Jul 2005 11:02:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2005 11:02:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 04 13:02:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpOiP-0001FH-6N for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2005 13:02:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpOjb-00062x-Op for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2005 07:03:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpOik-0005oa-SE for emacs-devel@gnu.org; Mon, 04 Jul 2005 07:02:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpOhG-0005Nb-II for emacs-devel@gnu.org; Mon, 04 Jul 2005 07:01:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpOhF-0004jj-Qi for emacs-devel@gnu.org; Mon, 04 Jul 2005 07:01:05 -0400 Original-Received: from [194.109.24.25] (helo=smtp-vbr5.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpOW6-0000Fb-Ro for emacs-devel@gnu.org; Mon, 04 Jul 2005 06:49:35 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr5.xs4all.nl (8.13.3/8.13.3) with ESMTP id j64AhW70061018; Mon, 4 Jul 2005 12:43:32 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DpOQG-0002Fg-00; Mon, 04 Jul 2005 12:43:32 +0200 Original-To: Arne =?iso-8859-1?Q?J=F8rgensen?= In-Reply-To: <87pstysxke.fsf@seamus.arnested.dk> (Arne =?iso-8859-1?Q?J=F8?= =?iso-8859-1?Q?rgensen's?= message of "Mon, 04 Jul 2005 11:57:37 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 27 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40328 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40328 Arne J=F8rgensen writes: > Lute Kamstra skriver: > >> Apparently that option was added in OS X 10.4. Strange that pmset >> doesn't signal an error with its exit code when it gets passed an >> unknown option. Maybe I can test for a working version of pmset in >> some other way. Could you eval this: >> >> (with-temp-file "~/pmset.txt" >> (ignore-errors (call-process "pmset" nil t nil "-g" "ps"))) > > It evaluates to 0. > >> and send me the "~/pmset.txt" file it creates as an attachment? > > And the created file is empty (no need to attach it). Thanks. Then this test should work: (and (eq system-type 'darwin) (ignore-errors=20 (with-temp-buffer=20 (and (eq (call-process "pmset" nil t nil "-g" "ps") 0) (> (buffer-size) 0))))) Lute.