emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xebar Saram <zeltakc@gmail.com>
To: Philip Hudson <phil.hudson@iname.com>, org mode <emacs-orgmode@gnu.org>
Subject: Re: export to ics a specific buffer every X hours
Date: Wed, 13 Jul 2016 11:41:53 +0300	[thread overview]
Message-ID: <CAOQHXPo02dhYkzeorxBKZmYH+_CZMR-LfzXUfAiuQiM8gCO_Qw@mail.gmail.com> (raw)
In-Reply-To: <CAJ1MqVGfC0XrwXiX3kiHHGehO2XneKOYoeCRgMbin3f2ejxJiQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]

Thx

i do have this now

  (defun z/save-meeting-to-ics ()
    "If the current file is in '~/.dotfiles', the code blocks are tangled"
    (when (equal (buffer-file-name)
                 (expand-file-name "/home/zeltak/org/files/agenda/
meetings.org"))
 (rename-file (org-icalendar-export-to-ics)
"/home/zeltak/org/files/export/kcal.ics")
      (message "exported to ics")))

;;run every 30 minutes

(run-with-timer 0 (* 30 60) 'z/save-meeting-to-ics)
;;(run-with-idle-timer 600 t #'org-agenda-redo) ;; to rebuild it every 600
second
;;  (add-hook 'after-save-hook #'z/save-meeting-to-ics)

yet i cant get the ics file to be created niether when i save the
meeting.org file nor every 600 seconds. what am i missing here?

thx

Z

On Sun, Jun 26, 2016 at 9:49 PM, Philip Hudson <phil.hudson@iname.com>
wrote:

> On 26 June 2016 at 16:38, Xebar Saram <zeltakc@gmail.com> wrote:
> > Hi all
> >
> > so i have pathetic coding skill but managed somehow to come up with this
> >
> >  (defun z/save-meeting-to-ics ()
> >     "If the current file is in '~/.dotfiles', the code blocks are
> tangled"
> >     (when (equal (buffer-file-name)
> >                  (expand-file-name
> > "/home/zeltak/org/files/agenda/meetings.org"))
> >       (org-icalendar-export-to-ics)
> >       (message "exported to ics")))
> >
> > this does save the org file "meetings.org" to an ICS file in the same
> folder
> > as the file. but i want to do 2 additional things:
> > 1)save the resulting ICS file to a different directory
> > 2)run this function every X hours (lets say every 2 hours)
> >
> > any clue guys?
> >
> > thx!
> >
> > Z
>
> For 1), change:
>
>     (org-icalendar-export-to-ics)
>
> to something like this:
>
>     (rename-file (org-icalendar-export-to-ics) your-preferred-pathname)
>
> For 2), evaluate this:
>
>     (info "(elisp) Timers")
>
> --
> Phil Hudson                   http://hudson-it.ddns.net
> @UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63
>

[-- Attachment #2: Type: text/html, Size: 3298 bytes --]

  parent reply	other threads:[~2016-07-13  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-26 15:38 export to ics a specific buffer every X hours Xebar Saram
2016-06-26 17:10 ` Ken Mankoff
     [not found] ` <CAJ1MqVGfC0XrwXiX3kiHHGehO2XneKOYoeCRgMbin3f2ejxJiQ@mail.gmail.com>
2016-07-13  8:41   ` Xebar Saram [this message]
2016-07-13 15:27     ` Philip Hudson
2016-08-25  7:32       ` Xebar Saram
2016-08-30 13:39         ` Xebar Saram
2016-08-30 13:50           ` John Kitchin
2016-08-30 13:59             ` Xebar Saram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOQHXPo02dhYkzeorxBKZmYH+_CZMR-LfzXUfAiuQiM8gCO_Qw@mail.gmail.com \
    --to=zeltakc@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=phil.hudson@iname.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).