emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Darwin support for lisp/battery.el.


From: Lute Kamstra
Subject: Re: Darwin support for lisp/battery.el.
Date: Mon, 04 Jul 2005 12:43:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Arne Jørgensen <address@hidden> writes:

> Lute Kamstra <address@hidden> 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 
       (with-temp-buffer 
         (and (eq (call-process "pmset" nil t nil "-g" "ps") 0)
              (> (buffer-size) 0)))))

Lute.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]