Chong Yidong <cyd@stupidchicken.com> writes:
Emre Sahin <mail@emresahin.net> 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) @ i.emre.sahin@gmail.com