From: Ignacio Torres <i@itorres.net>
To: 24919@debbugs.gnu.org
Subject: bug#24919: 24.5; battery.el not working in FreeBSD
Date: Sun, 18 Sep 2016 01:17:26 +0200 [thread overview]
Message-ID: <86lgyq2k1l.fsf@gaia.hq.xin.cat> (raw)
Running M-x battery in FreeBSD returns:
Power disconnected, battery high (illegal% load, remaining time 0:00)
The battery-bsd-apm function was contributed in [1]. It contains:
(apm-cmd (concat "/usr/sbin/apm -ablm" apm-flag))
The -m flag used in NetBSD[2] and OpenBSD[3] to show the remaining time
in minutes does not exist in FreeBSD[4]. Instead -t should be used to
show the remaining time in seconds.
Also the resulting output is in a different order than that expected by
the parser. battery-bsd-apm expects the order to be:
battery-status
battery-percentage
battery-life
line-status
apm-mode
In FreeBSD it is:
line-status
battery-status
battery-percentage
apm-mode
battery-life
As can be seen in the source of /usr/sbin/apm.c[5]
[1] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/battery.el?id=19b748ad448c37d08ae1df1212aec22ee1d55956
[2] http://netbsd.gw.com/cgi-bin/man-cgi?apm++NetBSD-current
[3] http://man.openbsd.org/OpenBSD-current/man8/amd64/apm.8
[4] https://www.freebsd.org/cgi/man.cgi?query=apm&manpath=FreeBSD+10.3-RELEASE+and+Ports
[5] https://svnweb.freebsd.org/base/stable/11/usr.sbin/apm/apm.c?revision=302408&view=markup#l472
In GNU Emacs 24.5.1 (amd64-portbld-freebsd12.0, GTK+ Version 2.24.29)
of 2016-08-27 on builds.trueos.org
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
Configured using:
`configure --localstatedir=/var --disable-acl --with-dbus
--without-file-notification --with-gconf --with-gif --with-gnutls
--with-gsettings --with-jpeg --with-m17n-flt --with-imagemagick
--with-libotf --with-png --with-toolkit-scroll-bars --with-rsvg
--with-tiff --with-x --with-xft --with-xim --with-xml2 --with-xpm
--with-x-toolkit=gtk2 --with-sound=oss --x-libraries=/usr/local/lib
--x-includes=/usr/local/include --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/share/emacs/info/
--build=amd64-portbld-freebsd12.0 'CFLAGS=-O2 -pipe -isystem
/usr/local/include -fstack-protector -fno-strict-aliasing'
'CPPFLAGS=-isystem /usr/local/include' 'LDFLAGS= -L/usr/local/lib
-Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector''
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
next reply other threads:[~2016-09-17 23:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-17 23:17 Ignacio Torres [this message]
2016-11-11 17:58 ` bug#24919: 24.5; battery.el not working in FreeBSD Joakim Jalap
2017-03-08 13:58 ` Alan Third
2019-10-14 20:16 ` Joseph Mingrone
2019-10-15 6:45 ` Stefan Kangas
2019-11-11 3:26 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86lgyq2k1l.fsf@gaia.hq.xin.cat \
--to=i@itorres.net \
--cc=24919@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.