* bug#15694: battery.el for Mac OS X Mavericks
@ 2013-10-23 18:53 Masashi Fujimoto
2013-10-23 19:45 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Masashi Fujimoto @ 2013-10-23 18:53 UTC (permalink / raw)
To: 15694
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
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\\}\\)%")
[-- Attachment #2: Type: text/html, Size: 1130 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#15694: battery.el for Mac OS X Mavericks
2013-10-23 18:53 bug#15694: battery.el for Mac OS X Mavericks Masashi Fujimoto
@ 2013-10-23 19:45 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-10-23 19:45 UTC (permalink / raw)
To: 15694-done
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\\}\\)%")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-23 19:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 18:53 bug#15694: battery.el for Mac OS X Mavericks Masashi Fujimoto
2013-10-23 19:45 ` Glenn Morris
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.