all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs Battery mode cannot use iBook
@ 2005-06-26  2:35 Sam Lauber
  2005-06-27  8:47 ` Lute Kamstra
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Lauber @ 2005-06-26  2:35 UTC (permalink / raw)


I have a iBook G4 w/ Mac OS X.  I installed the Carbon Emacs from June '05.  
But the Battery mode does not know about the Mac OS X programs for
battery status, so it dosen't know the battery status for the laptop when
the system provides this information already.  

Samuel Lauber

P.S.  The battery information can be found by calling the program `pmset
-g ps'; it outputs information in the following format:

  Currenty drawing from 'POWER_SRC Power'
   -InternalBattery-0     XX%; STATUS; ESTIMATE

where `POWER_SRC' is either AC or Battery.  XX is the percentage of charge.  
(N.B.  It is never 100%; the highest value that my iBook will give is 99%).  
STATUS is either `AC attached' (power adapter plugged in and battery fully
charged), `discharging' (running off battery power and taking power out of
the battery), or `charging' (charging up).  If the battery is out, the entire
`XX%; STATUS...' line is replated with `(removed)'.  Note that the first
line has a typo.  It might get fixed, so don't rely on it.  


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Battery mode cannot use iBook
  2005-06-26  2:35 Sam Lauber
@ 2005-06-27  8:47 ` Lute Kamstra
  2005-06-27  9:24   ` Arne Jørgensen
  0 siblings, 1 reply; 6+ messages in thread
From: Lute Kamstra @ 2005-06-27  8:47 UTC (permalink / raw)
  Cc: bug-emacs

"Sam Lauber" <sam124@operamail.com> writes:

> I have a iBook G4 w/ Mac OS X.  I installed the Carbon Emacs from June '05.  
> But the Battery mode does not know about the Mac OS X programs for
> battery status, so it dosen't know the battery status for the laptop when
> the system provides this information already.  
>
> Samuel Lauber
>
> P.S.  The battery information can be found by calling the program `pmset
> -g ps'; it outputs information in the following format:
>
>   Currenty drawing from 'POWER_SRC Power'
>    -InternalBattery-0     XX%; STATUS; ESTIMATE
>
> where `POWER_SRC' is either AC or Battery.  XX is the percentage of charge.  
> (N.B.  It is never 100%; the highest value that my iBook will give is 99%).  
> STATUS is either `AC attached' (power adapter plugged in and battery fully
> charged), `discharging' (running off battery power and taking power out of
> the battery), or `charging' (charging up).  If the battery is out, the entire
> `XX%; STATUS...' line is replated with `(removed)'.  Note that the first
> line has a typo.  It might get fixed, so don't rely on it.  

battery.el currently only knows how to get battery information from a
Linux kernel.  I'll see if I can add support for iBooks running OS X.
Is calling "pmset -g ps" the canonical way to get battery information
on OS X?  (Is that program typically installed?)

Lute.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Battery mode cannot use iBook
  2005-06-27  8:47 ` Lute Kamstra
@ 2005-06-27  9:24   ` Arne Jørgensen
  0 siblings, 0 replies; 6+ messages in thread
From: Arne Jørgensen @ 2005-06-27  9:24 UTC (permalink / raw)


Lute Kamstra <Lute.Kamstra.news@xs4all.nl> writes:

> battery.el currently only knows how to get battery information from a
> Linux kernel.  I'll see if I can add support for iBooks running OS X.
> Is calling "pmset -g ps" the canonical way to get battery information
> on OS X?  (Is that program typically installed?)

pmset is at installed on my Mac OS X 10.3 (Panther), but it doesn't
know the `ps' option. Is that part of pmset specific to 10.4 (Tiger)?

Kind regards,
-- 
Arne Jørgensen <http://arnested.dk/>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Battery mode cannot use iBook
@ 2005-06-27 20:04 Sam Lauber
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Lauber @ 2005-06-27 20:04 UTC (permalink / raw)


> > I have a iBook G4 w/ Mac OS X.  I installed the Carbon Emacs from 
> > June '05.  But the Battery mode does not know about the Mac OS X 
> > programs for
> > battery status, so it dosen't know the battery status for the laptop when
> > the system provides this information already.  Samuel Lauber
> >
> > P.S.  The battery information can be found by calling the program 
`pmset
> > -g ps'; it outputs information in the following format:
> >
> >   Currenty drawing from 'POWER_SRC Power'
> >    -InternalBattery-0     XX%; STATUS; ESTIMATE
> >
> > where `POWER_SRC' is either AC or Battery.  XX is the percentage 
> > of charge.  (N.B.  It is never 100%; the highest value that my 
> > iBook will give is 99%).  STATUS is either `AC attached' (power 
> > adapter plugged in and battery fully
> > charged), `discharging' (running off battery power and taking power out 
of
> > the battery), or `charging' (charging up).  If the battery is out, the entire
> > `XX%; STATUS...' line is replated with `(removed)'.  Note that the first
> > line has a typo.  It might get fixed, so don't rely on it.
>
> battery.el currently only knows how to get battery information from a
> Linux kernel.  I'll see if I can add support for iBooks running OS X.
> Is calling "pmset -g ps" the canonical way to get battery information
> on OS X?  (Is that program typically installed?)
Yes.  It is installed with the base install of Mac OS X.   

Samuel

P.S.  I'd say it would be canonial, but agian, most userspace programs don't
need to know this kind of thing.  

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Battery mode cannot use iBook
@ 2005-06-28  0:53 Sam Lauber
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Lauber @ 2005-06-28  0:53 UTC (permalink / raw)


>>> Is calling "pmset -g ps" the canonical way to get battery
>>> information on OS X?  (Is that program typically installed?)
>> Yes.  It is installed with the base install of Mac OS X.
> Ok.  I don't have access to pmset or OS X.  Could you send me the
> (exact) output of "pmset -g ps" for as many situations as you can
> think of?  That will help me to let battery.el parse the output of
> that command correctly.  I'll then send you a new version of
> battery.el so you can test it on your machine.
Plugged into adapter and fully charged:

Currenty drawing from 'AC Power'
 -InternalBattery-0     99%; AC attached; not charging

Running off battery power:

Currenty drawing from 'Battery Power'
 -InternalBattery-0     99%; discharging; 4:35 remaining

Running off battery power, but still estimating how much time left:

Currenty drawing from 'Battery Power'
 -InternalBattery-0     99%; discharging; (no estimate)

Battery not connected:

Currenty drawing from 'AC Power'
 -InternalBattery-0     (removed)

Charging up:

Currenty drawing from 'AC Power'
 -InternalBattery-0     50%; charging; (no estimate)

Charging up, but knowing how much time we have left:

Currenty drawing from 'AC Power'
 -InternalBattery-0     50%; charging; 3:07

Samuel Lauber

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Battery mode cannot use iBook
@ 2005-06-28 21:14 Sam Lauber
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Lauber @ 2005-06-28 21:14 UTC (permalink / raw)


> > Plugged into adapter and fully charged:
> >
> > Currenty drawing from 'AC Power'
> >  -InternalBattery-0     99%; AC attached; not charging
> >
> > Running off battery power:
> >
> > Currenty drawing from 'Battery Power'
> >  -InternalBattery-0     99%; discharging; 4:35 remaining
> >
> > Running off battery power, but still estimating how much time left:
> >
> > Currenty drawing from 'Battery Power'
> >  -InternalBattery-0     99%; discharging; (no estimate)
> >
> > Battery not connected:
> >
> > Currenty drawing from 'AC Power'
> >  -InternalBattery-0     (removed)
> >
> > Charging up:
> >
> > Currenty drawing from 'AC Power'
> >  -InternalBattery-0     50%; charging; (no estimate)
> >
> > Charging up, but knowing how much time we have left:
> >
> > Currenty drawing from 'AC Power'
> >  -InternalBattery-0     50%; charging; 3:07
> Thanks.  Could you test the attached version of lisp/battery.el?  It
> is supposed to work with CVS Emacs, but I guess it will work with
> Emacs 21.x as well.
It says ``Battery status not avaliable'' in the minibuffer.  

Samuel Lauber

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-28 21:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-28  0:53 Emacs Battery mode cannot use iBook Sam Lauber
  -- strict thread matches above, loose matches on Subject: below --
2005-06-28 21:14 Sam Lauber
2005-06-27 20:04 Sam Lauber
2005-06-26  2:35 Sam Lauber
2005-06-27  8:47 ` Lute Kamstra
2005-06-27  9:24   ` Arne Jørgensen

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.