From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ralph Schleicher Newsgroups: gmane.emacs.bugs Subject: battery.el patch Date: 09 Aug 2004 22:25:02 +0200 Organization: Development Proletcult Cadre #23 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <874qnc83fl.fsf@bravo.nunatak.allgaeu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092083200 14575 80.91.224.253 (9 Aug 2004 20:26:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Aug 2004 20:26:40 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 09 22:26:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BuGix-0002Mh-00 for ; Mon, 09 Aug 2004 22:26:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BuGmi-0001zh-7s for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Aug 2004 16:30:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BuGmd-0001xR-Mu for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2004 16:30:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BuGmX-0001tO-Hx for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2004 16:30:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BuGmX-0001t7-F2 for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2004 16:30:09 -0400 Original-Received: from [213.182.8.6] (helo=mail.allgaeu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BuGic-0000Ci-5b for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2004 16:26:06 -0400 Original-Received: from kim.allgaeu.org (localhost [127.0.0.1]) by mail.allgaeu.org with ESMTP id i79KPrKO025833 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 9 Aug 2004 22:25:53 +0200 Original-X-Complaints-To: abuse@allgaeu.org Original-Received: (from uucp@localhost) by kim.allgaeu.org with UUCP id i79KPrf8025832 for bug-gnu-emacs@gnu.org; Mon, 9 Aug 2004 22:25:53 +0200 Original-To: bug-gnu-emacs@gnu.org Original-Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-RCPT-Domain: gnu.org X-Virus-Check: Yes X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8668 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8668 Hi, below is a patch Kurt Hornik sent to me last week fixing a problem with the latest Linux kernel. The patch is against battery.el version 1.19 from Emacs CVS. Thanks. 2004-08-09 Kurt Hornik * battery.el (battery-linux-proc-acpi): Look into battery directories matching the literal string CMB, too (required for Linux 2.6.7). --- battery.el~ 2004-08-09 21:40:34.000000000 +0200 +++ battery.el 2004-08-09 21:49:21.000000000 +0200 @@ -290,7 +290,7 @@ nil t) (setq low (+ (or low 0) (string-to-int (match-string 1)))))))) - (directory-files "/proc/acpi/battery/" t "BAT"))) + (directory-files "/proc/acpi/battery/" t "\\(BAT\\|CMB\\)"))) (and capacity rate (setq minutes (if (zerop rate) 0 (floor (* (/ (float (if (string= charging-state -- Ralph