Re: [O] Multiple capture templates in file

2015-10-06 Thread tenspd137 .
So - I figured it out.  I wanted to create a list that ultimatley had the form:

'(template template sub-menu-label sub-menu-template)

In the scratch buffer, I found I was creating

((("p" "product") ("pt" "Product - Todo" entry (file+headline ...
"Tasks") "* TODO %?")) ("t" "Todo" entry (file+headline (concat
org-directory "/default.org") "Tasks") "* TODO %?") ("j" "Journal"
entry (file+datetree (concat org-directory "/journal.org")) "* %?
Entered on %U
"))

and the same with

(add-to-list 'org-capture-templates '(("p" "product") ("pt" "Product -
Todo" entry (file+headline
(concat org-directory "/product.org") "Tasks") "* TODO %?"))

what I really wanted to do was add each element seperatley:

(add-to-list 'org-capture-templates '("p" "Product") 1)
(add-to-list 'org-capture-templates '("pt" "Product Todo" entry
(file+headline (concat org-directory "/product.org") "Tasks")
 "* TODO %?") 1 )
with the ones to append to the end of the list instead of beginning.

and then I thought there must be a better way - and there was - I came up with:

(setq org-capture-templates (append org-capture-templates '(("p"
"product") ("pt" "Product - Todo" entry (file+headline

(concat org-directory "/product.org") "Tasks") "* TODO %?")) ))


and stuck it in a test.el file.  I loaded it at the end of my org-mode
configuration in .emacs and I go the submenus I wanted.  I think I
figured it out and have the recipie for what I want to do.

This is probably basic stuff for everyone here, but I hope putting it
in email may make it searchable for someone later.  Thanks for all the
help, suggestions and ideas!

-C


On Tue, Oct 6, 2015 at 6:45 PM, tenspd137 .  wrote:
> One thought  I need to try either pushing one item at a time or
> concatenation the list of options.   I'll try it when I get a chance.
> Playtime is over for now. Thanks for all help and suggestions so far.
>
> C
>
> On Oct 6, 2015 5:43 PM, "tenspd137 ."  wrote:
>>
>> I can do the following in .emacs
>>
>> (setq org-capture-templates
>>   '(("t" "Todo" entry (file+headline (concat org-directory
>> "/default.org") "Tasks")
>>  "* TODO %?")
>> ("j" "Journal" entry (file+datetree (concat org-directory
>> "/journal.org"))
>>  "* %?\nEntered on %U\n")
>> ;;product or work specific stuff - I would like to move these
>> to files and have
>> ;;them loaded - maybe in the future
>> ("p" "product")
>> ("pt" "Product Todo" entry (file+headline (concat org-directory
>> "/product.org") "Tasks") "* TODO %?")))
>>
>> and it works as expected
>>
>> but if I do this in .emacs:
>> (setq org-capture-templates
>>   '(("t" "Todo" entry (file+headline (concat org-directory
>> "/default.org") "Tasks")
>>  "* TODO %?")
>> ("j" "Journal" entry (file+datetree (concat org-directory
>> "/journal.org"))
>>  "* %?\nEntered on %U\n")))
>> ;;product or work specific stuff - I would like to move these
>> to files and have
>> ;;them loaded - maybe in the future
>>
>> (load-file (concat org-directory
>> "/capture-templates/product-templates.el"))
>>
>> with product-templates containing:
>>
>> (push '(("p" "product") ("pt" "Product - Todo" entry (file+headline
>> (concat org-directory "/product.org") "Tasks") "* TODO %?"))
>> org-capture-templates)
>>
>> and then I use C-c n to go to capture mode, it just hangs with the
>> mouse cursor in a spinning wheel.  Am I not translating the part to go
>> into submenus correctly, or can you not add sub-menus as I am doing.
>>
>> Thanks!
>>
>> -C
>>
>> On Tue, Oct 6, 2015 at 2:38 PM, Marco Wahl 
>> wrote:
>> > Hi!
>> >
>> > "tenspd137 ."  writes:
>> >
>> >> I am trying to figure out how to store multiple capture templates in a
>> >> file, have several files of related templates, and then load all the
>> >> files stored in a directory.  For example, lets say I have two
>> >> projects at work WorkProject1 and WorkProject2.  Then I have two files
>> >> in a directory org-templates called WorkProj1Templates.el and
>> >> WorkTemplates2.el.  How can I append the templates in these files to
>> >> or capture templates?  In my main .emacs, I have:
>> >>
>> >> (setq org-capture-templates
>> >>   '(("t" "Todo" entry (file+headline (concat org-directory
>> >> "/default.org") "Tasks")
>> >>  "* TODO %?")
>> >> ("j" "Journal" entry (file+datetree (concat org-directory
>> >> "/journal.org"))
>> >>  "* %?\nEntered on %U\n")))
>> >>
>> >> I would like to then load the template files in org-templates.  That
>> >> way, when a project ends, I can just yank the templates.  I have
>> >> experimentally tried using add-to-list with org-capture-templates
>> >> without success.  Either that can't be done or my syntax was wrong?
>> >
>> > How could anyone tell if you don't show your attempt?
>> >
>> >> Does anyone have any ideas?
>> >
>> > What about this?
>> >
>> > WorkProj1Templates.el:
>> >
>> > #v+
>> > (push '("1" "Todo" entry
>> > (fil

Re: [O] Multiple capture templates in file

2015-10-06 Thread tenspd137 .
One thought  I need to try either pushing one item at a time or
concatenation the list of options.   I'll try it when I get a chance.
Playtime is over for now. Thanks for all help and suggestions so far.

C
On Oct 6, 2015 5:43 PM, "tenspd137 ."  wrote:

> I can do the following in .emacs
>
> (setq org-capture-templates
>   '(("t" "Todo" entry (file+headline (concat org-directory
> "/default.org") "Tasks")
>  "* TODO %?")
> ("j" "Journal" entry (file+datetree (concat org-directory
> "/journal.org"))
>  "* %?\nEntered on %U\n")
> ;;product or work specific stuff - I would like to move these
> to files and have
> ;;them loaded - maybe in the future
> ("p" "product")
> ("pt" "Product Todo" entry (file+headline (concat org-directory
> "/product.org") "Tasks") "* TODO %?")))
>
> and it works as expected
>
> but if I do this in .emacs:
> (setq org-capture-templates
>   '(("t" "Todo" entry (file+headline (concat org-directory
> "/default.org") "Tasks")
>  "* TODO %?")
> ("j" "Journal" entry (file+datetree (concat org-directory
> "/journal.org"))
>  "* %?\nEntered on %U\n")))
> ;;product or work specific stuff - I would like to move these
> to files and have
> ;;them loaded - maybe in the future
>
> (load-file (concat org-directory
> "/capture-templates/product-templates.el"))
>
> with product-templates containing:
>
> (push '(("p" "product") ("pt" "Product - Todo" entry (file+headline
> (concat org-directory "/product.org") "Tasks") "* TODO %?"))
> org-capture-templates)
>
> and then I use C-c n to go to capture mode, it just hangs with the
> mouse cursor in a spinning wheel.  Am I not translating the part to go
> into submenus correctly, or can you not add sub-menus as I am doing.
>
> Thanks!
>
> -C
>
> On Tue, Oct 6, 2015 at 2:38 PM, Marco Wahl 
> wrote:
> > Hi!
> >
> > "tenspd137 ."  writes:
> >
> >> I am trying to figure out how to store multiple capture templates in a
> >> file, have several files of related templates, and then load all the
> >> files stored in a directory.  For example, lets say I have two
> >> projects at work WorkProject1 and WorkProject2.  Then I have two files
> >> in a directory org-templates called WorkProj1Templates.el and
> >> WorkTemplates2.el.  How can I append the templates in these files to
> >> or capture templates?  In my main .emacs, I have:
> >>
> >> (setq org-capture-templates
> >>   '(("t" "Todo" entry (file+headline (concat org-directory
> >> "/default.org") "Tasks")
> >>  "* TODO %?")
> >> ("j" "Journal" entry (file+datetree (concat org-directory
> >> "/journal.org"))
> >>  "* %?\nEntered on %U\n")))
> >>
> >> I would like to then load the template files in org-templates.  That
> >> way, when a project ends, I can just yank the templates.  I have
> >> experimentally tried using add-to-list with org-capture-templates
> >> without success.  Either that can't be done or my syntax was wrong?
> >
> > How could anyone tell if you don't show your attempt?
> >
> >> Does anyone have any ideas?
> >
> > What about this?
> >
> > WorkProj1Templates.el:
> >
> > #v+
> > (push '("1" "Todo" entry
> > (file+headline
> >  (concat org-directory "/WorkProj1.org")
> >  "Tasks")
> > "* TODO %?")
> >   org-capture-templates)
> > #v-
> >
> > --
> > Marco Wahl
> > GPG: 0x49010A040A3AE6F2
> >
> >
>


Re: [O] Multiple capture templates in file

2015-10-06 Thread tenspd137 .
I can do the following in .emacs

(setq org-capture-templates
  '(("t" "Todo" entry (file+headline (concat org-directory
"/default.org") "Tasks")
 "* TODO %?")
("j" "Journal" entry (file+datetree (concat org-directory
"/journal.org"))
 "* %?\nEntered on %U\n")
;;product or work specific stuff - I would like to move these
to files and have
;;them loaded - maybe in the future
("p" "product")
("pt" "Product Todo" entry (file+headline (concat org-directory
"/product.org") "Tasks") "* TODO %?")))

and it works as expected

but if I do this in .emacs:
(setq org-capture-templates
  '(("t" "Todo" entry (file+headline (concat org-directory
"/default.org") "Tasks")
 "* TODO %?")
("j" "Journal" entry (file+datetree (concat org-directory
"/journal.org"))
 "* %?\nEntered on %U\n")))
;;product or work specific stuff - I would like to move these
to files and have
;;them loaded - maybe in the future

(load-file (concat org-directory "/capture-templates/product-templates.el"))

with product-templates containing:

(push '(("p" "product") ("pt" "Product - Todo" entry (file+headline
(concat org-directory "/product.org") "Tasks") "* TODO %?"))
org-capture-templates)

and then I use C-c n to go to capture mode, it just hangs with the
mouse cursor in a spinning wheel.  Am I not translating the part to go
into submenus correctly, or can you not add sub-menus as I am doing.

Thanks!

-C

On Tue, Oct 6, 2015 at 2:38 PM, Marco Wahl  wrote:
> Hi!
>
> "tenspd137 ."  writes:
>
>> I am trying to figure out how to store multiple capture templates in a
>> file, have several files of related templates, and then load all the
>> files stored in a directory.  For example, lets say I have two
>> projects at work WorkProject1 and WorkProject2.  Then I have two files
>> in a directory org-templates called WorkProj1Templates.el and
>> WorkTemplates2.el.  How can I append the templates in these files to
>> or capture templates?  In my main .emacs, I have:
>>
>> (setq org-capture-templates
>>   '(("t" "Todo" entry (file+headline (concat org-directory
>> "/default.org") "Tasks")
>>  "* TODO %?")
>> ("j" "Journal" entry (file+datetree (concat org-directory
>> "/journal.org"))
>>  "* %?\nEntered on %U\n")))
>>
>> I would like to then load the template files in org-templates.  That
>> way, when a project ends, I can just yank the templates.  I have
>> experimentally tried using add-to-list with org-capture-templates
>> without success.  Either that can't be done or my syntax was wrong?
>
> How could anyone tell if you don't show your attempt?
>
>> Does anyone have any ideas?
>
> What about this?
>
> WorkProj1Templates.el:
>
> #v+
> (push '("1" "Todo" entry
> (file+headline
>  (concat org-directory "/WorkProj1.org")
>  "Tasks")
> "* TODO %?")
>   org-capture-templates)
> #v-
>
> --
> Marco Wahl
> GPG: 0x49010A040A3AE6F2
>
>



Re: [O] Multiple capture templates in file

2015-10-06 Thread tenspd137 .
Marco - Thanks for the reply.

"How could anyone tell if you don't show your attempt?" - Good point.
Wasn't thinking there.  First I will try what you have suggested since
you were kind enough to create the code, and if I can't get that
working, I'll show what I tried and also go back and re-create what I
was trying with add-to-list.  I am new to Lisp and Elisp, but I think
your function is saying push an association list (which is the
template) to the variable org-capture-templates.  Please forgive my
apparent slowness :)

On Tue, Oct 6, 2015 at 2:38 PM, Marco Wahl  wrote:
> Hi!
>
> "tenspd137 ."  writes:
>
>> I am trying to figure out how to store multiple capture templates in a
>> file, have several files of related templates, and then load all the
>> files stored in a directory.  For example, lets say I have two
>> projects at work WorkProject1 and WorkProject2.  Then I have two files
>> in a directory org-templates called WorkProj1Templates.el and
>> WorkTemplates2.el.  How can I append the templates in these files to
>> or capture templates?  In my main .emacs, I have:
>>
>> (setq org-capture-templates
>>   '(("t" "Todo" entry (file+headline (concat org-directory
>> "/default.org") "Tasks")
>>  "* TODO %?")
>> ("j" "Journal" entry (file+datetree (concat org-directory
>> "/journal.org"))
>>  "* %?\nEntered on %U\n")))
>>
>> I would like to then load the template files in org-templates.  That
>> way, when a project ends, I can just yank the templates.  I have
>> experimentally tried using add-to-list with org-capture-templates
>> without success.  Either that can't be done or my syntax was wrong?
>
> How could anyone tell if you don't show your attempt?
>
>> Does anyone have any ideas?
>
> What about this?
>
> WorkProj1Templates.el:
>
> #v+
> (push '("1" "Todo" entry
> (file+headline
>  (concat org-directory "/WorkProj1.org")
>  "Tasks")
> "* TODO %?")
>   org-capture-templates)
> #v-
>
> --
> Marco Wahl
> GPG: 0x49010A040A3AE6F2
>
>



Re: [O] Multiple capture templates in file

2015-10-06 Thread Subhan Michael Tindall
add-to-list works fine for me, like this: (taken straight of my emacs.org
file)
#+BEGIN_SRC emacs-lisp
 (add-to-list 'org-capture-templates '("J" "log job or activity to date
tree for UE application"
 (file+datetree "~/Dropbox/orgzly/
jobs.org")
   "* %^{Company or activity} %^{Job}
  - Direct Contact:%^{y/n}
  - Resume submitted:%^{y/n}
  - Result:%^{[h]ired/[n]ot hired/[i]nterview}
  %?"
  :prepend t :immediate-finish)
  )
#+END_SRC

On Tue, Oct 6, 2015 at 1:38 PM Marco Wahl  wrote:

> Hi!
>
> "tenspd137 ."  writes:
>
> > I am trying to figure out how to store multiple capture templates in a
> > file, have several files of related templates, and then load all the
> > files stored in a directory.  For example, lets say I have two
> > projects at work WorkProject1 and WorkProject2.  Then I have two files
> > in a directory org-templates called WorkProj1Templates.el and
> > WorkTemplates2.el.  How can I append the templates in these files to
> > or capture templates?  In my main .emacs, I have:
> >
> > (setq org-capture-templates
> >   '(("t" "Todo" entry (file+headline (concat org-directory
> > "/default.org") "Tasks")
> >  "* TODO %?")
> > ("j" "Journal" entry (file+datetree (concat org-directory
> > "/journal.org"))
> >  "* %?\nEntered on %U\n")))
> >
> > I would like to then load the template files in org-templates.  That
> > way, when a project ends, I can just yank the templates.  I have
> > experimentally tried using add-to-list with org-capture-templates
> > without success.  Either that can't be done or my syntax was wrong?
>
> How could anyone tell if you don't show your attempt?
>
> > Does anyone have any ideas?
>
> What about this?
>
> WorkProj1Templates.el:
>
> #v+
> (push '("1" "Todo" entry
> (file+headline
>  (concat org-directory "/WorkProj1.org")
>  "Tasks")
> "* TODO %?")
>   org-capture-templates)
> #v-
>
> --
> Marco Wahl
> GPG: 0x49010A040A3AE6F2
>
>
>


[O] Suggestion about org-babel: executing source block asynchronously

2015-10-06 Thread kuangdash
Sometime I will run source block (such as python) which take a long time before 
I  get the final result.

Then I thought about whether or not the source block can be executed 
asynchronously, and the answer is ‘YES’.

But it seems to be difficult for me to hack the code, so I just talk about the 
process of it:

1) When execute source block, cover it up with the “executing” overlay.
2) When get the final result, get the “executing” overlay position.
3) Add the result below the “executing” overlay position, and then remove the 
overly.

It can be done!  How about it? 

Regards


Re: [O] Multiple capture templates in file

2015-10-06 Thread Marco Wahl
Hi!

"tenspd137 ."  writes:

> I am trying to figure out how to store multiple capture templates in a
> file, have several files of related templates, and then load all the
> files stored in a directory.  For example, lets say I have two
> projects at work WorkProject1 and WorkProject2.  Then I have two files
> in a directory org-templates called WorkProj1Templates.el and
> WorkTemplates2.el.  How can I append the templates in these files to
> or capture templates?  In my main .emacs, I have:
>
> (setq org-capture-templates
>   '(("t" "Todo" entry (file+headline (concat org-directory
> "/default.org") "Tasks")
>  "* TODO %?")
> ("j" "Journal" entry (file+datetree (concat org-directory
> "/journal.org"))
>  "* %?\nEntered on %U\n")))
>
> I would like to then load the template files in org-templates.  That
> way, when a project ends, I can just yank the templates.  I have
> experimentally tried using add-to-list with org-capture-templates
> without success.  Either that can't be done or my syntax was wrong?

How could anyone tell if you don't show your attempt?

> Does anyone have any ideas?

What about this?

WorkProj1Templates.el:

#v+
(push '("1" "Todo" entry
(file+headline
 (concat org-directory "/WorkProj1.org")
 "Tasks")
"* TODO %?")
  org-capture-templates)
#v-

-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




[O] Multiple capture templates in file

2015-10-06 Thread tenspd137 .
Hi all,

I am trying to figure out how to store multiple capture templates in a
file, have several files of related templates, and then load all the
files stored in a directory.  For example, lets say I have two
projects at work WorkProject1 and WorkProject2.  Then I have two files
in a directory org-templates called WorkProj1Templates.el and
WorkTemplates2.el.  How can I append the templates in these files to
or capture templates?  In my main .emacs, I have:

(setq org-capture-templates
  '(("t" "Todo" entry (file+headline (concat org-directory
"/default.org") "Tasks")
 "* TODO %?")
("j" "Journal" entry (file+datetree (concat org-directory
"/journal.org"))
 "* %?\nEntered on %U\n")))

I would like to then load the template files in org-templates.  That
way, when a project ends, I can just yank the templates.  I have
experimentally tried using add-to-list with org-capture-templates
without success.  Either that can't be done or my syntax was wrong?

Does anyone have any ideas?

Another idea is that I could just have templates that take a
parameter.  I have found how to do this out on the web.

Any suggestions on which would be easier?

Thanks!

-C



Re: [O] babel srcname? Calling Library of Babel code?

2015-10-06 Thread Thomas S . Dye
Aloha Lawrence,

Lawrence Bottorff  writes:

> Thanks for the info, T. Now, if I commit a file of source code blocks to be
> "library of babel," how do I then call them? Is there some sort of prefix?

You can name the file as you wish, and you can have as many libraries of
Babel as need be.

I have this code in .emacs to load one of my libraries of Babel:

  (org-babel-lob-ingest "~/org/td-lob.org")

After the library has been "ingested" then you can call the named source
code blocks it contains, just like you would if they were defined in
your working buffer.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] babel srcname? Calling Library of Babel code?

2015-10-06 Thread Nick Dokos
Lawrence Bottorff  writes:

> Thanks for the info, T. Now, if I commit a file of source code blocks to be 
> "library of babel," how do I
> then call them? Is there some sort of prefix?
>

C-h v org-babel-lob-ingest RET

(info "(org) Library of babel")

Also, reading the library-of-babel.org file in the doc directory
of your org-mode installation is helpful.

Nick




Re: [O] babel srcname? Calling Library of Babel code?

2015-10-06 Thread Lawrence Bottorff
Thanks for the info, T. Now, if I commit a file of source code blocks to be
"library of babel," how do I then call them? Is there some sort of prefix?

On Tue, Oct 6, 2015 at 5:15 AM, Thomas S. Dye  wrote:

> Aloha Lawrence,
>
> Lawrence Bottorff  writes:
>
> > Not really getting how to call code "meta-style" from other points -- in
> my
> > file, in other files, in my "library of babel" file? I've tracked down
> bits
> > and pieces here and there, but I'm missing the big picture.
> >
> > For example, this:
> >
> > #+srcname: python2_env
> > #+begin_src emacs-lisp
> >   (setq org-babel-python-command "python")
> >   (set-face-background 'modeline "#4477aa")
> > #+end_src
> >
> > #+srcname: python3_env
> > #+begin_src emacs-lisp
> >   (setq org-babel-python-command "python3")
> >   (set-face-background 'modeline "#771944")
> > #+end_src
> >
> > Why is #+srcname being used and not just #+name? I assume these blocks
> will
> > be called later? I'm also assuming that #+call plays a role, but this
> page
> >  has no examples
> and
> > confused me.
>
> During development of Babel, source code blocks were originally named
> using #+srcname:.  Later, as other elements gained the ability to be
> named, it was decided to use a more generic identifier, #+name:.
>
> The #+call: syntax is confusing to me, too.  I usually put :var
> arguments in the  part, non-:var arguments that change what
> the code block does in , and non-:var arguments
> that affect how the buffer is changed in the .
>
> >
> > This example
> > 
> again
> > uses #+srcname:
> >
> > . . .
> > * Opening
> >> #+srcname: opening
> >> #+begin_src org
> >> Dear Org mode users,
> >> #+end_src
> > . . .
> > * Closing
> >> #+srcname: closing
> >> #+begin_src org
> >>   Yours Truly
> >> #+end_src
> > . . .
> > and then
> >
> > . . .
> > \setupdocument{
> >> to = {%
> >>   <>},
> > . . .
> >> opening = {<>},
> >> closing = {<>}
> >> }
> >
> > I'm guessing the opening and closing are being called. But again, why
> > srcname and not just name? And what if my blocks had been defined
> somewhere
> > outside of this file?
>
> The <> form is noweb reference syntax.  Your example expands the
> source code block.  You can get the results of the source code block
> with <>, which I think is what this example might intend.
>
> If the blocks are defined outside of the file, then where they are
> defined is a library of Babel.  You'll need to explicitly load them with
> the org-babel-lob-ingest function.  You can have as many libraries of
> Babel as you want.
>
> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>


Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Eric S Fraga
On Tuesday,  6 Oct 2015 at 16:45, Julien Cubizolles wrote:
> Just followed the instructions on the github README page. I've not
> looked this authentification problem in Google but from what I gathered
> it's still working using the old endpoint for the time being. I'll
> reconsider when it won't.

Interesting.  I cannot remember what happened but org-caldav stopped
working and so I went back to using MobileOrg.  I'll stick to what I
have for now but it's good to know that there still exist alternative
approaches, especially for the OP.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-270-g256fef



Re: [O] [PATCH] Allow early-warning anniversaries in agends [was: Re: org-bbdb-birthday reminder]

2015-10-06 Thread Nick Dokos
Nicolas Goaziou  nicolasgoaziou.fr> writes:

> 
> Rasmus  gmx.us> writes:
> 
> > Nick Dokos  gmail.com> writes:
> >
> >> I did a mapcan originally and saw that it was an alias for cl-mapcan in
> >> cl-extras.el and that got me scared: ...
> 
> > So cl-mapcan is OK.
> 
> Actually it's not until Emacs minimal version issue is sorted out by Bastien.
> 


IIUC, this issue has not been sorted out yet. Should I wait for that to happen, 
or change the patch to use (apply #'nconc ...) and possibly revisit it in the 
future?

Thanks,
Nick





Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Julien Cubizolles
Eric S Fraga  writes:

> On Tuesday,  6 Oct 2015 at 12:21, Julien Cubizolles wrote:
>> I'm using org-caldav, it's working fine for me.
>
> How do you have this working with Google?  It quit working for me due to
> authentication changes at the Google end.  I cannot remember the details
> unfortunately.

Just followed the instructions on the github README page. I've not
looked this authentification problem in Google but from what I gathered
it's still working using the old endpoint for the time being. I'll
reconsider when it won't.



Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Eric S Fraga
On Tuesday,  6 Oct 2015 at 12:21, Julien Cubizolles wrote:
> I'm using org-caldav, it's working fine for me.

How do you have this working with Google?  It quit working for me due to
authentication changes at the Google end.  I cannot remember the details
unfortunately.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-270-g256fef



Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Julien Cubizolles
Xebar Saram  writes:

> Hi all
>
> i was wondering if anyone was syncing orgmode calendar with google cal, and
> if so how? i tried this
>
> https://github.com/myuhe/org-gcal.el/issues
>
> which gave errors all the time and thus stopped being usable
>
> im looking for a robust solution. any ideas?

I'm using org-caldav, it's working fine for me.

Julien.




Re: [O] Different set of packages for LaTeX export

2015-10-06 Thread Julien Cubizolles
Manfred Lotz  writes:

> Hi all,
> I have configured LaTeX export for using xelatex. For this I have
> defined a list of packages in org-latex-default-packages-alist. One of
> those packages is hyperref with certain options.
>
> When creating a normal document, e.g. using class article that works
> fine.
>
> When creating slides, i.e using beamer I get an option clash
> during compiling the tex file because beamer did already load hyperref.
>
> How can I solve it? 

The way I do it: I have different classes for different types of export
(beamer, or "normal") and I'm using different projects to choose from at
export time. The following code is at the beginning of the org file and
has to be run (C-c C-c) when you open the org file. The publishing
functions are just here to rename the pdf file.


--8<---cut here---start->8---
#+begin_src emacs-lisp :tangle yes :exports none
  (setq org-publish-project-alist
`(("TeX"
   :base-directory "./"
   :publishing-directory "./"
   :publishing-function org-beamer-publish-to-latex
   :exclude ".*"
   :latex-class "mpsi_beamer"
   :include ,(list (file-name-nondirectory buffer-file-name))
   )
  ("beamer"
   :base-directory "./"
   :publishing-directory "./"
   :publishing-function org-beamer-publish-to-pdf
   :exclude ".*"
   :latex-class "mpsi_beamer"
   :include ,(list (file-name-nondirectory buffer-file-name))
   :completion-function jc-org-publish-rename-beamer-pdf
   )
  ("notes"
   :base-directory "./"
   :publishing-directory "./"
   :preparation-function jc-org-latex-notes-preparation
   :publishing-function org-beamer-publish-to-latex
   :exclude ".*"
   :latex-class "mpsi-beamerarticle"
   :include ,(list (file-name-nondirectory buffer-file-name))
   :completion-function jc-org-publish-rename-notes-pdf
   )
  ("eleves"
   :base-directory "./"
   :publishing-directory "./"
   :preparation-function jc-org-latex-notes-preparation
   :publishing-function org-beamer-publish-to-pdf
   :exclude ".*"
   :latex-class "mpsi-beamerarticle-eleves"
   :include ,(list (file-name-nondirectory buffer-file-name))
   :select-tags ("eleves")
   :completion-function jc-org-publish-rename-eleves-pdf
   )  
  ("cours" :components ("beamer" "notes" "eleves"
#+end_src
--8<---cut here---end--->8---

--8<---cut here---start->8---
(defun jc-org-publish-rename-beamer-pdf ()
  "Rename file.pdf to file-beamer.pdf and file.tex to file-beamer.tex when 
buffer is visiting file.org"
  (jc-org-publish-rename '"pdf" '"beamer")
  (jc-org-publish-rename '"tex" '"beamer"))
--8<---cut here---end--->8---

--8<---cut here---start->8---
(defun jc-org-publish-rename (suffix version)
"Rename file.suffix to file-version.suffix when buffer is visiting file.org"
(let*   ((file-base-name (remove-org-suffix (buffer-file-name)))
 (file-suffix-name (concat file-base-name "." suffix))
 (file-version-suffix-name (concat file-base-name "-" version  "." 
suffix)))
(if (file-exists-p file-suffix-name)
(rename-file file-suffix-name file-version-suffix-name t))
)
)
--8<---cut here---end--->8---

Julien.




Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Julien Cubizolles
Xebar Saram  writes:

> Hi all
>
> i was wondering if anyone was syncing orgmode calendar with google cal, and
> if so how? i tried this
>
> https://github.com/myuhe/org-gcal.el/issues
>
> which gave errors all the time and thus stopped being usable
>
> im looking for a robust solution. any ideas?

I'm using org-caldav, it's working fine for me.

Julien.




Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-06 Thread Julien Cubizolles
Xebar Saram  writes:

> Hi all
>
> i was wondering if anyone was syncing orgmode calendar with google cal, and
> if so how? i tried this
>
> https://github.com/myuhe/org-gcal.el/issues
>
> which gave errors all the time and thus stopped being usable
>
> im looking for a robust solution. any ideas?

I'm using org-caldav, it's working fine for me.

Julien.