I noticed on my FreeBSD -CURRENT
laptop that display-battery-mode
and fancy-battery-mode
on Emacs were not working correctly.
I dug into the Lisp and determined that according to the man pages, the code was making some incorrect presumptions about FreeBSD’s apm
command, assuming that it was much more like OpenBSD’s or NetBSD’s than it in fact was. Particularly, passing the non-existent -m
flag was causing the apm
call to fail altogether.
I submitted a patch to the emacs-devel@gnu.org mailing list that was gracefully critiqued and then committed by Stefan Monnier. If you’re using Emacs on a FreeBSD laptop, the latest master
branch of Emacs should now have this battery functionality fixed.