Re: [O] org google weather

2011-03-06 Thread Konrad Hinsen
On 6 Mar 2011, at 11:33, Konrad Hinsen wrote: Fortunately, because apparently org-agenda-skip-function is not called for diary-style entries. But I'll continue exploring that approach for other types of entries. That was relatively easy as well: (defun org-agenda-day-view-only-filter ()

Re: [O] org google weather

2011-03-06 Thread Konrad Hinsen
On 6 Mar 2011, at 00:51, Nick Dokos wrote: Konrad Hinsen wrote: What keeps me from writing that function right now is that I don't know the internals of org-mode well enough to know how to check for a propery or tag. I expect to spend an hour reading source code, and that's for another day :-

Re: [O] org google weather

2011-03-05 Thread Nick Dokos
Konrad Hinsen wrote: > What keeps me from writing that function right now is that I don't > know the internals of org-mode well enough to know how to check for a > propery or tag. I expect to spend an hour reading source code, and > that's for another day :-) > Before diving into the code, che

Re: [O] org google weather

2011-03-05 Thread brian powell
The sunrise and sunset strings have been available in the diary functions for EMACS for a long time; and, the new code above you've made for inserting them into the weather strings in OrgMode agendas is great too.  Thanks and I look forward to using it. Now, is there any simple way, maybe with the

Re: [O] org google weather

2011-03-05 Thread Konrad Hinsen
Hi Bastien, On 5 Mar 2011, at 18:07, Bastien wrote: Sorry, not sure I was clear enough: my point was that you can *already* select tasks you want to appear on the dayly agenda view and not on the weekly agenda view. It's just a matter of writing an org-agenda-skip-function that react diffe

Re: [O] org google weather

2011-03-05 Thread Nick Dokos
Matthew Sauer wrote: > Thanks that worked, as I said Noob, somethings get the quote and some don't.  > Now if I can just get > org-contacts to load correctly, void variable value, life will be great.  I > think I am starting to > get the hang of this language. > Matthew > The main thing to re

Re: [O] org google weather

2011-03-05 Thread Matthew Sauer
Thanks that worked, as I said Noob, somethings get the quote and some don't. Now if I can just get org-contacts to load correctly, void variable value, life will be great. I think I am starting to get the hang of this language. Matthew On Sat, Mar 5, 2011 at 9:23 AM, Nick Dokos wrote: > Matthe

Re: [O] org google weather

2011-03-05 Thread Bastien
Hi Konrad, Konrad Hinsen writes: >> A clever combination of org-agenda-span and org-agenda-skip-function >> (checking against this span) in a custom agenda command should do. > > That sounds like a good plan. A property could be used to limit visibility > to day or week views, and the skip-funct

Re: [O] org google weather

2011-03-05 Thread Nick Dokos
Matthew Sauer wrote: > '(require 'google-weather) > '(require 'org-google-weather) That should be (require 'google-weather) (require 'org-google-weather) without a quote. Nick

Re: [O] org google weather

2011-03-05 Thread Michael Markert
On 5 Mar 2011, Matthew Sauer wrote: > I should just need to use the code in my dot emacs > '(require 'google-weather) > '(require 'org-google-weather) > for it to work but that doesn't seem to do the trick, maybe i need to > look in the code in those .el files. You should omit the leading '. With

Re: [O] org google weather

2011-03-05 Thread Matthew Sauer
Konrad, Being an elisp noob I had forgotten about the provide code in the .el file. That fixed that problem, THANK YOU so much. Now if I can figure out why I have to M-x load-library RET google-weather RET M-x load-library RET org-google-weather RET to get google weather to work with my agenda (

Re: [O] org google weather

2011-03-05 Thread Konrad Hinsen
On 5 Mar 2011, at 11:19, Bastien wrote: Is there a way to get this inserted only into the day view, but not into the week view? In fact, I would like to have that choice for agenda items in general. It makes sense (to me at least) to have more information in the day view than in the week view

Re: [O] org google weather

2011-03-05 Thread Konrad Hinsen
On 5 Mar 2011, at 12:44, Matthew Sauer wrote: I put the diary-sunset and diary-sunrise functions in a file called sunrisesunset.el in my elisp directory, it is part of my load path and put '(require 'sunrisesunset) in my .emacs Did you put a (provide 'sunrisesunset) at the end

Re: [O] org google weather

2011-03-05 Thread Matthew Sauer
I put the diary-sunset and diary-sunrise functions in a file called sunrisesunset.el in my elisp directory, it is part of my load path and put '(require 'sunrisesunset) in my .emacs It only loads if I type M-x load-library RET sunrisesunset RET I am not sure why it isn't automatically loading l

Re: [O] org google weather

2011-03-05 Thread Bastien
Hi Nick, Nick Dokos writes: > Konrad Hinsen wrote: > >> Is there a way to get this inserted only into the day view, but not >> into the week view? In fact, I would like to have that choice for >> agenda items in general. It makes sense (to me at least) to have more >> information in the day vie

Re: [O] org google weather

2011-03-04 Thread Nick Dokos
Sébastien Vauban wrote: > Because of this: > > #+begin_src emacs-lisp > (setq org-agenda-default-appointment-duration 60) > #+end_src > > I get: > > , > | 2011-03-05 Sat > |0:01-1:01 now > | Weather: 7:18-8:18 Sunrise (+0100) > |

Re: [O] org google weather

2011-03-04 Thread Sébastien Vauban
Hi Nick, Nick Dokos wrote: > Ian Barton wrote: >> > Ian Barton wrote: >> >>> Has anybody tried adding the functionality of %%(diary-sunrise-sunset) >> >>> (sunrise, sunset time and daylight hours) to the google weather code? >> >> >> >> I just have something like: >> >> >> >> #+CATEGORY: Day/Year

Re: [O] org google weather

2011-03-04 Thread Simon Brown
At Fri, 04 Mar 2011 17:05:55 -0500, Nick Dokos wrote: > Simon Brown wrote: > > At Fri, 04 Mar 2011 08:40:23 +, > > Ian Barton wrote: > > > On 03/03/11 21:37, Simon Brown wrote: > > > > Has anybody tried adding the functionality of %%(diary-sunrise-sunset) > > > > (sunrise, sunset time and dayl

Re: [O] org google weather

2011-03-04 Thread Nick Dokos
Nick Dokos wrote: > > Just write your own function to take the individual results and concatenate= > them, e.g. > > (defun full-catastrophe () > (format "%s :: %s" (org-google-weather) (diary-sunrise-sunset))) > > and add > > %%(full-catastrophe) > > to some agenda file. > BTW, I notice

Re: [O] org google weather

2011-03-04 Thread Nick Dokos
Simon Brown wrote: > At Fri, 04 Mar 2011 08:40:23 +, > Ian Barton wrote: > > On 03/03/11 21:37, Simon Brown wrote: > > > Has anybody tried adding the functionality of %%(diary-sunrise-sunset) > > > (sunrise, sunset time and daylight hours) to the google weather code? > > I just have something

Re: [O] org google weather

2011-03-04 Thread Simon Brown
At Fri, 04 Mar 2011 08:40:23 +, Ian Barton wrote: > On 03/03/11 21:37, Simon Brown wrote: > > Has anybody tried adding the functionality of %%(diary-sunrise-sunset) > > (sunrise, sunset time and daylight hours) to the google weather code? > I just have something like: > > #+CATEGORY: Day/Year

Re: [O] org google weather

2011-03-04 Thread Nick Dokos
Konrad Hinsen wrote: > Is there a way to get this inserted only into the day view, but not > into the week view? In fact, I would like to have that choice for > agenda items in general. It makes sense (to me at least) to have more > information in the day view than in the week view. > Not that

Re: [O] org google weather

2011-03-04 Thread Konrad Hinsen
On 4 Mar 2011, at 17:38, Nick Dokos wrote: Quick hack just parsing the output of diary-sunrise-sunset. ... Nice! Is there a way to get this inserted only into the day view, but not into the week view? In fact, I would like to have that choice for agenda items in general. It makes sense (t

Re: [O] org google weather

2011-03-04 Thread Bastien
Hi Nick, Nick Dokos writes: > Quick hack just parsing the output of diary-sunrise-sunset. Nice one -- a good candidate for Worg/org-hacks.org ;) -- Bastien

Re: [O] org google weather

2011-03-04 Thread Nick Dokos
Ian Barton wrote: > > > Hi Ian, > > > > Ian Barton wrote: > >>> Has anybody tried adding the functionality of %%(diary-sunrise-sunset) > >>> (sunrise, sunset time and daylight hours) to the google weather code? > >> > >> I just have something like: > >> > >> #+CATEGORY: Day/Year > >> &%%(diary-d

Re: [O] org google weather

2011-03-04 Thread brian powell
FWIW/YMMV I use RUBY: I like the "twilight" info too--not sure emacs does twilight info too--maybe you can reuse some of the code and put into OrgMode: I do: emacs -l .bja-sunrise-sunset-twilight.el --where .bja-sunrise-sunset-twilight.el is: (defun bja-sunrise () "Display sunrise, sunset & tw

Re: [O] org google weather

2011-03-04 Thread Ian Barton
Hi Ian, Ian Barton wrote: Has anybody tried adding the functionality of %%(diary-sunrise-sunset) (sunrise, sunset time and daylight hours) to the google weather code? I just have something like: #+CATEGORY: Day/Year &%%(diary-day-of-year) #+CATEGORY: Sunrise &%%(diary-sunrise-sunset) in on

Re: [O] org google weather

2011-03-04 Thread Sébastien Vauban
Hi Ian, Ian Barton wrote: >> Has anybody tried adding the functionality of %%(diary-sunrise-sunset) >> (sunrise, sunset time and daylight hours) to the google weather code? > > I just have something like: > > #+CATEGORY: Day/Year > &%%(diary-day-of-year) > #+CATEGORY: Sunrise > &%%(diary-sunrise-s

Re: [O] org google weather

2011-03-04 Thread Ian Barton
On 03/03/11 21:37, Simon Brown wrote: Evening all, Has anybody tried adding the functionality of %%(diary-sunrise-sunset) (sunrise, sunset time and daylight hours) to the google weather code? Simon I just have something like: #+CATEGORY: Day/Year &%%(diary-day-of-year) #+CATEGORY: Sunrise &%