Subject: bug#15694: closed (Re: bug#15694: battery.el for Mac OS X Mavericks)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 23 Oct 2013 19:46:02 +0000

Your bug report

#15694: battery.el for Mac OS X Mavericks

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15694: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15694
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#15694: battery.el for Mac OS X Mavericks
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Wed, 23 Oct 2013 15:45:14 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.4

Applied with a tweak (shy group).

*** lisp/battery.el	2013-03-05 17:13:01 +0000
--- lisp/battery.el	2013-10-23 19:41:17 +0000
***************
*** 615,621 ****
      (with-temp-buffer
        (ignore-errors (call-process "pmset" nil t nil "-g" "ps"))
        (goto-char (point-min))
!       (when (re-search-forward "Currentl?y drawing from '\\(AC\\|Battery\\) Power'" nil t)
  	(setq power-source (match-string 1))
  	(when (re-search-forward "^ -InternalBattery-0[ \t]+" nil t)
  	  (when (looking-at "\\([0-9]\\{1,3\\}\\)%")
--- 615,621 ----
      (with-temp-buffer
        (ignore-errors (call-process "pmset" nil t nil "-g" "ps"))
        (goto-char (point-min))
!       (when (re-search-forward "\\(?:Currentl?y\\|Now\\) drawing from '\\(AC\\|Battery\\) Power'" nil t)
  	(setq power-source (match-string 1))
  	(when (re-search-forward "^ -InternalBattery-0[ \t]+" nil t)
  	  (when (looking-at "\\([0-9]\\{1,3\\}\\)%")

Subject: battery.el for Mac OS X Mavericks
From: Masashi Fujimoto <[email-masked]>
To: [email-masked]
Date: Thu, 24 Oct 2013 03:53:51 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Because the return value of `pmset' on Mac OS X Mavericks changed, If you
evaluate (display-battery-mode 1), the following error occurs.

`wrong-type-argument number-or-marker-p N/A'.

I made a patch for this issue.

Thanks for reading.

--
Masashi Fujimoto

--- battery.el 2013-01-02 05:37:17.000000000 +0900
+++ mavericks-battery.el    2013-10-23 12:11:13.000000000 +0900
@@ -543,7 +543,7 @@ The following %-sequences are provided:
     (with-temp-buffer
       (ignore-errors (call-process "pmset" nil t nil "-g" "ps"))
       (goto-char (point-min))
-      (when (re-search-forward "Currentl?y drawing from
'\\(AC\\|Battery\\) Power'" nil t)
+      (when (re-search-forward "\\(Currentl?y\\|Now\\) drawing from
'\\(AC\\|Battery\\) Power'" nil t)
    (setq power-source (match-string 1))
    (when (re-search-forward "^ -InternalBattery-0[ \t]+" nil t)
      (when (looking-at "\\([0-9]\\{1,3\\}\\)%")