GNU bug report logs - #15694
battery.el for Mac OS X Mavericks

Previous Next

Package: emacs;

Reported by: Masashi Fujimoto <masfj.dev <at> gmail.com>

Date: Wed, 23 Oct 2013 19:01:02 UTC

Severity: normal

Tags: patch

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15694 in the body.
You can then email your comments to 15694 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15694; Package emacs. (Wed, 23 Oct 2013 19:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Masashi Fujimoto <masfj.dev <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 23 Oct 2013 19:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Masashi Fujimoto <masfj.dev <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: battery.el for Mac OS X Mavericks
Date: Thu, 24 Oct 2013 03:53:51 +0900
[Message part 1 (text/plain, inline)]
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\\}\\)%")
[Message part 2 (text/html, inline)]

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 23 Oct 2013 19:46:02 GMT) Full text and rfc822 format available.

Notification sent to Masashi Fujimoto <masfj.dev <at> gmail.com>:
bug acknowledged by developer. (Wed, 23 Oct 2013 19:46:02 GMT) Full text and rfc822 format available.

Message #10 received at 15694-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 15694-done <at> debbugs.gnu.org
Subject: Re: bug#15694: battery.el for Mac OS X Mavericks
Date: Wed, 23 Oct 2013 15:45:14 -0400
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\\}\\)%")





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 21 Nov 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.