emacs-devel
[Top][All Lists]
Advanced

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

Re: Battery update


From: Emre Sahin
Subject: Re: Battery update
Date: Fri, 08 Aug 2008 16:26:49 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Emre Sahin <address@hidden> writes:
>
>> Maybe I did something wrong with diff & patch; this is my first
>> adventure with them in practice. (Yes, really!)
>>
>> Message is something like: 
>>
>> Loading /home/iesahin/site-lisp/battery.el (source)...done
>> setq: Wrong type argument: listp, "/sys/class/power_supply/AC/online"
>
> No, it was a typo in the patch.  Could you replace the line
>
>        (if (battery-search-for-one-match-in-files
>           "/sys/class/power_supply/AC/online" "1" 0)
>          "AC"
>
> on line 471 of the battery.el, with
>
>        (if (battery-search-for-one-match-in-files
>           (list "/sys/class/power_supply/AC/online") "1" 0)
>          "AC"
>
> and try again?

This looks OK. It fills %p in battery-mode-line-format and gives
an equal value with "acpi -b". 

Thank you. I may try to retrieve other (available) information from sysfs
interface by looking your code. I don't know if Sven has anything to
add about interface though. 

I think the interface change is thought for multi-battery systems. If battery.el
should support them, battery.el interface should also change I think,
which is, IMHO, not necessary at the moment. 

Regards,

Emre

-- 
I. Emre Sahin                   @ Ankara, Turkey 
Software Developer & Consultant @ http://ydyazilim.com
Ph.D. Candidate                 @ http://cs.bilkent.edu.tr
Blogger, Writer, Poet           @ http://emresahin.net
Maybe hears the phone           @ +90 532 261 8985
Maybe gtalk (or jabber)         @ address@hidden




reply via email to

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