Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-03 Thread Jack Kamm
Ypo  writes:

> I can't share my private org files. And I find myself unable to isolate 
> the causes of the possible errors.

One strategy that might help is to "bisect" the Org file by repeatedly
splitting it into 2 files, and exporting each, to find where the
problematic entries are. By splitting in half every time, you might be
able to isolate the problem relatively quickly, and produce a minimal
example from that.



Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-03 Thread Ypo

Thanks, Ihor

I can't share my private org files. And I find myself unable to isolate 
the causes of the possible errors.


I think I will keep waiting till somebody shares an easy and robust way 
to get an .ics calendar from org files.


Best!

On 02/02/2024 22:25, Ihor Radchenko wrote:

Ypo  writes:


I am sharing a bug report from emacs -q. I don't know how to use a
different org-version that the built-in (or if I should).

Sorry for not being clear. Let me elaborate what I expect.

1. Create example Org file or a set of Org files, open them with
emacs -Q, and try to trigger the problem where you expect to see ics
file, but it does not appear

2. If you can do it, share the example Org files and each step you
performed after emacs -Q until you encountered the problem.

The idea is providing me with enough info to re-create the problem on my
computer, so that I can investigate in depth.


Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-03 Thread Fraga, Eric
On Saturday,  3 Feb 2024 at 13:13, Ypo wrote:
> I think I will keep waiting till somebody shares an easy and robust
> way to get an .ics calendar from org files.

Not sure what you are expecting but I can show you my (elided) shell
script that generates a single ics file from multiple org files:

--8<---cut here---start->8---
DIARY=${HOME}/s/notes/diary
OUTLOOK=${HOME}/s/notes/outlook
emacs -Q --batch --debug-init \
--load=esf-org.el \
--visit=${DIARY}.org --eval='(org-icalendar-export-to-ics)' \
--visit=${OUTLOOK}.org --eval='(org-icalendar-export-to-ics)'
cat ${DIARY}.ics \
${OUTLOOK}.ics \
> /tmp/combined.ics
--8<---cut here---end--->8---

where esf-org.el has some org customizations and the resulting combined
ics file is in /tmp/combined.ics.

HTH,
eric

-- 
Eric S Fraga, https://profiles.ucl.ac.uk/5958-eric-fraga


Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-02 Thread Ihor Radchenko
Ypo  writes:

> I am sharing a bug report from emacs -q. I don't know how to use a 
> different org-version that the built-in (or if I should).

Sorry for not being clear. Let me elaborate what I expect.

1. Create example Org file or a set of Org files, open them with
   emacs -Q, and try to trigger the problem where you expect to see ics
   file, but it does not appear

2. If you can do it, share the example Org files and each step you
   performed after emacs -Q until you encountered the problem.

The idea is providing me with enough info to re-create the problem on my
computer, so that I can investigate in depth.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-02 Thread Ypo
I am sharing a bug report from emacs -q. I don't know how to use a 
different org-version that the built-in (or if I should).



Emacs  : GNU Emacs 29.2 (build 2, x86_64-w64-mingw32)
 of 2024-01-18
Package: Org mode version 9.6.15 (release_9.6.15 @ 
./emacs-i686/share/emacs/29.2/lisp/org/)


current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function 
'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME 
CONTENTS WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines

      org-cycle-optimize-window-after-visibility-change
      org-cycle-display-inline-images)
 org-export-with-broken-links 'mark
 org-export-with-clocks t
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-export-default-language "es"
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
       [add-hook change-major-mode-hook org-fold-show-all append 
local] 5]

     #[0 "\300\301\302\303\304$\207"
       [add-hook change-major-mode-hook org-babel-show-result-all 
append local] 5]

     org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-export-headline-levels 888
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-icalendar-use-scheduled '(event-if-not-todo event-if-todo-not-done)
 org-latex-format-headline-function 
'org-latex-format-headline-default-function

 org-confirm-shell-link-function 'yes-or-no-p
 org-export-with-date nil
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME 
CONTENTS)"]

 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-export-with-todo-keywords nil
 org-icalendar-include-todo 'all
 org-export-initial-scope 'subtree
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-export-with-statistics-cookies nil
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-with-author nil
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-with-timestamps nil
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function

 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-export-with-tags nil
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-persist-directory "c:/Users/KC/AppData/Local/Temp/org-persist-KWkfxv"
 org-icalendar-combined-name "icalendar-org-agenda"
 org-export-backends '(html icalendar latex odt)
 org-icalendar-combined-description "icalendar-org-agenda-files"
 org-fold-core-isearch-open-function 'org-fold--isearch-reveal
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function

 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-export-with-drawers t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
        org-attach-complete-link)
       ("id" :follow org-id-open)
       ("eww" :follow org-eww-open :store org-eww-store-link)
       ("rmail" :follow org-rmail-open :store org-rmail-store-link)
       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
       ("irc" :follow org-irc-visit :store org-irc-store-link 
:export

        org-irc-export)
       ("info" :follow org-info-open :export org-info-export :store
        org-info-store-link :insert-description
        org-info-description-as-command)
       ("gnus" :follow org-gnus-open :store org-gnus-store-link)
       ("docview" :follow org-docview-open :export 
org-docview-export :store

        org-docview-store-link)
       ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
       ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete

        org-bbdb-complete-link :store org-bbdb-store-link)
       ("w3m" :store org-w3m-store-link)
       ("doi" :follow org-link-doi-open :export 
org-link-doi-export)
       ("file+sys") ("file+emacs") ("shell" :follow 
org-link--open-shell)

 

Re: org-icalendar export problems

2024-02-02 Thread Ihor Radchenko
Ypo  writes:

> If I were able to fulfill a good process to export from agenda to 
> icalendar, maybe we could share an easy process, useful for a lot of 
> users that miss a good android calendar visualization. Do you think it 
> could be possible to export, in an async way, a calendar file every time 
> when a new timestamp, Schedule or Deadline are added to a buffer? What 
> would happen if an export process is already running and a new timestamp 
> is added? Would it be robust enough or prone to errors? I can see that 
> even if a footnote is not correct, the process seems to be interrupted.

You can just do it on timer or when the file changed.

> Actual state: when I try to export to icalendar, the behavior is quite 
> confusing:
>
> + [c] Combine all agenda files: I don't get any ics file. I don't know 
> what is the problem.
>
> + [a] All agenda files: I get just an ics file. I thought I would get 
> one file for each agenda file.

It would help if you provided an MWE. See 
https://orgmode.org/manual/Feedback.html#Feedback
It is extremely hard to diagnose things blindly.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-icalendar export problems

2024-02-01 Thread Ypo
I got org updated, following Ihor's instructions: Org mode version 
9.7-pre (release_N/A-N/A-afc529 @ ./org-9.7pre0.20240130.161905/)


If I were able to fulfill a good process to export from agenda to 
icalendar, maybe we could share an easy process, useful for a lot of 
users that miss a good android calendar visualization. Do you think it 
could be possible to export, in an async way, a calendar file every time 
when a new timestamp, Schedule or Deadline are added to a buffer? What 
would happen if an export process is already running and a new timestamp 
is added? Would it be robust enough or prone to errors? I can see that 
even if a footnote is not correct, the process seems to be interrupted.


Actual state: when I try to export to icalendar, the behavior is quite 
confusing:


+ [c] Combine all agenda files: I don't get any ics file. I don't know 
what is the problem.


+ [a] All agenda files: I get just an ics file. I thought I would get 
one file for each agenda file.


Best!

On 30/01/2024 5:13, Jack Kamm wrote:

ypuntot  writes:


Problem! Found 1 error

Errors
Lines not delimited by CRLF sequence near line # 1
Reference: RFC 5545 3.1. Content Lines

Which version of Org are you using? (M-x org-version)

Org 9.7 (unreleased) contains some fixes for how ox-icalendar handles
newlines. If you are using a previous version of Org, please try out the
latest main branch and see if it fixes the problem.

Re: org-icalendar export problems

2024-01-29 Thread Jack Kamm
ypuntot  writes:

> Problem! Found 1 error
>
> Errors
> Lines not delimited by CRLF sequence near line # 1
> Reference: RFC 5545 3.1. Content Lines

Which version of Org are you using? (M-x org-version)

Org 9.7 (unreleased) contains some fixes for how ox-icalendar handles
newlines. If you are using a previous version of Org, please try out the
latest main branch and see if it fixes the problem.



Re: org-icalendar export problems

2024-01-29 Thread ypuntot
The validator says as follows:

Results
File Size: 19544 lines, 434248 bytes
Number of events found: 103
Number of to-do's found: 541
Problem! Found 10 warnings

Warnings
Blank line detected, specification does not address the use of blank lines near 
line # 9
Blank line detected, specification does not address the use of blank lines near 
line # 11
Blank line detected, specification does not address the use of blank lines near 
line # 13
Blank line detected, specification does not address the use of blank lines near 
line # 15
Blank line detected, specification does not address the use of blank lines near 
line # 17
Blank line detected, specification does not address the use of blank lines near 
line # 19
Blank line detected, specification does not address the use of blank lines near 
line # 21
Blank line detected, specification does not address the use of blank lines near 
line # 23
Blank line detected, specification does not address the use of blank lines near 
line # 26
Blank line detected, specification does not address the use of blank lines near 
line # 28

Problem! Found 1 error

Errors
Lines not delimited by CRLF sequence near line # 1
Reference: RFC 5545 3.1. Content Lines

Jan 30, 2024 04:30:10 Jack Kamm :

> Ihor Radchenko  writes:
> 
>> CCing ox-icalendar maintainer.
>> 
>> ypuntot  writes:
>> 
>>> I am trying to create an android calendar based on the agenda, and the 
>>> first problem I am finding it's that I can't import it into android 
>>> (ICSx^5). I am receiving these errors when trying to do it:
>>> 
>>> Couldn't parse iCalendar ...
>> 
>> May you be able to share the problematic icalendar file?
> 
> If you're not comfortable sharing the icalendar file on a public mail
> list, you could also try out the iCalendar validator, which may help to
> identify the issue with the ics file:
> 
> https://icalendar.org/validator.html
> 
> FWIW, I did try out ICSx5 with the exported ics from a simple Org file,
> and it worked. So we'll need more specific information to fix the
> problem.



Re: org-icalendar export problems

2024-01-29 Thread Jack Kamm
Ihor Radchenko  writes:

> CCing ox-icalendar maintainer.
>
> ypuntot  writes:
>
>> I am trying to create an android calendar based on the agenda, and the first 
>> problem I am finding it's that I can't import it into android (ICSx^5). I am 
>> receiving these errors when trying to do it:
>>
>> Couldn't parse iCalendar ...
>
> May you be able to share the problematic icalendar file?

If you're not comfortable sharing the icalendar file on a public mail
list, you could also try out the iCalendar validator, which may help to
identify the issue with the ics file:

https://icalendar.org/validator.html

FWIW, I did try out ICSx5 with the exported ics from a simple Org file,
and it worked. So we'll need more specific information to fix the
problem.



Re: org-icalendar export problems

2024-01-29 Thread Ihor Radchenko
CCing ox-icalendar maintainer.

ypuntot  writes:

> I am trying to create an android calendar based on the agenda, and the first 
> problem I am finding it's that I can't import it into android (ICSx^5). I am 
> receiving these errors when trying to do it:
>
> Couldn't parse iCalendar ...

May you be able to share the problematic icalendar file?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



org-icalendar export problems

2024-01-29 Thread ypuntot
I am trying to create an android calendar based on the agenda, and the first 
problem I am finding it's that I can't import it into android (ICSx^5). I am 
receiving these errors when trying to do it:

Couldn't parse iCalendar  at.bitfire.ical4android.InvalidCalendarException: 
Couldn't parse iCalendar at 
at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:91) at 
at.bitfire.ical4android.Event$Companion.eventsFromReader(Event.kt:79) at 
at.bitfire.icsdroid.ui.AddCalendarValidationFragment$ValidationModel$validate$downloader$1.onSuccess(AddCalendarValidationFragment.kt:126)
 at 
at.bitfire.icsdroid.CalendarFetcher.fetchLocal$icsx5_72_2_1_1_standardRelease(CalendarFetcher.kt:115)
 at at.bitfire.icsdroid.CalendarFetcher.fetch(CalendarFetcher.kt:49) at 
at.bitfire.icsdroid.ui.AddCalendarValidationFragment$ValidationModel.validate(AddCalendarValidationFragment.kt:168)
 at 
at.bitfire.icsdroid.ui.AddCalendarValidationFragment$ValidationModel.access$validate(AddCalendarValidationFragment.kt:103)
 at 
at.bitfire.icsdroid.ui.AddCalendarValidationFragment$ValidationModel$4.invokeSuspend(AddCalendarValidationFragment.kt:114)
 at 
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
 at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at 
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
 at 
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
 at 
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
 at 
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
 Caused by: net.fortuna.ical4j.data.ParserException: Error at line 
1.893:Expected [61], read [10] at 
net.fortuna.ical4j.data.CalendarParserImpl.assertToken(CalendarParserImpl.java:486)
 at 
net.fortuna.ical4j.data.CalendarParserImpl.access$700(CalendarParserImpl.java:56)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.parse(CalendarParserImpl.java:357)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.access$2000(CalendarParserImpl.java:335)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$ParameterListParser.parse(CalendarParserImpl.java:330)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:266)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.access$1100(CalendarParserImpl.java:241)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:226)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.parse(CalendarParserImpl.java:446)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.access$900(CalendarParserImpl.java:422)
 at 
net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:224)
 at 
net.fortuna.ical4j.data.CalendarParserImpl.parseCalendar(CalendarParserImpl.java:128)
 at 
net.fortuna.ical4j.data.CalendarParserImpl.parseCalendarList(CalendarParserImpl.java:194)
 at 
net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:163) 
at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:197) at 
net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:185) at 
at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:89) ... 13 
more


Re: ICalendar export

2023-10-04 Thread Henrik Frisk
Den sön 17 sep. 2023 kl 11:49 skrev Ihor Radchenko :

> Jack Kamm  writes:
>
> >> Does the attached patch fix the problem for you?
> >
> > I can reproduce the bug by calling `org-icalendar-export-current-agenda'
> > in my agenda buffer. It seems to mainly happen when subsequent agenda
> > entries originate from different files.
> >
> > Ihor's patch fixes the problem on my end.
>
> Thanks for testing!
> Applied, onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=14bde5aba
> Fixed.
>
> Thank you both, I ran in to some other work issues, sorry for not replying
earlier. Thanks for fixing Ihor!

/Henrik


Re: ICalendar export

2023-09-17 Thread Ihor Radchenko
Jack Kamm  writes:

>> Does the attached patch fix the problem for you?
>
> I can reproduce the bug by calling `org-icalendar-export-current-agenda'
> in my agenda buffer. It seems to mainly happen when subsequent agenda
> entries originate from different files.
>
> Ihor's patch fixes the problem on my end.

Thanks for testing!
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=14bde5aba
Fixed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



Re: ICalendar export

2023-09-16 Thread Jack Kamm
Ihor Radchenko  writes:

> Henrik Frisk  writes:
>
>> Recently (not sure when) the ics output came out malformed and a newline is
>> omitted between the end of one event and the beginning of another:
>>
>> END:VEVENT
>> BEGIN:VEVENT
>>
>> is now
>>
>> END:VEVENTBEGIN:VEVENT
>>
>> I can't figure out wha the pattern is, for some events the output is
>> correct.
>>
>> This is on Org mode version 9.7-pre release_9.6.8-719-gf299fb and emacs 29.1
>
> We recently did some major changes to comply better to the icalendar
> specs and introduced new feature. As it usually goes, major changes can
> easily introduce new bugs.
>
> Does the attached patch fix the problem for you?

I can reproduce the bug by calling `org-icalendar-export-current-agenda'
in my agenda buffer. It seems to mainly happen when subsequent agenda
entries originate from different files.

Ihor's patch fixes the problem on my end.

Bisecting, the bug was introduced in f4446ce79.



Re: ICalendar export

2023-09-13 Thread Ihor Radchenko
Henrik Frisk  writes:

> Recently (not sure when) the ics output came out malformed and a newline is
> omitted between the end of one event and the beginning of another:
>
> END:VEVENT
> BEGIN:VEVENT
>
> is now
>
> END:VEVENTBEGIN:VEVENT
>
> I can't figure out wha the pattern is, for some events the output is
> correct.
>
> This is on Org mode version 9.7-pre release_9.6.8-719-gf299fb and emacs 29.1

We recently did some major changes to comply better to the icalendar
specs and introduced new feature. As it usually goes, major changes can
easily introduce new bugs.

Does the attached patch fix the problem for you?

>From 5ab376c558cbd0c1dcdbba99b4a42ff11e27418a Mon Sep 17 00:00:00 2001
Message-ID: <5ab376c558cbd0c1dcdbba99b4a42ff11e27418a.1694591956.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Wed, 13 Sep 2023 10:58:15 +0300
Subject: [PATCH] ox-icalendar: Ensure that entries in icalendar end with a
 newline

* lisp/ox-icalendar.el (org-icalendar--vevent):
(org-icalendar--vtodo): Make sure that there is a newline after the
exported VEVENT and VTODO.

Reported-by: Henrik Frisk 
Link: https://orgmode.org/list/CAO0LSb4aQhUMny4xr=1lb3t5f-k-wnjk1zc+qr7jy+69vr2...@mail.gmail.com
---
 lisp/ox-icalendar.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 980bb0ed3..20efad243 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -809,7 +809,7 @@ (\"PUBLIC\", \"CONFIDENTIAL\", and \"PRIVATE\") are predefined, others
 	"CATEGORIES:" categories "\n"
 	;; VALARM.
 	(org-icalendar--valarm entry timestamp summary)
-	"END:VEVENT")))
+	"END:VEVENT\n")))
 
 (defun org-icalendar--repeater-type (elem)
   "Return ELEM's repeater-type if supported, else warn and return nil."
@@ -952,7 +952,7 @@ (defun org-icalendar--vtodo
 		(if (eq (org-element-property :todo-type entry) 'todo)
 			"NEEDS-ACTION"
 		  "COMPLETED"))
-	"END:VTODO")))
+	"END:VTODO\n")))
 
 (defun org-icalendar--valarm (entry timestamp summary)
   "Create a VALARM component.
-- 
2.42.0


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 


ICalendar export

2023-09-12 Thread Henrik Frisk
hi,

I've had an iCal export setup working fine for several years. I have an
org-agenda-custom-commands defined with:

(org-agenda-start-day "2022-09-01")
(org-agenda-span 120) ;; number of days
(org-agenda-include-diary nil))

Recently (not sure when) the ics output came out malformed and a newline is
omitted between the end of one event and the beginning of another:

END:VEVENT
BEGIN:VEVENT

is now

END:VEVENTBEGIN:VEVENT

I can't figure out wha the pattern is, for some events the output is
correct.

This is on Org mode version 9.7-pre release_9.6.8-719-gf299fb and emacs 29.1

best,
/Henrik


Re: [BUG] hang in org-element-cache-map triggered by org-icalendar-export-to-ics

2023-01-31 Thread Ihor Radchenko
Hanno Perrey  writes:

> I have noticed a problem in =org-element-cache-map= that can be
> triggered under specific circumstances through
> =org-icalendar-export-to-ics= where the execution of the latter would
> simply hang apparently indefinitely. This happens if
>
> ...
> I attach an org file with detailed steps for reproducing this on the
> latest =main= using =make repro= on Emacs 28.1.90.

Thanks for reporting and for the clear reproducer!
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=32b64607a

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



[BUG] hang in org-element-cache-map triggered by org-icalendar-export-to-ics

2023-01-31 Thread Hanno Perrey

Dear all,

I have noticed a problem in =org-element-cache-map= that can be
triggered under specific circumstances through
=org-icalendar-export-to-ics= where the execution of the latter would
simply hang apparently indefinitely. This happens if

- =org-icalendar-store-UID= set to ='t=

- =org-icalendar-use-scheduled= set to = '(event-if-not-todo))=

- the buffer is narrowed to a tree with multiple sub-headings, each with
  a scheduled time

If =org-element-use-cache= is set to =nil= then the export succeeds
almost instantly.

I attach an org file with detailed steps for reproducing this on the
latest =main= using =make repro= on Emacs 28.1.90. I am a little stuck
debugging this further as I am not at all familiar with the inner
workings of Org's element cache. Any help or suggestions would be much
appreciated as I am using just this particular configuration quite
frequently when capturing new events and importing them into my calendar.


Thanks and cheers,

Hanno

--
Hanno Perrey
https://hoowl.se


test_subtree_ical_export.org
Description: Lotus Organizer


Re: [BUG] icalendar export fails with SCHEDULED/DEADLINE entries [9.5.2 (9.5.2-gbc8c3e @ /home/eliza/.emacs.d/straight/build/org/)]

2022-02-15 Thread Eric S Fraga
Dear Eliza,

On Tuesday, 15 Feb 2022 at 07:44, Eliza Velasquez wrote:
> It seems like `org-icalendar-export-to-ics' fails to consider the
> SCHEDULED and DEADLINE properties. Consider the following org file
> `foo.org':

By default, SCHEDULED and DEADLINE are properties of "tasks", i.e. TODO
items, not appointments (aka calendar entries).  Scheduled says when you
intend to start working on a task and deadline is when it needs to be
done by.

In any case, check out the values of org-icalendar-use-deadline and
org-icalendar-use-scheduled which should allow you to do what you want.

-- 
: Eric S Fraga, with org release_9.5.2-382-gfe4a60 in Emacs 29.0.50



[BUG] icalendar export fails with SCHEDULED/DEADLINE entries [9.5.2 (9.5.2-gbc8c3e @ /home/eliza/.emacs.d/straight/build/org/)]

2022-02-14 Thread Eliza Velasquez
Hello,

It seems like `org-icalendar-export-to-ics' fails to consider the
SCHEDULED and DEADLINE properties. Consider the following org file
`foo.org':

* foo
SCHEDULED: <2022-02-15 Tue>

When invoking `org-icalendar-export-to-ics', we get the following
`foo.ics' file.

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:test
PRODID:-//Eliza Velasquez//Emacs with Org mode//EN
X-WR-TIMEZONE:PST
X-WR-CALDESC:
CALSCALE:GREGORIAN
END:VCALENDAR

As you can see, there is no entry for `foo'. Changing the file so that
the timestamp is in the body rather than the SCHEDULED property (though
I'm not sure "property" is the correct term here, given that it's not a
PROPERTY)...

* foo
<2022-02-15 Tue>

...exports as expected.

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:test
PRODID:-//Eliza Velasquez//Emacs with Org mode//EN
X-WR-TIMEZONE:PST
X-WR-CALDESC:
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20220215T074144Z
UID:TS1-3d9795cd-8430-49dd-97d7-f1fcc10d814d
DTSTART;VALUE=DATE:20220215
DTEND;VALUE=DATE:20220216
SUMMARY:foo
DESCRIPTION:<2022-02-15 Tue>
CATEGORIES:test
END:VEVENT
END:VCALENDAR

I noticed this when trying to use org-caldav, and it seems some others
have run into this issue as well. At least, I'm pretty sure the two bugs
are caused by the same issue.
<https://github.com/dengste/org-caldav/issues/212>

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, 
cairo version 1.16.0)
Package: Org mode version 9.5.2 (9.5.2-gbc8c3e @ 
/home/eliza/.emacs.d/straight/build/org/)
--
Eliza




Re: [BUG] Bug: Footnotes break iCalendar export [9.4.6 (9.4.6-g069bcb @ /home/msi/.emacs.d/straight/build/org/)]

2021-11-19 Thread Nicolas Goaziou
Hello,

msi  writes:

> When I make the function "org-icalendar-combine-agenda-files", all it's
> ok. But, when I add a footnote, I have this in my .ics file :
>
> BEGIN:VEVENT.
> DTSTAMP:2026T101642Z.
> UID:SC-6a6cf716-f056-4116-a419-5f0e96b14fd9.
> DTSTART;VALUE=DATE:20220516.
> DTEND;VALUE=DATE:20220517.
> SUMMARY:S: Prehistoric Kingdom.
> CATEGORIES:5References(liensTextes),TODO.
> END:VEVENT
>
>
>
> Footnotes
> ─
>
> a footnote
>
> another
> END:VCALENDAR
>
> I think that is the same bug of this thread :
> https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01478.html

Fixed.

Thank you.

Regards,
-- 
Nicolas Goaziou



[BUG] Bug: Footnotes break iCalendar export [9.4.6 (9.4.6-g069bcb @ /home/msi/.emacs.d/straight/build/org/)]

2021-11-18 Thread msi


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hello,


When I make the function "org-icalendar-combine-agenda-files", all it's
ok. But, when I add a footnote, I have this in my .ics file :

BEGIN:VEVENT.
DTSTAMP:2026T101642Z.
UID:SC-6a6cf716-f056-4116-a419-5f0e96b14fd9.
DTSTART;VALUE=DATE:20220516.
DTEND;VALUE=DATE:20220517.
SUMMARY:S: Prehistoric Kingdom.
CATEGORIES:5References(liensTextes),TODO.
END:VEVENT



Footnotes
─

a footnote

another
END:VCALENDAR

I think that is the same bug of this thread :
https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01478.html

So I add too this line:
(footnote-definition . ignore)
in ox-ascii.el, but it doesn't works.

Thank you in advance




Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2020-09-19
Package: Org mode version 9.4.6 (9.4.6-g069bcb @ 
/home/msi/.emacs.d/straight/build/org/)



[BUG] Footnotes break iCalendar export [9.4.6 (9.4.6-g069bcb @ /home/msi/.emacs.d/straight/build/org/)]

2021-11-18 Thread msi


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hello,

I have some footnotes in my Org agenda files.
So I want to export my org agenda with this : 
org-icalendar-combine-agenda-files. Without footnotes, I don't have any
problem. But with, I have this in my .ics file.

SUMMARY:Hello
DESCRIPTION:<2012-04-20 Sat 15:00>
CATEGORIES:test
END:VEVENT



Footnotes
─

[1] which isn't very interesting

[2] which still isn't very interesting
END:VCALENDAR


It's, I think, the same problem of this thread :

https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01478.html

I try to add this :

(footnote-definition . ignore)

in

ox-ascii.el.

But, it doesn't works :/.

Thank you in advance.




Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2020-09-19
Package: Org mode version 9.4.6 (9.4.6-g069bcb @ 
/home/msi/.emacs.d/straight/build/org/)



Adjusting alarms in icalendar export

2021-06-15 Thread "Joshua O'Connor"
Hello!

I would like to have some more control over the alarms created by the
iCalendar export and was wondering if anyone has tried anything like
that, or has any surrounding thoughts?

Namely, I think it would be a nice feature if there could be some markup
(perhaps a property) that allows you to specify the number of
repetitions and delays between them.

I don't think implementing the full VALARM spec is worth it though, some
stuff like the AUDIO action just seems goofy to me.

Joshua



Re: behavior/docs of iCalendar export

2020-12-16 Thread Eric S Fraga
On Tuesday, 15 Dec 2020 at 16:37, Carson Chittom wrote:
> I've just started playing with the iCalendar export because eventually
> I want to keep everything in Org, to then get transformed and pushed
> to my CalDAV server, which then gets pushed to my phone.

You might like to try org-caldav-sync (available from melpa) if you ever
wish to have 2 way synchronisation.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.2-143-gc822c8



behavior/docs of iCalendar export

2020-12-15 Thread Carson Chittom
This is a very small thing, but it came up today for me, so I thought I'd 
mention it. (Org 9.4.2, for the record.)

I've just started playing with the iCalendar export because eventually I want 
to keep everything in Org, to then get transformed and pushed to my CalDAV 
server, which then gets pushed to my phone.  

So after reading the docs[1][2] I created a minimal org file, which as it 
happens only had a single time for the single event in it.  I tried to export 
via C-c C-e c f, and immediately got an error that 
org-agenda-default-appointment-duration wasn't set (which was perfectly true, I 
hadn't set it and it defaults to nil).  So after looking at that variable's 
documentation, just to make sure it was well-named and didn't do something 
strange, I set it and went on about my merry way.  As I say, a very small 
thing. I mention it only because it was slightly irritating that after actually 
taking the time to read the documentation, I still had to troubleshoot (if you 
want to call it that) briefly. 

All of which leads up to: my suggestion is that either that 
org-agenda-default-appointment-duration have an actual default value, or else 
that [2] should mention that one might want to set it.  


[1] https://orgmode.org/manual/Timestamps.html#Timestamps
[2] https://orgmode.org/manual/iCalendar-Export.html



Re: Multiply alerts for icalendar export

2020-02-13 Thread Mikhail Skorzhinskii
Fraga, Eric  writes:
> Noting, of course, that you can have multiple time stamps (active ones
> in this case) associated with a single heading.  I do this every so
> often.

Although it would be wonderful thing to have, but it does not affect
exported icalendar file. I was expecting that multiply time stamps will
result into multiply icalendar entries with different times, but instead
I got two entries with bottom time.

I.e. this:

#+begin_example
,* some entry
SCHEDULED: <2020-02-13 Thu 07:30>
SCHEDULED: <2020-02-13 Thu 07:20>
#+end_example

Will result into two icalendar entries:

1. some entry with time 07:20
2. some entry with time 07:20

Bastien  writes:
> Perhaps adding three different appointments to get three alerts is
> good enough?
>
> 2 cents of course...

Yes, I resolved this by having sub-headings with the reminders. This way
I liked it even more then just casually having multiply reminders.

1. I can name each reminder individually. This way it takes no effort to
undetrstand what this alarm is about.

2. Every heading can carry individual notes. And since these reminders
are time dependent, notes that are really relevant right now are more
accessible.

This is especially valuable when you're in hurry and don't have much
time to go through your notes. Just tap to the calendar entry and carry
on.

3. Since calendars are stored locally, you don't need internet to have
all this information and to recieve these reminders. (This is complain
about some city commuting applications and the way how push
notifications work).

4. For events that are often recurring this function is very helpful:
~(org-clone-subtree-with-time-shift)~ (aka ~C-c C-x c~). It fixes times
not only on top-most heading but in all sub-headings as well.

And unlike recurring timestamps, this way every event can have some
slight differences for this specific day: changes in time table,
location or even complete cancelation.

Here is an example for the reference. I'm trying to show most of the
possibilties of this approach.

#+begin_example
,* Flight to Wonderland :transport:
SCHEDULED: <2020-02-13 Thu 10:00-12:30>

Terminal 2

Bookin code: AABBCC

,** Train to airport

,*** Route S9
SCHEDULED: <2020-02-13 Thu 06:50>
,*** Route S9
SCHEDULED: <2020-02-13 Thu 07:10>

,** Bus to train station

,*** Bus 512 [bus stop: Fluffy road]
SCHEDULED: <2020-02-13 Thu 06:30>

,*** Bus 1024 [bus stop: Cozy park]
SCHEDULED: <2020-02-13 Thu 06:45>

,** Taxi from airport
SCHEDULED: <2020-02-13 Thu 12:30-13:30>
;; :LOCATION: will be exported as a special field and you can later click and 
choose which app to use: maps \ taxi app \ public transport app \ etc
:PROPERTIES:
:LOCATION: Кримс, Замок Красной Королевы, 12, кв. 7
:END:

Should be around 20€ \ 1400₽

Crims, Fortress of the Red Queen, 12, apt. 7

,** Lecture
SCHEDULED: <2020-02-13 Thu 14:00-17:00>
;; Phone numbers usually can be also clicked in most apps. Helpful if you don't 
want to pollute your phone book
Prof. Fortran 

Room 404
#+end_example



Re: Multiply alerts for icalendar export

2020-02-12 Thread Fraga, Eric
On Wednesday, 12 Feb 2020 at 09:46, Bastien wrote:
> Perhaps adding three different appointments to get three alerts is
> good enough?

Noting, of course, that you can have multiple time stamps (active ones
in this case) associated with a single heading.  I do this every so
often.
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-199-ga557cf



Re: Multiply alerts for icalendar export

2020-02-12 Thread Bastien
Hi Mikhail,

Mikhail Skorzhinskii  writes:

> I am happy with current functionality but in rare cases I'd like to have
> more reminders per entry. Like many other PIMs allows this
> today. E.g. I'd like to have at least 3 reminders for my flight
> appointments. So to be extra sure and do not to miss my plain :-)

Perhaps adding three different appointments to get three alerts is
good enough?

2 cents of course...

-- 
 Bastien



[O] Multiply alerts for icalendar export

2019-09-09 Thread Mikhail Skorzhinskii
Hi,

I am user of ox-icalendar package and I have a question about generating
reminders in icalendar files. Documentation says that proper way to
configure reminders is using org-icalendar-alarm-time variable and
setting APPT_WARNTIME property in cases when pre-entry customization
required.

I am happy with current functionality but in rare cases I'd like to have
more reminders per entry. Like many other PIMs allows this
today. E.g. I'd like to have at least 3 reminders for my flight
appointments. So to be extra sure and do not to miss my plain :-)

My reading of ox-icalendar code clearly indicates that there no easy way
to achieve that. It looks like ox-icalendar always generate only one
reminder or no reminders at all.

But I am not an expert of org-mode export engine and possibly there are
ways to do this? May be somehow extending this export engine?

Also may be there any thrid-party org to icalenadar export engines that
are a bit more flexible and configurable on that matter?

Mikhail Skorzhinskii



Re: [O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-18 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> Hey, now's the time to bring up something I've wanted to do for
> a while:

I think this deserves its own thread.

> adding support for per-entry timezones to the ical export. 

It sounds good.

> I've attached a draft patch that shows what I mean. Basically you give
> an entry a TIMEZONE property in the tz database format (eg
> "Europe/London") and it will pass that on to the DTSTART/DTEND
> properties.
>
> I suppose it would also be possible to have separate properties for
> start and end timezones, then we could do plane trips!

Right. But since Org doesn't support time zones, the usefulness may be
limited.

> +When optional argument TZ is non-nil, timezone data time will be
> +added to the timestamp.  It can be the string \"UTC\", to use UTC
> +time, or a string in the IANA TZ database
> +format (e.g. \"Europe/London\").  In either case, the value of
> +`org-icalendar-date-time-format' will be ignored."

I suggest to have symbol t as an equivalent to "UTC", for compatibility
with, e.g., ZONE in `format-time-string'.

Thank you for the work.


Regards,

-- 
Nicolas Goaziou



Re: [O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-17 Thread Eric Abrahamsen
Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Hello,
>
> Tobias Schlemmer <keinstein.jun...@gmail.com> writes:
>
>> for some reasons I need to control the visibility of individual entries
>> of my caldav calendars. I have implemented a small patch that passes the
>> `CLASS' propery to the iCalendar export:
>>
>> https://github.com/keinstein/org-mode/pull/1
>>
>> I'd like to have this patch integrated in the short term. It is mostly
>> done by cut and paste from the same file.
>
> Thank you!
>
> Could you send a patch on this mailing list using git's "format-patch"
> sub-command?
>
> Also, could you document the feature in org.texi.
>
>> For long term I think a configurable framework would be more useful:
>>
>> • It would be helpful to have a configuration variable that tells which
>> properties are passed more or less verbatim as iCalendar fields
>
> This doesn't sound too hard, if you have a list of such properties and
> are willing to document them.

Hey, now's the time to bring up something I've wanted to do for a while:
adding support for per-entry timezones to the ical export. I've attached
a draft patch that shows what I mean. Basically you give an entry a
TIMEZONE property in the tz database format (eg "Europe/London") and it
will pass that on to the DTSTART/DTEND properties.

I suppose it would also be possible to have separate properties for
start and end timezones, then we could do plane trips!

Further work would be necessary to pass this through org-caldav
correctly, but it's a first step.

If this works out, I'll do a proper commit with docs and all that.

Eric

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index ba7a62f8b..a955469b5 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -341,7 +341,7 @@ A headline is blocked when either
 		   (1- (length org-icalendar-date-time-format))) ?Z))
 
 (defvar org-agenda-default-appointment-duration) ; From org-agenda.el.
-(defun org-icalendar-convert-timestamp (timestamp keyword  end utc)
+(defun org-icalendar-convert-timestamp (timestamp keyword  end tz)
   "Convert TIMESTAMP to iCalendar format.
 
 TIMESTAMP is a timestamp object.  KEYWORD is added in front of
@@ -352,8 +352,11 @@ Also increase the hour by two (if time string contains a time),
 or the day by one (if it does not contain a time) when no
 explicit ending time is specified.
 
-When optional argument UTC is non-nil, time will be expressed in
-Universal Time, ignoring `org-icalendar-date-time-format'."
+When optional argument TZ is non-nil, timezone data time will be
+added to the timestamp.  It can be the string \"UTC\", to use UTC
+time, or a string in the IANA TZ database
+format (e.g. \"Europe/London\").  In either case, the value of
+`org-icalendar-date-time-format' will be ignored."
   (let* ((year-start (org-element-property :year-start timestamp))
 	 (year-end (org-element-property :year-end timestamp))
 	 (month-start (org-element-property :month-start timestamp))
@@ -387,8 +390,9 @@ Universal Time, ignoring `org-icalendar-date-time-format'."
 (concat
  keyword
  (format-time-string
-  (cond (utc ":%Y%m%dT%H%M%SZ")
+  (cond ((string-equal tz "UTC") ":%Y%m%dT%H%M%SZ")
 	((not with-time-p) ";VALUE=DATE:%Y%m%d")
+	((stringp tz) (concat ";TZID=" tz ":%Y%m%dT%H%M%S"))
 	(t (replace-regexp-in-string "%Z"
 	 org-icalendar-timezone
 	 org-icalendar-date-time-format
@@ -396,7 +400,10 @@ Universal Time, ignoring `org-icalendar-date-time-format'."
   ;; Convert timestamp into internal time in order to use
   ;; `format-time-string' and fix any mistake (i.e. MI >= 60).
   (encode-time 0 mi h d m y)
-  (and (or utc (and with-time-p (org-icalendar-use-UTC-date-time-p)))
+  (and (or (string-equal tz "UTC")
+	   (and (null tz)
+		with-time-p
+		(org-icalendar-use-UTC-date-time-p)))
 	   t)
 
 (defun org-icalendar-dtstamp ()
@@ -545,7 +552,8 @@ inlinetask within the section."
 			  contents 0 (min (length contents)
 	  org-icalendar-include-body
 		  (org-icalendar-include-body (org-trim contents)))
-	 (cat (org-icalendar-get-categories entry info)))
+	 (cat (org-icalendar-get-categories entry info))
+	 (tz (org-element-property :TIMEZONE entry)))
 	 (concat
 	  ;; Events: Delegate to `org-icalendar--vevent' to generate
 	  ;; "VEVENT" component from scheduled, deadline, or any
@@ -556,14 +564,14 @@ inlinetask within the section."
 		   org-icalendar-use-deadline)
 		 (org-icalendar--vevent
 		  entry deadline (concat "DL-" uid)
-		  (concat "DL: " summary) loc desc cat)))
+		  (concat "DL: " summary) loc desc cat tz)))
 	  (let 

Re: [O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-17 Thread Nicolas Goaziou
Hello,

Tobias Schlemmer <keinstein.jun...@gmail.com> writes:

> for some reasons I need to control the visibility of individual entries
> of my caldav calendars. I have implemented a small patch that passes the
> `CLASS' propery to the iCalendar export:
>
> https://github.com/keinstein/org-mode/pull/1
>
> I'd like to have this patch integrated in the short term. It is mostly
> done by cut and paste from the same file.

Thank you!

Could you send a patch on this mailing list using git's "format-patch"
sub-command?

Also, could you document the feature in org.texi.

> For long term I think a configurable framework would be more useful:
>
> • It would be helpful to have a configuration variable that tells which
> properties are passed more or less verbatim as iCalendar fields

This doesn't sound too hard, if you have a list of such properties and
are willing to document them.

> • It would be helpful to save some/all other fields with some prefix
> (X-ORG-MODE-…) in the calendar file/service. The prefix should be
> configurable as well as the list of saved properties.

What use-case do you have in mind ?

> • A mapping between org-mode properties and iCalendar fields could be
> helpful. Together with some default action all of the above could be
> realized with only two variables.

Could you elaborate a bit?


Regards,

-- 
Nicolas Goaziou



[O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-14 Thread Tobias Schlemmer
Hi,

for some reasons I need to control the visibility of individual entries
of my caldav calendars. I have implemented a small patch that passes the
`CLASS' propery to the iCalendar export:

https://github.com/keinstein/org-mode/pull/1

I'd like to have this patch integrated in the short term. It is mostly
done by cut and paste from the same file.

For long term I think a configurable framework would be more useful:

• It would be helpful to have a configuration variable that tells which
properties are passed more or less verbatim as iCalendar fields
• It would be helpful to save some/all other fields with some prefix
(X-ORG-MODE-…) in the calendar file/service. The prefix should be
configurable as well as the list of saved properties.
• A mapping between org-mode properties and iCalendar fields could be
helpful. Together with some default action all of the above could be
realized with only two variables.

I'm not familiar enough with Lisp to do the work by myself. So this is a
pure feature request.

Tobias

P.S.: Please add me to CC for all discussions as I'm not on the mailing
list.




Re: [O] iCalendar export and missed deadlines.

2017-08-11 Thread Nicolas Goaziou
Hello,

Michaël Cadilhac  writes:

> Is there a way to change this behavior so that the item is duplicated
> as long as it's not DONE?

I don't think so.

> If not, where is a good starting point in ox-icalendar.el to hack this
> in?

`org-icalendar-entry' dispatches a headline (ENTRY), to various workers
(e.g., `org-icalendar--vevent'). I would start from there.

Regards,

-- 
Nicolas Goaziou



[O] iCalendar export and missed deadlines.

2017-08-09 Thread Michaël Cadilhac
Hi there;

When I miss a deadline and scheduled todo, the org-agenda neatly
prints the item until I've turned it to DONE.  In iCalendar export, I
expect/wish that it is also the case when deadlines and scheduled
todos are exported as Events (I use VEVENT's as Google Calendar seems
to not support VTODO's).  By default, this is not the case, and the
todo is simply put in the past by the iCalendar export.

Is there a way to change this behavior so that the item is duplicated
as long as it's not DONE?  If not, where is a good starting point in
ox-icalendar.el to hack this in?

Thanks very much;
Cheers



[O] Batch org-icalendar-export-to-ics causes 'Variable binding depth exceeds max-specpdl-size'

2016-03-03 Thread Loris Bennett
Hi,

This is perhaps more of an Emacs issue than a problem with Org.  When
trying to export my Org calendar in batch mode, I get the following:

$ emacs /home/loris/org/gtd.org -batch -eval '(progn (package-initialize) 
(org-icalendar-export-to-ics))' --kill
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50bbdb.el (source)...
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...
Loading /etc/emacs/site-start.d/50emacs-jabber.el (source)...
Loading /usr/share/emacs/site-lisp/emacs-jabber/jabber-autoloads.el (source)...
Loading /etc/emacs/site-start.d/50ess.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Loading /etc/emacs/site-start.d/50yaml-mode.el (source)...
Loading /etc/emacs/site-start.d/51debian-el.el (source)...
Variable binding depth exceeds max-specpdl-size

This is with Org-mode version 8.3.4 on Emacs 24.4.1.

Any ideas?

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] Icalendar export and contacts

2016-02-25 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> Well, I had intended the link target to become visible but now that
> you ask, my primary concern was "not wrecking the export". I expect
> that tel links are only relevant to the vcard export, which handles
> them on its own terms (and which still works).
>
> So perhaps the patch is a bit premature. Any export function would
> need not to interfere with the vcard handling, which is why
> I refrained from adding one.

Since no one chimed in, I applied your patch. We'll see if something is
left to be done (e.g., defining a better export function).

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar export and contacts

2016-02-21 Thread Simon Thum
Well, I had intended the link target to become visible but now that you 
ask, my primary concern was "not wrecking the export". I expect that tel 
links are only relevant to the vcard export, which handles them on its 
own terms (and which still works).


So perhaps the patch is a bit premature. Any export function would need 
not to interfere with the vcard handling, which is why I refrained from 
adding one.


Cheers,

Simon

On 02/20/2016 01:55 PM, Nicolas Goaziou wrote:

Hello,

Simon Thum  writes:


would the attached patch be enough?


Thank you. I do not maintain org-contact.el, tho.


+;; Add the link type supported by org-contacts-strip-link
+;; so everything is in order for its use in Org files
+(org-add-link-type "tel")


This means that no export function is defined for "tel" links. Is it the
intended behaviour?

Regards,





Re: [O] Icalendar export and contacts

2016-02-20 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> would the attached patch be enough?

Thank you. I do not maintain org-contact.el, tho.

> +;; Add the link type supported by org-contacts-strip-link
> +;; so everything is in order for its use in Org files
> +(org-add-link-type "tel")

This means that no export function is defined for "tel" links. Is it the
intended behaviour?

Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar export and contacts

2016-02-14 Thread Simon Thum

Then let's just hope it got fixed by accident ;)

On 02/14/2016 05:49 PM, Nicolas Goaziou wrote:

Hello,

Simon Thum  writes:


Yes, but the exporter stalls on the [[fails]] link although it
resolves in org. Provided you're right the reasoning seems off.


I cannot reproduce it.

Regards,





Re: [O] Icalendar export and contacts

2016-02-14 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> Yes, but the exporter stalls on the [[fails]] link although it
> resolves in org. Provided you're right the reasoning seems off.

I cannot reproduce it.

Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar export and contacts

2016-02-13 Thread Simon Thum

On 02/12/2016 11:43 PM, Nicolas Goaziou wrote:

Hello,

Simon Thum  writes:


I noticed one more strange thing:

the new exporter fails to resolve links to radio targets (which are
slightly pointless but worked before). I'm not sure it needs fixing,
just thought I'd let you know.

I.e. <<>>   <>

[[works]]
[[fails]]


It doesn't need to be fixed. Radio targets bring their own linking
mechanism.


Yes, but the exporter stalls on the [[fails]] link although it resolves 
in org. Provided you're right the reasoning seems off.


Cheers,

Simon



Re: [O] Icalendar export and contacts

2016-02-13 Thread Simon Thum

Hi,

would the attached patch be enough?

Cheers,

Simon

On 02/12/2016 11:41 PM, Nicolas Goaziou wrote:

Hello,

Simon Thum  writes:


do you refer to master, maint or something else? I'm on 8.3 but am
considering an upgrade.


Development version = master.


Also I think org-contacts should declare the link type if it has
support for it (in the vcard export). I'd be happy to do that if it
can be done as a TINYCHANGE.


org-contacts is in contrib/ directory. TINYCHANGE tag is not required.

Regards,

>From fe28fb1eec7b8435f2ce9d30853fc3df707149c4 Mon Sep 17 00:00:00 2001
From: Simon Thum 
Date: Sat, 13 Feb 2016 17:20:05 +0100
Subject: [PATCH] Register tel link from org-contacts

This has the added benefit of not screwing up the exporter.

Signed-off-by: Simon Thum 
---
 contrib/lisp/org-contacts.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 3236a7c..1aa2cab 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -1113,6 +1113,11 @@ link string and return the pure link target."
 (setq colonpos (string-match ":" link))
 (if startpos (substring link (1+ colonpos)) link)
 
+;; Add the link type supported by org-contacts-strip-link
+;; so everything is in order for its use in Org files
+(org-add-link-type "tel")
+
+
 (defun org-contacts-split-property (string  separators omit-nulls)
   "Custom version of `split-string'.
 Split a property STRING into sub-strings bounded by matches
-- 
2.1.3



Re: [O] Icalendar export and contacts

2016-02-12 Thread Simon Thum

I noticed one more strange thing:

the new exporter fails to resolve links to radio targets (which are 
slightly pointless but worked before). I'm not sure it needs fixing, 
just thought I'd let you know.


I.e. <<>>   <>

[[works]]
[[fails]]

Cheers,

Simon

On 02/12/2016 12:01 AM, Nicolas Goaziou wrote:

Hello,

Simon Thum <simon.t...@gmx.de> writes:


Unfortunately I now get

user-error: Unable to resolve link "tel:xxx"

and the icalendar export full stops. Is there a way to declare the
link type (I am loading org-contact)


See `org-add-link-type' in particular with the export argument.


or avoid the exporter messing with it?


This is only possible in development version.

Regards,





Re: [O] Icalendar export and contacts

2016-02-12 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> do you refer to master, maint or something else? I'm on 8.3 but am
> considering an upgrade.

Development version = master.

> Also I think org-contacts should declare the link type if it has
> support for it (in the vcard export). I'd be happy to do that if it
> can be done as a TINYCHANGE.

org-contacts is in contrib/ directory. TINYCHANGE tag is not required.

Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar export and contacts

2016-02-12 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> I noticed one more strange thing:
>
> the new exporter fails to resolve links to radio targets (which are
> slightly pointless but worked before). I'm not sure it needs fixing,
> just thought I'd let you know.
>
> I.e. <<>>   <>
>
> [[works]]
> [[fails]]

It doesn't need to be fixed. Radio targets bring their own linking
mechanism.

Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar export and contacts

2016-02-11 Thread Simon Thum

Hi,

do you refer to master, maint or something else? I'm on 8.3 but am 
considering an upgrade.


Also I think org-contacts should declare the link type if it has support 
for it (in the vcard export). I'd be happy to do that if it can be done 
as a TINYCHANGE.


Cheers,

Simon

On 02/12/2016 12:01 AM, Nicolas Goaziou wrote:

Hello,

Simon Thum <simon.t...@gmx.de> writes:


Unfortunately I now get

user-error: Unable to resolve link "tel:xxx"

and the icalendar export full stops. Is there a way to declare the
link type (I am loading org-contact)


See `org-add-link-type' in particular with the export argument.


or avoid the exporter messing with it?


This is only possible in development version.

Regards,





[O] Icalendar export and contacts

2016-02-11 Thread Simon Thum

Hi all,

I'm using the icalendar exporter and the vcard export in org-contacts. I 
use the [[tel:xxx]] links as they help keep things clean.


Unfortunately I now get

user-error: Unable to resolve link "tel:xxx"

and the icalendar export full stops. Is there a way to declare the link 
type (I am loading org-contact) or avoid the exporter messing with it? I 
did not find such a possibility in the manual.


In my use case, synchronization,, I don't care too much about the links 
being "resolved", I care about my export not failing badly.


Thanks in advance,

Simon



Re: [O] Icalendar export and contacts

2016-02-11 Thread Nicolas Goaziou
Hello,

Simon Thum <simon.t...@gmx.de> writes:

> Unfortunately I now get
>
> user-error: Unable to resolve link "tel:xxx"
>
> and the icalendar export full stops. Is there a way to declare the
> link type (I am loading org-contact)

See `org-add-link-type' in particular with the export argument.

> or avoid the exporter messing with it?

This is only possible in development version.

Regards,

-- 
Nicolas Goaziou



[O] Bug?/performance issue in org-icalendar-export-current-agenda

2014-08-26 Thread Richard Lawrence
Hi all,

I pulled from master recently (for the first time since the spring), and
since the update, I have noticed a performance/lockup issue.  The
problem occurs when exporting an agenda view to iCalendar format.

My Emacs version is 23.4.1 and my Org version is 8.3beta (I am
currently on commit 767895...)
 
I have traced the problem down to a call to
`org-icalendar-export-current-agenda', though I don't know if the
problem is in this function or in another function called by it.
Somewhere during the execution of this function, Emacs goes to 100% CPU
usage (on one core) and memory usage starts growing until I kill the
process.
 
Here's what my setup looks like.  I have just one entry in
`org-agenda-custom-commands' that defines the files field.  It looks
like:

 (Z Export to iCalendar file tags +event|+appointment nil
  (~/Documents/website/public_html/lib/attachments/calendar.ics)

I normally only call this command via a cron job that exports my agenda
files to .ics, which until recently was working fine.  But I have
noticed I can reproduce the lockup interactively by building an agenda
view with this command, and then calling
`org-icalendar-export-current-agenda' on it (which is also what happens,
a few steps down the call chain, during the cron job).

I have run some tests by manually setting org-agenda-files, then
building this agenda and eval'ing

(org-icalendar-export-current-agenda /tmp/agenda.ics) 

in the agenda buffer.  The results:

1) Using just a simple three-entry test file, the export completes quickly
   and I don't see the lockup.  
2) Using an agenda file which contains plenty of real data
   (about 1000 lines) but no headlines tagged event or appointment
   (i.e., a file for which this agenda view is empty), the call to
   `org-icalendar-export-current-agenda' takes about 5 seconds to
   complete, even though there are no entries to export.  During those
   5 seconds, the Emacs process goes to 100% CPU usage.
3) Using a different agenda file (of about 4000 lines) which contains
   about 75 matching headlines, the call to
   `org-icalendar-export-current-agenda' does not complete within
   several minutes, during which time I see 100% CPU usage and rapid
   memory usage growth.  

So it looks to me like maybe some part of the export process uses
exponentially more time and memory, depending on the input, since a
minimal test case does not produce the problem.

What's the next step for debugging this?  Please let me know if I can
provide more information.  

Thanks! 

-- 
Best,
Richard




Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda

2014-08-26 Thread OSiUX
El mar, 26 ago 2014, Richard Lawrence decía:

 Hi all,
 
 I pulled from master recently (for the first time since the spring), and
 since the update, I have noticed a performance/lockup issue.  The
 problem occurs when exporting an agenda view to iCalendar format.
 
 My Emacs version is 23.4.1 and my Org version is 8.3beta (I am
 currently on commit 767895...)
  
 I have traced the problem down to a call to
 `org-icalendar-export-current-agenda', though I don't know if the
 problem is in this function or in another function called by it.
 Somewhere during the execution of this function, Emacs goes to 100% CPU
 usage (on one core) and memory usage starts growing until I kill the
 process.
  
 Here's what my setup looks like.  I have just one entry in
 `org-agenda-custom-commands' that defines the files field.  It looks
 like:
 
  (Z Export to iCalendar file tags +event|+appointment nil
   (~/Documents/website/public_html/lib/attachments/calendar.ics)
 
 I normally only call this command via a cron job that exports my agenda
 files to .ics, which until recently was working fine.  But I have
 noticed I can reproduce the lockup interactively by building an agenda
 view with this command, and then calling
 `org-icalendar-export-current-agenda' on it (which is also what happens,
 a few steps down the call chain, during the cron job).
 
 I have run some tests by manually setting org-agenda-files, then
 building this agenda and eval'ing
 
 (org-icalendar-export-current-agenda /tmp/agenda.ics) 
 
 in the agenda buffer.  The results:
 
 1) Using just a simple three-entry test file, the export completes quickly
and I don't see the lockup.  
 2) Using an agenda file which contains plenty of real data
(about 1000 lines) but no headlines tagged event or appointment
(i.e., a file for which this agenda view is empty), the call to
`org-icalendar-export-current-agenda' takes about 5 seconds to
complete, even though there are no entries to export.  During those
5 seconds, the Emacs process goes to 100% CPU usage.
 3) Using a different agenda file (of about 4000 lines) which contains
about 75 matching headlines, the call to
`org-icalendar-export-current-agenda' does not complete within
several minutes, during which time I see 100% CPU usage and rapid
memory usage growth.  
 
 So it looks to me like maybe some part of the export process uses
 exponentially more time and memory, depending on the input, since a
 minimal test case does not produce the problem.

 What's the next step for debugging this?  Please let me know if I can
 provide more information.  
 
 Thanks! 
 
 -- 
 Best,
 Richard

I use a bash script: =agenda-ascii= [0] to
reduce the list of file to export, first =grep=
current =year-month= pattern in the *.org
files:

  #+BEGIN_EXAMPLE
ORG_FILES=$($GREP -l $YEAR-$MONTH *.org)
echo $ORG_FILES

if [ $EXPORT_ICS = TRUE ]
then
for AGENDA in $(echo $ORG_FILES)
do
echo EXPORT $AGENDA ...
ARCHIVO=$DIR/$AGENDA
$EMACS --batch -q --directory=${DIR} --visit=${ARCHIVO} --eval 
'(org-export-icalendar-this-file)' /dev/null 21
done
fi
  #+END_EXAMPLE

Actually the process, cosume 42%-97% CPU, for
526 appoinments, takes 0m 30.396s

  Org-mode version 8.3beta (release_8.3beta-264-g7a5f3f
  GNU Emacs 24.3.1 (x86_64-pc-linux-gnu) of 2014-06-06 on barber, modified by 
Debian


[0] https://github.com/osiris/org-bash-utils/blob/master/agenda-ascii

-- 

::

  Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar
  DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C
  http://www.osiux.com.ar http://www.altermundi.net


signature.asc
Description: Digital signature


Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda

2014-08-26 Thread Nicolas Goaziou
Hello,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 I pulled from master recently (for the first time since the spring), and
 since the update, I have noticed a performance/lockup issue.  The
 problem occurs when exporting an agenda view to iCalendar format.

 My Emacs version is 23.4.1 and my Org version is 8.3beta (I am
 currently on commit 767895...)
  
 I have traced the problem down to a call to
 `org-icalendar-export-current-agenda', though I don't know if the
 problem is in this function or in another function called by it.
 Somewhere during the execution of this function, Emacs goes to 100% CPU
 usage (on one core) and memory usage starts growing until I kill the
 process.

Interestingly, I introduced a patch that should speed up this function
yesterday. You may want to update Org (the patch landed after 767895)
and try again.

If it is still suspiciously slow, please use profiler (`profiler-start')
and report the results here.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda

2014-08-26 Thread Richard Lawrence
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Interestingly, I introduced a patch that should speed up this function
 yesterday. You may want to update Org (the patch landed after 767895)
 and try again.

Indeed!  I just pulled again and the problem is gone.  The export runs
much more reasonably now, completing in a few seconds even with all my
agenda files in the mix.  Thanks!

Best,
Richard




Re: [O] How to Supress Block Eval on iCalendar Export

2014-01-03 Thread Bastien
Hi Daniel,

Daniel E. Doherty ded-...@ddoherty.net writes:

 Is there a way to supress running code block in the case of 'icalendar
 exports?

See `org-export-babel-evaluate'.

 I guess out of curiosity, is it a good idea to be executing them by
 default for this exporter?

Well, maybe for some people :)

-- 
 Bastien



[O] How to Supress Block Eval on iCalendar Export

2013-12-23 Thread Daniel E. Doherty

I sync my org calendar with my Android phone by periodically running a
process that exports my agenda files in iCal format.  I have this run
periodically, once every four hours or so.

My problem is that in combining the agenda files the exporter appears to
tangle the file, or in some way run the src blocks in the agenda files.

I don't want it to do this since I'm only interested in extracting the
appointments and TODOs.  It also sometimes throws up prompts about
saving a file modified by the processing (I'm guessing).  After a
weekend, I often have five to ten of these jobs stacked up waiting for
me to respond to the prompt.

Is there a way to supress running code block in the case of 'icalendar
exports?

I guess out of curiosity, is it a good idea to be executing them by
default for this exporter?

Regards,

--
Daniel E. Doherty
d...@ddoherty.net



Re: [O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-21 Thread Bastien
Hi Richard,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 I've been trying to get iCalendar export working with my agenda files
 again since upgrading to 8.0, and I've found that footnotes break the
 agenda export to .ics.  The problem is that a plain text version of the
 footnotes in the file ends up in the output floating loose---not
 wrapped by VEVENT tags or any other tags---resulting in an unparseable
 .ics file (at least according to Google Calendar).

I tried this patch but for some reason it does not work.

I did not look further, surely Nicolas has something that
works.  I agree footnotes should be turned off by default
for the .ics export.

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 49299b0..ceb2df0 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -266,6 +266,7 @@ re-read the iCalendar file.)
   '((:exclude-tags
  ICALENDAR_EXCLUDE_TAGS nil org-icalendar-exclude-tags split)
 (:with-timestamps nil  org-icalendar-with-timestamps)
+(:with-footnotes nil f nil)
 (:with-vtodo nil nil org-icalendar-include-todo)
 ;; The following property will be non-nil when export has been
 ;; started from org-agenda-mode.  In this case, any entry without

-- 
 Bastien


Re: [O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-21 Thread Richard Lawrence
Hi Bastien,

Bastien b...@gnu.org writes:

 Richard Lawrence richard.lawre...@berkeley.edu writes:

 I've been trying to get iCalendar export working with my agenda files
 again since upgrading to 8.0, and I've found that footnotes break the
 agenda export to .ics.  The problem is that a plain text version of the
 footnotes in the file ends up in the output floating loose---not
 wrapped by VEVENT tags or any other tags---resulting in an unparseable
 .ics file (at least according to Google Calendar).

 I tried this patch but for some reason it does not work.

This patch does not work for me, either, but thanks for trying!

 I did not look further, surely Nicolas has something that
 works.  I agree footnotes should be turned off by default
 for the .ics export.

I also tried the following modifications in the definition of the
icalendar backend, without much effect:

1) Adding (footnote-definition . ignore) and
(footnote-reference . ignore) to the :translate-alist

2) Adding (:filter-footnote-definition . ignore) and
(:filter-footnote-reference . ignore) to the :filters-alist

Both of these looked like they might work based on the
org-export-define-backend documentation, but the footnotes still show up
in the output.

[...further tinkering...]

It looks like the problem is this: the icalendar backend does not
specify a transcoder for the inner-template element.  Thus it falls
back to the org-ascii-inner-template transcoder, which appends footnotes
to the end of the exported content.

Thus, one solution is to define an org-icalendar-inner-template
transcoder which does nothing to modify the content (but overrides the
fallback); that is the solution I've used in the attached patch.

Best,
Richard

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 49299b0..39ba383 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -261,6 +261,7 @@ re-read the iCalendar file.)
 		 (inlinetask . ignore)
 		 (planning . ignore)
 		 (section . ignore)
+		 (inner-template . org-icalendar-inner-template)
 		 (template . org-icalendar-template))
   :options-alist
   '((:exclude-tags
@@ -747,7 +748,18 @@ END:VALARM\n
 		 (if (zerop alarm-time) org-icalendar-alarm-time alarm-time)
 
 
- Template
+ Templates
+
+(defun org-icalendar-inner-template (contents info)
+  Return inner contents string after iCalendar conversion.
+CONTENTS is the transcoded contents string. INFO is a plist used
+as a communication channel.
+
+This function just returns CONTENTS unchanged.  Its purpose is to
+override the inner-template transcoder of the ascii
+backend (`org-ascii-inner-template'), which appends footnotes
+that break the iCalendar format.
+  contents)
 
 (defun org-icalendar-template (contents info)
   Return complete document string after iCalendar conversion.


[O] [PATCH] tiny fixes in ox-ascii.el [was: Re: Bug: Footnotes break iCalendar export]

2013-04-21 Thread Richard Lawrence

Here is a patch for a couple of tiny issues I encountered in ox-ascii.el
while debugging ox-icalendar.el.  Explanation:

1) There is no function called `org-ascii-footnote-definition' (though
it looks like maybe there once was?), so I changed a reference to it to
`ignore' to be more explicit.

I'm not sure if this is the right thing to do -- maybe the point was to
let the user define such a function if she wishes?  That however would
be inconsistent with the comment that such definitions are ignored (see
below).

2) A tiny change to the comment explaining why there is no such
function: footnote definitions are ignored because they are compiled by
`org-ascii-inner-template', not `org-ascii-template'.

Best,
Richard

diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 2191539..4543c34 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -68,7 +68,7 @@
 (export-block . org-ascii-export-block)
 (export-snippet . org-ascii-export-snippet)
 (fixed-width . org-ascii-fixed-width)
-(footnote-definition . org-ascii-footnote-definition)
+(footnote-definition . ignore)
 (footnote-reference . org-ascii-footnote-reference)
 (headline . org-ascii-headline)
 (horizontal-rule . org-ascii-horizontal-rule)
@@ -1147,7 +1147,7 @@ CONTENTS is nil.  INFO is a plist holding contextual information.
  Footnote Definition
 
 ;; Footnote Definitions are ignored.  They are compiled at the end of
-;; the document, by `org-ascii-template'.
+;; the document, by `org-ascii-inner-template'.
 
 
  Footnote Reference


Re: [O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-21 Thread Nicolas Goaziou
Hello,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 I've been trying to get iCalendar export working with my agenda files
 again since upgrading to 8.0, and I've found that footnotes break the
 agenda export to .ics.  The problem is that a plain text version of the
 footnotes in the file ends up in the output floating loose---not
 wrapped by VEVENT tags or any other tags---resulting in an unparseable
 .ics file (at least according to Google Calendar).

 Here's a sample Org file to illustrate:

 * Entry 1
   This entry has some text with an inline footnote[fn:: which isn't
   very interesting]
 * Entry 2
   This entry has some text with an external footnote[fn:1]
 * Appointment with Someone
   2013-04-20 Sat 15:00
 * Footnotes
 [fn:1] which still isn't very interesting

This should be fixed. Thank you for the report.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-21 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:


 I've been trying to get iCalendar export working with my agenda files
 again since upgrading to 8.0, and I've found that footnotes break the
 agenda export to .ics.  The problem is that a plain text version of the
 footnotes in the file ends up in the output floating loose---not
 wrapped by VEVENT tags or any other tags---resulting in an unparseable
 .ics file (at least according to Google Calendar).

 I tried this patch but for some reason it does not work.

 I did not look further, surely Nicolas has something that
 works.  I agree footnotes should be turned off by default
 for the .ics export.

I went a bit further. Footnotes will always be ignored in ics export.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] tiny fixes in ox-ascii.el [was: Re: Bug: Footnotes break iCalendar export]

2013-04-21 Thread Nicolas Goaziou
Richard Lawrence richard.lawre...@berkeley.edu writes:

 Here is a patch for a couple of tiny issues I encountered in ox-ascii.el
 while debugging ox-icalendar.el.  Explanation:

I applied the changes. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-21 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 I went a bit further. Footnotes will always be ignored in ics
 export.

Great, thanks!

-- 
 Bastien



[O] Bug: Footnotes break iCalendar export [8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)]

2013-04-20 Thread Richard Lawrence

Hi Org maintainers,

I've been trying to get iCalendar export working with my agenda files
again since upgrading to 8.0, and I've found that footnotes break the
agenda export to .ics.  The problem is that a plain text version of the
footnotes in the file ends up in the output floating loose---not
wrapped by VEVENT tags or any other tags---resulting in an unparseable
.ics file (at least according to Google Calendar).

Here's a sample Org file to illustrate:

* Entry 1
  This entry has some text with an inline footnote[fn:: which isn't
  very interesting]
* Entry 2
  This entry has some text with an external footnote[fn:1]
* Appointment with Someone
  2013-04-20 Sat 15:00
* Footnotes
[fn:1] which still isn't very interesting

And here's the output I get when I export this
(via C-c a  a C-x C-w /tmp/test.ics):

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:OrgMode
PRODID:-//Richard Lawrence//Emacs with Org mode//EN
X-WR-TIMEZONE:America/Los_Angeles
X-WR-CALDESC:
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20130420T211153Z
UID:TS1-5b8f14ac-d380-437f-88dd-4ed0a4ebacb9
DTSTART:20130420T15
DTEND:20130420T17
SUMMARY:Appointment with Someone
DESCRIPTION:2013-04-20 Sat 15:00
CATEGORIES:test
END:VEVENT



Footnotes
─

[1] which isn't very interesting

[2] which still isn't very interesting
END:VCALENDAR

Note that I still seem to get the behavior when I restrict the export to
headlines matching certain tags.  In that case, even footnotes from
entries which should not be exported end up in the output, which seems
pretty strange.

It doesn't make much sense to me to have footnotes when exporting to a
calendar format, so is there any way to suppress exporting footnotes in
this case?

Thanks!

Best,
Richard



Emacs  : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-01-08 on murphy, modified by Debian
Package: Org-mode version 8.0.1 (release_8.0.1 @ /home/rwl/src/org-mode/lisp/)

current state:
==
(setq
 org-todo-keyword-faces '((WAITING . orange))
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-custom-commands '((r Reading list tags-todo +reading) (S . 
STUDY context searches) (Sf todo FIND) (Sp todo PRINT)
  (Sr todo READ) (Sn todo NOTES) (St 
tags-todo +STUDY) (P tags-todo +CAMPUS) (D tags-todo +COMPUTER)
  (H tags-todo +HOME) (E tags-todo 
ERRAND|BUY) (F tags +FREETIME) (X tags-todo +EXERCISE)
  (Z Export to iCalendar file tags 
event|appointment nil 
(~/Documents/website/public_html/lib/attachments/calendar.ics))
  )
 org-agenda-files '(~/Documents/philosophy/dissertation/tasks.org 
~/org/school.org ~/org/life.org ~/org/beer.org ~/org/food.org)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '((s School)
 (st Todo entry (file+olp ~/org/school.org 
Tasks Spring 2013) (file ~/org/templates/todo.txt) :prepend t)
 (sy Todo (from active region or kill ring) entry 
(file+olp ~/org/school.org Tasks Spring 2013)
  (file ~/org/templates/todo-with-yank.txt) :prepend 
t)
 (sl Todo (with link) entry (file+olp 
~/org/school.org Tasks Spring 2013) (file 
~/org/templates/todo-with-link.txt)
  :prepend t)
 (se Event entry (file+headline ~/org/school.org 
Events) (file ~/org/templates/event.txt) :prepend t)
 (sr Reading entry (file+olp ~/org/school.org 
Reading list) (file ~/org/templates/reading.txt) :prepend t)
 (sa Appointment entry (file+olp ~/org/school.org 
Tasks Spring 2013) (file ~/org/templates/appointment.txt) :prepend t)
 (sb Bookmark entry (file+olp ~/org/school.org 
Bookmarks) (file ~/org/templates/bookmark-school.txt))
 (sc Class entry (file+olp ~/org/school.org 
Semester Schedule Spring 2013 Classes) (file ~/org/templates/class.txt))
 (ss Semester entry (file+olp ~/org/school.org 
Semester Schedule) (file ~/org/templates/semester.txt) :prepend t)
 (d Dissertation)
 (dt Todo entry (file+olp 
~/Documents/philosophy/dissertation/tasks.org Tasks) (file 
~/org/templates/todo.txt) :prepend t)
 (de Event entry (file+headline 
~/Documents/philosophy/dissertation/tasks.org Events) (file 
~/org/templates/event.txt)
  :prepend t)
 (dr Reading entry (file+olp 
~/Documents/philosophy/dissertation/tasks.org Reading list)
  (file ~/org/templates/reading.txt) :prepend t)
 (da Appointment entry (file+olp 
~/Documents/philosophy/dissertation/tasks.org Tasks)
  (file ~/org/templates/appointment.txt) :prepend t)
 (db Bookmark entry (file

Re: [O] iCalendar export problem

2013-04-05 Thread Nicolas Goaziou
Hello,

Simon Thum simon.t...@gmx.de writes:

 However, that's not what DTSTAMP is for. Actually, it should be set to
 the date-time the export happens. At least, that's what they say:

 http://stackoverflow.com/questions/11594921/whats-the-difference-between-created-and-dtstamp-in-the-icalendar-format

 Changing that probably does not help my problem, but seems better than
 the cooked-up values now ending up in DTSTAMP. I could not see any
 other candidate problems, though the analysis is weak so far.

Thank you for the report.

I pushed a fix for the DTSTAMP value. Is it better now?


Regards,

-- 
Nicolas Goaziou



[O] iCalendar export problem

2013-04-04 Thread Simon Thum

Hi all,

I have a strange problem that seems related to the iCalendar exporter.

I have an event which has the date spec

   2013-02-07 Th 12:00-14:00 +1w

but shows up on 13:00 my phone calendar (fed by ox-icalendar), CEST. Fun 
thing is, I did not experience lag with other entries.


The org entry becomes:

BEGIN:VEVENT
DTSTAMP:20130207T11Z
UID:TS1-d36d5eb9-e2db-42a3-866f-7442becadef0
DTSTART:20130207T12
DTEND:20130207T14
RRULE:FREQ=WEEKLY;INTERVAL=1
SUMMARY:Brown Bag Meeting
DESCRIPTION:Location: R 103\n\nRecurs: 2013-02-07 Do 12:00 
+1w–2013-02-07 Do 14:00 +1w ...


Another one (shown right this time) is:

BEGIN:VEVENT
DTSTAMP:20130404T15Z
UID:TS1-441e317c-7b52-4910-bbd3-0949a5c1bdd7
DTSTART:20130404T17
DTEND:20130404T19

The difference seems to be the DTSTAMP which is correctly aligned with 
DTSTART.


However, that's not what DTSTAMP is for. Actually, it should be set to 
the date-time the export happens. At least, that's what they say:


http://stackoverflow.com/questions/11594921/whats-the-difference-between-created-and-dtstamp-in-the-icalendar-format

Changing that probably does not help my problem, but seems better than 
the cooked-up values now ending up in DTSTAMP. I could not see any other 
candidate problems, though the analysis is weak so far.


Cheers,

Simon




[O] Icalendar-export, priorities missing, possible bug

2013-02-10 Thread Anders Johansson

Hi,
When I'm exporting to icalendar, the priorities of todo items (or 
perhaps any items) don't get carried through correctly. It always falls 
back to priority 5 (the default).


After doing some edebugging I found that

(string-match org-priority-regexp hd)   [org-icalendar.el:539]

never seems to match.

This might be because 'hd' is group 4 True headline from the matching 
done with 'org-complex-heading-regexp' whereas group 3 according to this 
variable's docstring should hold the Priority cookie.


I guess someone who has greater knowledge of the code could see if this 
is really the case and fix it.


I can provide more debugging output and examples if needed and if others 
can't reproduce this.


Greetings,
Anders Johansson




Re: [O] Icalendar-export, priorities missing, possible bug

2013-02-10 Thread Nicolas Goaziou
Hello,

Anders Johansson mejlaande...@gmail.com writes:

 When I'm exporting to icalendar, the priorities of todo items (or
 perhaps any items) don't get carried through correctly. It always
 falls back to priority 5 (the default).

 After doing some edebugging I found that

 (string-match org-priority-regexp hd)   [org-icalendar.el:539]

 never seems to match.

 This might be because 'hd' is group 4 True headline from the
 matching done with 'org-complex-heading-regexp' whereas group
 3 according to this variable's docstring should hold the Priority
 cookie.

 I guess someone who has greater knowledge of the code could see if
 this is really the case and fix it.

 I can provide more debugging output and examples if needed and if
 others can't reproduce this.

iCalendar export back-end has been rewritten. It is accessible from the
git distribution of Org. I didn't check if that bug is still present
though.


Regards,

-- 
Nicolas Goaziou



Re: [O] Icalendar-export, priorities missing, possible bug

2013-02-10 Thread Anders Johansson

Hi,

2013-02-10 20:31, Nicolas Goaziou skrev:

Hello,

Anders Johansson mejlaande...@gmail.com writes:


When I'm exporting to icalendar, the priorities of todo items (or
perhaps any items) don't get carried through correctly. It always
falls back to priority 5 (the default).

After doing some edebugging I found that

 (string-match org-priority-regexp hd)   [org-icalendar.el:539]

never seems to match.

This might be because 'hd' is group 4 True headline from the
matching done with 'org-complex-heading-regexp' whereas group
3 according to this variable's docstring should hold the Priority
cookie.

I guess someone who has greater knowledge of the code could see if
this is really the case and fix it.

I can provide more debugging output and examples if needed and if
others can't reproduce this.

iCalendar export back-end has been rewritten. It is accessible from the
git distribution of Org. I didn't check if that bug is still present
though.


Regards,

Oh, that looks completely different. Taking a look at the newest git 
source, priority is now found like this (ox-icalendar.el)


 705  (let ((pri (or (org-element-property 
:priority entry)

 706 org-default-priority)))

and assuming this is consistent with the new framework it should of 
course work, but I haven't tested yet.


Funny that I found this problem now, using the less than a week old 
ELPA-package (20130204), when the new export framework was moved into 
core (commit 8dd2bf) just three days ago.


Greetings,
Anders Johansson



Re: [O] Wish: iCalendar export with free/busy only

2013-01-26 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 I'd love to have my agenda exported (for now I am using the snippet
 below[1]) to an ics file which only contains (anonymized) events
 optionally still containing (a set of allowed) tags.

The new iCalendar exporter allows filters -- so you should be able to
filter out the entries that you don't want.

Best,

-- 
 Bastien



Re: [O] Wish: iCalendar export with free/busy only

2013-01-26 Thread Karl Voit
* Bastien b...@altern.org wrote:
 Hi Karl,

Hi!

 Karl Voit devn...@karl-voit.at writes:

 I'd love to have my agenda exported (for now I am using the snippet
 below[1]) to an ics file which only contains (anonymized) events
 optionally still containing (a set of allowed) tags.

 The new iCalendar exporter allows filters -- so you should be able to
 filter out the entries that you don't want.

Cool feature! However, I don't want to filter out whole events, my
goal ist to replace detailed information with less detailed
information about my events.

In the meantime, I created [2] which filters a given ICS file
according to my (detailed) requirements. I very much like it so far.

  2. https://github.com/novoid/convert_iCal_to_free-busy-only
-- 
Karl Voit




[O] Wish: iCalendar export with free/busy only

2013-01-17 Thread Karl Voit
Hi!

I'd love to have my agenda exported (for now I am using the snippet
below[1]) to an ics file which only contains (anonymized) events
optionally still containing (a set of allowed) tags.

So an event like:

** Meeting with ClientX 2013-01-17 Thu 17:00-18:30 :ProjectY:@town:
:PROPERTIES:
:CREATED:  [2013-01-08 Tue 14:39]
:END:

Some notes about the event I want to keep private.

... should be exported like:

** (busy) @town 2013-01-17 Thu 17:00-18:30

... if @town is in the list of «allowed» tags. If no tag is
«allowed», the event should be exported like:

** (busy) 2013-01-17 Thu 17:00-18:30

... probably with a configurable string for «(busy)».


Currently, I can not give away the URL of my ics file because there
is too much private stuff in it. But a free/busy-only list without
all of my details, I am happy to spread out to my friends in order
to let them see, when I am available.

I do think that this has great advantages with a small or medium
effort to implement.



[1] (defun vk-export-agenda()
  Exports bi-monthly Org-mode agenda to agenda.ics file
  (interactive)
  (org-agenda-list nil nil 60)
  (org-agenda-write ~/org-mode/agenda.ics)

-- 
Karl Voit

Hallo, mein Name ist Web 2.0: Gib mir dein Adressbuch und lass mich Emails lesen




Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-24 Thread Friedrich Delgado
This is now also fixed, thanks!

Friedrich Delgado schrieb:
 However: If I (setq org-icalendar-use-plain-timestamp nil) as in my
 customisation, scheduled date-ranges are not exported at all (no
 matter what org-icalendar-use-scheduled is set to).

 ( 49905a566970541de76b6d49004c62e50c625a98 from this morning)

--
Friedrich Delgado frie...@nomaden.org
 TauPan on Ircnet and Freenode ;)



Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-21 Thread Bastien
Hi Friedrich,

Friedrich Delgado frie...@nomaden.org writes:

 Friedrich Delgado schrieb:
 confirmed, latest org does the right thing[TM]

 However: If I (setq org-icalendar-use-plain-timestamp nil) as in my
 customisation, scheduled date-ranges are not exported at all (no
 matter what org-icalendar-use-scheduled is set to).

This should be fixed now, let me know.  

Thanks,

-- 
 Bastien



Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-20 Thread Friedrich Delgado
confirmed, latest org does the right thing[TM]

Bastien schrieb:
 Hi Friedrich,

 Friedrich Delgado frie...@nomaden.org writes:

  If I have an org-file containing a todo with a scheduled date range, like
  this:
 
  ,[ foo.org ]
*** TODO Weekend with the lads
SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
  `
 
  and try to export it via org-export-icalendar-this-file, the resulting
  foo.ics will look like this

 With emacs -Q and latest Org, I get this:

   BEGIN:VCALENDAR
   VERSION:2.0
   X-WR-CALNAME:test
   PRODID:-//Bastien Guerry//Emacs with Org-mode//EN
   X-WR-TIMEZONE:CEST
   X-WR-CALDESC:nil
   CALSCALE:GREGORIAN
   BEGIN:VEVENT
   UID: TS-f16e36f0-7c1a-4690-b705-0aaa74d5835c
   DTSTART;VALUE=DATE:20120504
   DTEND;VALUE=DATE:20120509
   SUMMARY:TODO Weekend with the lads
   CATEGORIES:test
   END:VEVENT
   END:VCALENDAR

 Can you clone the git repo and let me know if you get the same?

 Thanks,

 --
  Bastien
---Zitatende---

--
Friedrich Delgado frie...@nomaden.org
 TauPan on Ircnet and Freenode ;)



Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-20 Thread Friedrich Delgado
Friedrich Delgado schrieb:
 confirmed, latest org does the right thing[TM]

However: If I (setq org-icalendar-use-plain-timestamp nil) as in my
customisation, scheduled date-ranges are not exported at all (no
matter what org-icalendar-use-scheduled is set to).

( 49905a566970541de76b6d49004c62e50c625a98 from this morning)

 Bastien schrieb:
  Hi Friedrich,
  Friedrich Delgado frie...@nomaden.org writes:
 
   If I have an org-file containing a todo with a scheduled date range, like
   this:
  
   ,[ foo.org ]
 *** TODO Weekend with the lads
 SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
   `
  
   and try to export it via org-export-icalendar-this-file, the resulting
   foo.ics will look like this
 
  With emacs -Q and latest Org, I get this:
 
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:test
PRODID:-//Bastien Guerry//Emacs with Org-mode//EN
X-WR-TIMEZONE:CEST
X-WR-CALDESC:nil
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID: TS-f16e36f0-7c1a-4690-b705-0aaa74d5835c
DTSTART;VALUE=DATE:20120504
DTEND;VALUE=DATE:20120509
SUMMARY:TODO Weekend with the lads
CATEGORIES:test
END:VEVENT
END:VCALENDAR
 
  Can you clone the git repo and let me know if you get the same?

--
Friedrich Delgado frie...@nomaden.org
 TauPan on Ircnet and Freenode ;)



Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-19 Thread Bastien
Hi Friedrich,

Friedrich Delgado frie...@nomaden.org writes:

 If I have an org-file containing a todo with a scheduled date range, like
 this:

 ,[ foo.org ]
   *** TODO Weekend with the lads
   SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
 `

 and try to export it via org-export-icalendar-this-file, the resulting
 foo.ics will look like this

With emacs -Q and latest Org, I get this:

  BEGIN:VCALENDAR
  VERSION:2.0
  X-WR-CALNAME:test
  PRODID:-//Bastien Guerry//Emacs with Org-mode//EN
  X-WR-TIMEZONE:CEST
  X-WR-CALDESC:nil
  CALSCALE:GREGORIAN
  BEGIN:VEVENT
  UID: TS-f16e36f0-7c1a-4690-b705-0aaa74d5835c
  DTSTART;VALUE=DATE:20120504
  DTEND;VALUE=DATE:20120509
  SUMMARY:TODO Weekend with the lads
  CATEGORIES:test
  END:VEVENT
  END:VCALENDAR

Can you clone the git repo and let me know if you get the same?

Thanks,

-- 
 Bastien



Re: [O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-19 Thread Bastien
Hi Friedrich,

Friedrich Delgado frie...@nomaden.org writes:

 If I have an org-file containing a todo with a scheduled date range, like
 this:

 ,[ foo.org ]
   *** TODO Weekend with the lads
   SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
 `

 and try to export it via org-export-icalendar-this-file, the resulting
 foo.ics will look like this

With latest Org, the result for me looks like this:

,
| BEGIN:VCALENDAR
| VERSION:2.0
| X-WR-CALNAME:test
| PRODID:-//Bastien Guerry//Emacs with Org-mode//EN
| X-WR-TIMEZONE:Europe/Paris
| X-WR-CALDESC:nil
| CALSCALE:GREGORIAN
| BEGIN:VEVENT
| UID: TS-9832a245-f98b-43a4-bf1a-e2f5ccbc1df2
| DTSTART;VALUE=DATE:20120504
| DTEND;VALUE=DATE:20120509
| SUMMARY:TODO Weekend with the lads
| CATEGORIES:test
| END:VEVENT
| BEGIN:VTODO
| UID: TODO-9832a245-f98b-43a4-bf1a-e2f5ccbc1df2
| DTSTART:20120819T080800
| SUMMARY:Weekend with the lads
| CATEGORIES:test
| SEQUENCE:1
| PRIORITY:5
| STATUS:NEEDS-ACTION
| END:VTODO
| END:VCALENDAR
`

 See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668496


 Emacs  : GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2012-04-07 on trouble, modified by Debian
 Package: Org-mode version 7.8.11

 current state:
 ==
 (setq
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-speed-command-hook '(org-speed-command-default-hook 
 org-babel-speed-command-hook)
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
  org-tab-first-hook '(org-hide-block-toggle-maybe 
 org-src-native-tab-command-maybe
 org-babel-hide-result-toggle-maybe)
  org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
  org-confirm-shell-link-function 'yes-or-no-p
  org-export-first-hook '(org-beamer-initialize-open-trackers)
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-babel-pre-tangle-hook '(save-buffer)
  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-cycle-show-empty-lines 
 org-optimize-window-after-visibility-change)
  org-export-preprocess-before-normalizing-links-hook 
 '(org-remove-file-link-modifiers)
  org-mode-hook '(#[nil \300\301\302\303\304$\207
  [org-add-hook change-major-mode-hook org-show-block-all 
 append local]
  5]
#[nil \300\301\302\303\304$\207
  [org-add-hook change-major-mode-hook 
 org-babel-show-result-all append
   local]
  5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
 org-babel-execute-safely-maybe)
  org-confirm-elisp-link-function 'yes-or-no-p
  org-export-interblocks '((src org-babel-exp-non-block-elements))
  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
  org-occur-hook '(org-first-headline-recenter)
  org-export-preprocess-before-selecting-backend-code-hook 
 '(org-beamer-select-beamer-code)
  org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
  org-beamer-auto-fragile-frames
  org-beamer-place-default-actions-for-lists)
  org-metadown-hook '(org-babel-pop-to-session-maybe)
  org-export-blocks '((src org-babel-exp-src-block nil)
(export-comment org-export-blocks-format-comment t)
(ditaa org-export-blocks-format-ditaa nil)
(dot org-export-blocks-format-dot nil))
  )

-- 
 Bastien



[O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-17 Thread Friedrich Delgado
Hi!

If I have an org-file containing a todo with a scheduled date range, like
this:

,[ foo.org ]
  *** TODO Weekend with the lads
  SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
`

and try to export it via org-export-icalendar-this-file, the resulting
foo.ics will look like this

,[ foo.ics ]
  BEGIN:VCALENDAR
  VERSION:2.0
  X-WR-CALNAME:foo
  PRODID:-//Friedrich Delgado//Emacs with Org-mode//EN
  X-WR-TIMEZONE:Europe/Berlin
  X-WR-CALDESC:nil
  CALSCALE:GREGORIAN
  END:VCALENDAR
`

(i.e.: contain no appointments at all)

I think the responsible section of code may reside in
[[file:/usr/share/emacs23/site-lisp/org-mode/org-icalendar.el::defun%20org-print-icalendar-entries][Function:
 org-print-icalendar-entries]]

(org-link for your convenience, I hope), more specifically starting
with line 360:

,
  (if (looking-at re2)
  (progn
(goto-char (match-end 0))
(setq ts2 (match-string 1)
  inc (not (string-match [0-9]\\{1,2\\}:[0-9][0-9] ts2
(setq tmp (buffer-substring (max (point-min)
 (- pos org-ds-keyword-length))
pos)
  ts2 (if (string-match 
[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\) ts)
  (progn
(setq inc nil)
(replace-match \\1 t nil ts))
ts)
  deadlinep (string-match org-deadline-regexp tmp)
  scheduledp (string-match org-scheduled-regexp tmp)
  todo (org-get-todo-state)
  ;; donep (org-entry-is-done-p)
  ))
`

From my basic understanding of the code-flow it looks like re2 ==
(concat --?-?\\( org-ts-regexp \\)) is meant to match date-ranges,
but the code in the t branch of the if doesn't set deadlinep,
schedulep and todo, preventing all further processing of the entry.

But I may be wrong about the intentions of that function.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668496


Emacs  : GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-04-07 on trouble, modified by Debian
Package: Org-mode version 7.8.11

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append
local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 )
-- 
Friedrich Delgado frie...@nomaden.org
Laziness led to the invention of the most useful tools.



[O] Icalendar Export Broken in Git Version

2012-08-14 Thread Charles Philip Chan
Hello:

I tried to export an icalendar file with the current git version of
org-mode and it failed. I debugged it by loading org-install on a clean
Emacs with no init files and this is what I got:

,
| Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
|   byte-code(\306 \210\203\307 \310\216 *\204\311 
\210\312u\210\313\314\315\\210\316\224\317\316!\320 
\321\315\322\323\217@\324\325\315\326\!A\324\325\315\327\\206FB\205F\330 
\321B#C\324\325\315\331\332#!DE\203_\333 \202f\334 \206f\335 F\336 
G\325\315\337\\211H\205z\340H!H\341I\315\211JK\342L!\203\237\316\225b\210\317\343!M\344\345M\?\202\322e\nNZ]\n{O\344\346\\203\273\315\347\350\321\315$\202\274M\344PO\J\344QO\K\351
 
RS\204\346J\204\346K\204\346\313\314\321\\210T\203\372\352\315\353\354\f\\\203\372\313\314\321\\210J\203R\203\f\355U?\202\356U?\203\313\314\321\\210K\2038R\203+\355V?\2020\356V?\2038\313\314\321\\210J\203A\357\202KK\203J\360\202K\361W\344X@\\204_\344Y@\\203h\347\341\321\211@$@\344\362\\203\203\363\364\317\365\\366\A\367\317\343\RZ\202\206\341ZA\206\215@A\315\370\371\217[H\316V\204\243\\\316V\203\310[@\203\310[A@\203\310\365[8\203\310\372\373AH\206\302\\#I\202\313\341I)\344]A\\203\357\347\374\225\203\343\317\374A\\202\350\317\343A\\321\211A$AJ\203\372\375APAK\203\376APA\344\377\\203r^q\210\343\312O_\201`\316\343\201F\201aWFQ_%\210_\201aA\201b\261\210*\202\230\201c\372\201dWFP\201e\201f\\201eM\201g
#ZAC\203v\344\201hC\\203v\201iCP\202w\341D\203\217\344\201hD\\203\217\201jDP\202\220\341GI\n!\210\315\207
 [org-icalendar-verify-function save-match-data-internal pos ts tags inc 
org-agenda-skip match-data ((byte-code \301\302\\207 
[save-match-data-internal set-match-data evaporate] 3)) outline-next-heading -1 
throw :skip nil 0 match-string org-get-tags-at t (byte-code 
\300\301\302!!\207 [org-icalendar-cleanup-string org-get-heading t] 3) 
((error (throw :skip nil))) org-icalendar-cleanup-string org-entry-get 
SUMMARY DESCRIPTION org-get-entry LOCATION selective org-id-get-create 
org-id-get org-id-new org-export-get-categories APPT_WARNTIME 
string-to-number  looking-at 1 string-match [0-9]\\{1,2\\}:[0-9][0-9] 
[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\) replace-match \\1 
org-get-todo-state delq mapcar #[(x)    \235\207 [x org-export-exclude-tags] 
2] event-if-todo event-if-not-todo DL- SC- TS- ...] 13)
|   org-print-icalendar-entries(nil)
|   byte-code(\306!\210\307!q\210
\204$\310\n!\311\312!!\313Q\307\f!rq\210\314 
\210)\206.\311\312!!\2119\203;\315! \203V\204[\316\211\203[\317 
!\210\202[\317!\210\320 !\210   \203h!\203l\204\236
\203|\\203|\321\322!\210\323 \210\324 \210q\210\325\326!\210\327 
\210\325\330!\210\331\332!\203\236\247\203\236\333!\210)\306\207 [file 
combine dir buffer-file-name ical-file ical-buffer org-check-agenda-file 
org-get-agenda-file-buffer file-name-as-directory file-name-sans-extension 
file-name-nondirectory .ics erase-buffer symbol-name t 
org-start-icalendar-file org-print-icalendar-entries require org-bbdb 
org-bbdb-anniv-export-ical org-finish-icalendar-file run-hooks 
org-before-save-iCalendar-file-hook save-buffer 
org-after-save-iCalendar-file-hook boundp org-wait sit-for org-category 
category standard-output started org-icalendar-combined-name files 
org-icalendar-include-bbdb-anniversaries] 5)
|   org-export-icalendar(nil /home/hoor/Desktop/Projects/plans/test.org)
|   org-export-icalendar-this-file()
|   call-interactively(org-export-icalendar-this-file record nil)
|   command-execute(org-export-icalendar-this-file record)
|   execute-extended-command(nil org-export-icalendar-this-file)
|   call-interactively(execute-extended-command nil nil)
`

If I replace org-icalendar with the version that comes with my Emacs
24.1.50.1 everything works.

Thanks,
Charles

-- 
If you want to travel around the world and be invited to speak at a lot
of different places, just write a Unix operating system.
(By Linus Torvalds)



Re: [O] Icalendar Export Broken in Git Version

2012-08-14 Thread Bastien
Hi Charles,

Charles Philip Chan cpc...@bell.net writes:

 I tried to export an icalendar file with the current git version of
 org-mode and it failed. I debugged it by loading org-install on a clean
 Emacs with no init files and this is what I got:

Fixed, thanks for reporting this.

-- 
 Bastien



Re: [O] Icalendar Export Broken in Git Version

2012-08-14 Thread Nick Dokos
Charles Philip Chan cpc...@bell.net wrote:

 Hello:
 
 I tried to export an icalendar file with the current git version of
 org-mode and it failed. I debugged it by loading org-install on a clean
 Emacs with no init files and this is what I got:
 
 ,
 | Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
 |   ...
 |   org-print-icalendar-entries(nil)
 |   ...
 |   org-export-icalendar(nil /home/hoor/Desktop/Projects/plans/test.org)
 |   org-export-icalendar-this-file()
 |   call-interactively(org-export-icalendar-this-file record nil)
 |   command-execute(org-export-icalendar-this-file record)
 |   execute-extended-command(nil org-export-icalendar-this-file)
 |   call-interactively(execute-extended-command nil nil)
 `
 
 If I replace org-icalendar with the version that comes with my Emacs
 24.1.50.1 everything works.
 

There are only two recent commits against org-icalendar. The second one
mentions org-print-icalendar-entries, so I bet that's the culprit :-)

,
| commit 2cd498e16ddb8d321c2ab6e4fac18733b500
| Author: Bastien Guerry b...@altern.org
| Date:   Sun Aug 5 18:59:51 2012 +0200
| 
| Fix two compiler warnings.
| 
| commit 216768531f2661c4b1890eef6454f58e6cb8a241
| Author: Bastien Guerry b...@altern.org
| Date:   Sun Aug 5 11:30:23 2012 +0200
| 
| org-icalendar.el: Let APPT_WARNTIME take precedence over 
̀org-icalendar-alarm-time'.
| 
| * org-icalendar.el (org-print-icalendar-entries): Let
| APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
`

For future reference, if you can reproduce the problem with *uncompiled* 
org-mode,
the backtrace is going to be much more readable (no byte code hieroglyphics). 
Just
something to keep in mind.

Nick





Re: [O] Icalendar Export Broken in Git Version

2012-08-14 Thread Charles Philip Chan
Nick Dokos nicholas.do...@hp.com writes:

Hi Nick:

Thanks, Bastien already fixed it.

 There are only two recent commits against org-icalendar. The second
 one mentions org-print-icalendar-entries, so I bet that's the culprit
 :-)

I figured that it was that commit too when I grepped the git log. :-)

 For future reference, if you can reproduce the problem with
 *uncompiled* org-mode, the backtrace is going to be much more readable
 (no byte code hieroglyphics). Just something to keep in mind.

Thanks, I didn't know that.

Charles

-- 
If you want to travel around the world and be invited to speak at a lot
of different places, just write a Unix operating system.
(By Linus Torvalds)


pgpWkIFdtMEqf.pgp
Description: PGP signature


Re: [O] N/A; icalendar export doesn't guarantee unique UIDs

2012-05-10 Thread Tassilo Horn
Tassilo Horn th...@fastmail.fm writes:

 For example, I have entries like

 *** Meeting with Max
 :PROPERTIES:
 :ID:   e1c32cb4-bd1f-4302-8067-1723d1958a88
 :END:
 2012-03-13 Tue 12:00-13:00
 2012-03-21 Wed 15:00-16:00
 2012-03-29 Thu 10:00-11:00
 2012-04-10 Tue 12:00-13:00
 2012-04-18 Wed 11:00-11:30
 2012-04-25 Wed 10:00-11:00
 2012-05-10 Thu 12:00-13:00

 They should show up at any date/time listed there.  That's true for the
 org agenda with `org-agenda-skip-additional-timestamps-same-entry' set
 to nil.  The icalendar export also creates multiple VEVENTS for the
 above org entry, *but they all have the same UID* (which is strictly
 VERBOTEN by the icalendar spec).  The result is that the google calendar
 only shows one appointment, and that seems to be arbitrary.  In the
 example above, it shows the meeting on 2012-04-18.

Another very related topic: Even when ignoring entries with multiple
timestamps, every icalendar item (VTODO, VEVENT, VJOURNAL) must have a
SEQUENCE number that has to be incremented when an entry changes
significantly (start, end, due, ..., see RFC 2445: 4.8.7.4).

I've read in the google calendar help group, that the google calendar
won't refresh items for which the UID is already known and the SEQUENCE
number didn't increase...

Bye,
Tassilo




[O] N/A; icalendar export doesn't guarantee unique UIDs

2012-05-09 Thread Tassilo Horn

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I use the icalendar export to feed my schedule into the google calendar
(only one-way: Org - Google).  Basically that works fine (except for
google not understanding Umlauts...), but there's a big problem with
entries that contain more than one timestamp.

For example, I have entries like

*** Meeting with Max
:PROPERTIES:
:ID:   e1c32cb4-bd1f-4302-8067-1723d1958a88
:END:
2012-03-13 Tue 12:00-13:00
2012-03-21 Wed 15:00-16:00
2012-03-29 Thu 10:00-11:00
2012-04-10 Tue 12:00-13:00
2012-04-18 Wed 11:00-11:30
2012-04-25 Wed 10:00-11:00
2012-05-10 Thu 12:00-13:00

They should show up at any date/time listed there.  That's true for the
org agenda with `org-agenda-skip-additional-timestamps-same-entry' set
to nil.  The icalendar export also creates multiple VEVENTS for the
above org entry, *but they all have the same UID* (which is strictly
VERBOTEN by the icalendar spec).  The result is that the google calendar
only shows one appointment, and that seems to be arbitrary.  In the
example above, it shows the meeting on 2012-04-18.

Bye,
Tassilo

Emacs  : GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu)
 of 2012-05-07 on thinkpad
Package: N/A

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 outline-minor-mode-hook '(th-outline-minor-mode-init)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-gnus-prefer-web-links t
 org-special-ctrl-k t
 org-occur-hook '(org-first-headline-recenter)
 org-src-tab-acts-natively t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-icalendar-include-todo t
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-log-done 'time
 org-confirm-shell-link-function 'yes-or-no-p
 org-complete-tags-always-offer-all-agenda-tags t
 org-finalize-agenda-hook '(th-org-agenda-to-appt)
 org-columns-default-format %50ITEM %TODO %ALLTAGS %SCHEDULED %DEADLINE
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-agenda-restore-windows-after-quit t
 org-special-ctrl-a/e 'reversed
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-agenda-custom-commands '((n Next 21 days agenda 
   ((org-agenda-span 21)))
  (^ Calfw Month Calendar
   th-calfw-open-calendar)
  )
 org-return-follows-link t
 org-agenda-time-leading-zero t
 org-capture-templates '((n NORMAL entry
  (file /home/horn/Repos/org/remember.org)
  * %?\n  :PROPERTIES:\n  :created: %U\n  :link: %a\n  
:END:\n %i)
 (t TODO entry
  (file /home/horn/Repos/org/remember.org)
  * TODO %?\n  :PROPERTIES:\n  :created: %U\n  :link: 
%a\n  :END:\n  %i)
 (i IDEA entry
  (file /home/horn/Repos/org/remember.org)
  * IDEA %?\n  :PROPERTIES:\n  :created: %U\n  :link: 
%a\n  :END:\n  %i)
 )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-icalendar-include-body t
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(th-org-mode-init
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-refile-targets '((org-agenda-files :maxlevel . 5))
 org-attach-method 'mv
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-refile-use-outline-path 'file
 org-directory /home/horn/Repos/org
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org

[O] icalendar export skips todos with a scheduled time-range

2012-04-12 Thread Sébastien Delafond
Hello,

From Debian bug #668496[0]:

  If I have an org-file containing a todo with a scheduled date range, like
  this:

  ,[ foo.org ]
*** TODO Weekend with the lads
SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
  `

  and try to export it via org-export-icalendar-this-file, the resulting
  foo.ics will look like this

  ,[ foo.ics ]
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:foo
PRODID:-//Friedrich Delgado//Emacs with Org-mode//EN
X-WR-TIMEZONE:Europe/Berlin
X-WR-CALDESC:nil
CALSCALE:GREGORIAN
END:VCALENDAR
  `

  (i.e.: contain no appointments at all)

  I think the responsible section of code may reside in
  /usr/share/emacs23/site-lisp/org-mode/org-icalendar.el, line 360:

  ,
(if (looking-at re2)
(progn
  (goto-char (match-end 0))
  (setq ts2 (match-string 1)
inc (not (string-match [0-9]\\{1,2\\}:[0-9][0-9] ts2
  (setq tmp (buffer-substring (max (point-min)
   (- pos org-ds-keyword-length))
  pos)
ts2 (if (string-match 
[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\) ts)
(progn
  (setq inc nil)
  (replace-match \\1 t nil ts))
  ts)
deadlinep (string-match org-deadline-regexp tmp)
scheduledp (string-match org-scheduled-regexp tmp)
todo (org-get-todo-state)
;; donep (org-entry-is-done-p)
))
  `

  From my basic understanding of the code-flow it looks like re2 ==
  (concat --?-?\\( org-ts-regexp \\)) is meant to match date-ranges,
  but the code in the t branch of the if doesn't set deadlinep,
  schedulep and todo, preventing all further processing of the entry.
  But I may be wrong about the intentions of that function.


Cheers,

--Seb

[0] http://bugs.debian.org/668496




Re: [O] iCalendar export

2011-07-25 Thread Arun Persaud
Hi

 And have anyone got this information to their mobile devices? Android?

I do a simple two-way sync (well, kind of two-way) using the method
described here:

http://orgmode.org/worg/org-tutorials/org-google-sync.html

ARUN



Re: [O] iCalendar export

2011-07-21 Thread Bastien
Tassilo Horn tass...@member.fsf.org writes:

 And have anyone got this information to their mobile devices? Android?

 Well, I have it there using the Google Calendar app.  It's ok to see my
 appointments in some graphical read-only view, but nothing more...

I use some .ics files the same way Tassilo does.

It's convenient to share with others.

-- 
 Bastien



[O] iCalendar export

2011-07-20 Thread Gustav Wikström
Hello!

I like the feature that TODO-items and calendar-items can be exportet to an
iCalendar file. But one thing bugs me, I'm having trouble finding suitable
software that supports the iCalendar-standard with vtodo items...

So my question to this newsgroup is; If you use the iCalendar export
function, what software do you use to view this information? And have anyone
got this information to their mobile devices? Android? Having this
information on the go would be killer...

Regards
Gustav


Re: [O] iCalendar export

2011-07-20 Thread Tassilo Horn
Gustav Wikström gustav.e...@gmail.com writes:

Hi Gustav,

 So my question to this newsgroup is; If you use the iCalendar export
 function, what software do you use to view this information?

Yeah, I convert to ical files on save, and there's some cron job that
copies these files to some webpage.  From there, I import into Google
Calendar.  But that doesn't show todos of imported ical files and has
major encoding issues with german umlauts and so on.

 And have anyone got this information to their mobile devices? Android?

Well, I have it there using the Google Calendar app.  It's ok to see my
appointments in some graphical read-only view, but nothing more...

Bye,
Tassilo




Re: [Orgmode] patch: add event reminders to iCalendar export

2010-07-21 Thread Carsten Dominik

Hi Eric,

this code is not in Org mode.

Thanks!

- Carsten

On Jul 11, 2010, at 12:26 AM, Eric S Fraga wrote:


Carsten et al.,

Okay, I've tried following the instructions for submitting patches.
I've learned more git than I thought I needed the past few days... ;-)

Anyway, I've uploaded my changes to

git://github.com/ericsfraga/esf-org.git

under branch icalalarm assuming I've done things correctly.  Please
do let me know if I should have done anything differently.

The changes are to allow timed events exported with an alarm reminder
if the variable org-icalendar-alarm-time is non-zero (defaults to 0 so
that default behaviour remains as it was before).

Thanks,
eric
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: patch: add event reminders to iCalendar export

2010-07-21 Thread Bernt Hansen
Carsten Dominik carsten.domi...@gmail.com writes:

 this code is not in Org mode.
   now
   ^^^

-Bernt

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] patch: add event reminders to iCalendar export

2010-07-11 Thread Carsten Dominik


On Jul 11, 2010, at 12:26 AM, Eric S Fraga wrote:


Carsten et al.,

Okay, I've tried following the instructions for submitting patches.
I've learned more git than I thought I needed the past few days... ;-)

Anyway, I've uploaded my changes to

git://github.com/ericsfraga/esf-org.git

under branch icalalarm assuming I've done things correctly.  Please
do let me know if I should have done anything differently.

The changes are to allow timed events exported with an alarm reminder
if the variable org-icalendar-alarm-time is non-zero (defaults to 0 so
that default behaviour remains as it was before).


Eric, this is great, thanks - I will look at the after the release.

- Carsten



Thanks,
eric
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] patch: add event reminders to iCalendar export

2010-07-10 Thread Eric S Fraga
Carsten et al.,

Okay, I've tried following the instructions for submitting patches.
I've learned more git than I thought I needed the past few days... ;-) 

Anyway, I've uploaded my changes to

git://github.com/ericsfraga/esf-org.git

under branch icalalarm assuming I've done things correctly.  Please
do let me know if I should have done anything differently.

The changes are to allow timed events exported with an alarm reminder
if the variable org-icalendar-alarm-time is non-zero (defaults to 0 so
that default behaviour remains as it was before).

Thanks,
eric
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug: iCalendar export creates VTODO *and* VEVENT for TODO entries with timestamp [6.36trans (release_6.36.158.g1378)]

2010-06-04 Thread Tassilo Horn

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Hi all,

I really like the iCalendar export.  I'm using that to export all my
agenda files when I save them, and import the ics files in KOrganizer,
so that I also have a visual agenda.

But there's one thing which might be a bug.  I have this TODO entry:

*** TODO Einteilung für Nacht der Informatik machen
2010-06-08 Tue

When I export the file containing that entry to iCalendar, what I get is
one VTODO with SUMMARY Einteilung für Nacht der Informatik machen,
which has no due date.  Additionally, there's one VEVENT on 2010-06-08
with SUMMARY TODO Einteilung für Nacht der Informatik machen.

If I set that date as DEADLINE, there's only one VTODO appearing on the
deadline date.  But for simple, short tasks that have to be done on a
given date, I prefer not to use DEADLINE, so that it doesn't show up on
previous days in the org agenda.

So IMHO, TODO entries should always become one VTODO each and no VEVENT,
and if there's no DEADLINE in org, then the normal date should be set as
DUE-date.

Bye,
Tassilo

Emacs  : GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.9)
 of 2010-06-03 on thinkpad
Package: Org-mode version 6.36trans (release_6.36.158.g1378)

current state:
==
(setq
 org-log-done 'time
 org-remember-default-headline 'bottom
 org-archive-default-command 'org-archive-set-tag
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-link-frame-setup '((vm . vm-visit-folder) (gnus . org-gnus-no-new-news)
(file . find-file-other-window))
 org-special-ctrl-a/e 'reversed
 org-agenda-files '(/home/horn/repos/org)
 org-agenda-include-diary t
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-gnus-prefer-web-links t
 org-fontify-whole-heading-line t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-attach-directory /home/horn/repos/org/attachments
 org-special-ctrl-k t
 org-agenda-time-leading-zero t
 org-agenda-restore-windows-after-quit t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-finalize-agenda-hook '(th-org-agenda-to-appt)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-todo-keywords '((sequence TODO(t) STARTED(s) DELEGATED(g) IDEA(i) 
| DONE(d)
  CANCELLED(c))
 )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-latex-packages-alist '(( a4wide nil))
 org-default-notes-file /home/horn/repos/org/remember.org
 org-directory /home/horn/repos/org
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '(th-org-mode-init
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 )
 org-refile-targets '((org-agenda-files :maxlevel . 5))
 org-complete-tags-always-offer-all-agenda-tags t
 org-return-follows-link t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-refile-use-outline-path 'file
 org-log-into-drawer LOGBOOK
 org-icalendar-categories '(all-tags category)
 org-agenda-mode-hook '(th-org-agenda-mode-init)
 org-enforce-todo-dependencies t
 org-refile-allow-creating-parent-nodes 'confirm
 org-occur-hook '(org-first-headline-recenter)
 org-icalendar-include-body t
 org-agenda-skip-additional-timestamps-same-entry nil
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-modules '(org-attach org-protocol org-id org-bbdb org-bibtex org-docview 
org-gnus org-info
   org-jsinfo org-irc org-w3m)
 org-columns-default-format %50ITEM %TODO %ALLTAGS %SCHEDULED %DEADLINE
 outline-minor-mode-hook '(th-outline-minor-mode-init)
 org-remember-templates '((NORMAL 110
   * %?\n  :PROPERTIES:\n  :created: %U\n  :link: %a\n 
 :END:\n  %i)
  (TODO 116
   * TODO %?\n  :PROPERTIES:\n  :created: %U\n  :link: 
%a\n  :END:\n  %i)
  (IDEA 105
   * IDEA %?\n  :PROPERTIES:\n  :created: %U\n  :link: 
%a\n  :END:\n  %i)
  (BROWSER 119
   * %:description :browser:\n  :PROPERTIES:\n  
:created: %U\n  :link: %:link\n  :END:\n  %c\n\n  %i

Re: [Orgmode] Bug: iCalendar export creates VTODO *and* VEVENT for TODO entries with timestamp [6.36trans (release_6.36.158.g1378)]

2010-06-04 Thread Carsten Dominik


On Jun 4, 2010, at 8:44 AM, Tassilo Horn wrote:



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?   
See


http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Hi all,

I really like the iCalendar export.  I'm using that to export all my
agenda files when I save them, and import the ics files in KOrganizer,
so that I also have a visual agenda.

But there's one thing which might be a bug.  I have this TODO entry:

*** TODO Einteilung für Nacht der Informatik machen
   2010-06-08 Tue


Hi Tassilo,  before looking deeper:  Why don't you schedule
the item for this day?

- Carsten



When I export the file containing that entry to iCalendar, what I  
get is

one VTODO with SUMMARY Einteilung für Nacht der Informatik machen,
which has no due date.  Additionally, there's one VEVENT on 2010-06-08
with SUMMARY TODO Einteilung für Nacht der Informatik machen.

If I set that date as DEADLINE, there's only one VTODO appearing on  
the

deadline date.  But for simple, short tasks that have to be done on a
given date, I prefer not to use DEADLINE, so that it doesn't show up  
on

previous days in the org agenda.

So IMHO, TODO entries should always become one VTODO each and no  
VEVENT,
and if there's no DEADLINE in org, then the normal date should be  
set as

DUE-date.

Bye,
Tassilo

Emacs  : GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version  
2.18.9)

of 2010-06-03 on thinkpad
Package: Org-mode version 6.36trans (release_6.36.158.g1378)

current state:
==
(setq
org-log-done 'time
org-remember-default-headline 'bottom
org-archive-default-command 'org-archive-set-tag
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial- 
vars)
org-link-frame-setup '((vm . vm-visit-folder) (gnus . org-gnus-no- 
new-news)

   (file . find-file-other-window))
org-special-ctrl-a/e 'reversed
org-agenda-files '(/home/horn/repos/org)
org-agenda-include-diary t
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-gnus-prefer-web-links t
org-fontify-whole-heading-line t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-attach-directory /home/horn/repos/org/attachments
org-special-ctrl-k t
org-agenda-time-leading-zero t
org-agenda-restore-windows-after-quit t
org-export-latex-format-toc-function 'org-export-latex-format-toc- 
default

org-export-preprocess-hook '(org-export-blocks-preprocess)
org-tab-first-hook '(org-hide-block-toggle-maybe)
org-src-mode-hook '(org-src-mode-configure-edit-buffer)
org-finalize-agenda-hook '(th-org-agenda-to-appt)
org-confirm-shell-link-function 'yes-or-no-p
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-todo-keywords '((sequence TODO(t) STARTED(s) DELEGATED(g)  
IDEA(i) | DONE(d)

 CANCELLED(c))
)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-export-latex-packages-alist '(( a4wide nil))
org-default-notes-file /home/horn/repos/org/remember.org
org-directory /home/horn/repos/org
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide- 
drawers
 org-cycle-show-empty-lines org-optimize-window- 
after-visibility-change)
org-export-preprocess-before-normalizing-links-hook '(org-remove- 
file-link-modifiers)

org-mode-hook '(th-org-mode-init
#[nil \300\301\302\303\304$\207
  [org-add-hook change-major-mode-hook org-show- 
block-all append local] 5]

)
org-refile-targets '((org-agenda-files :maxlevel . 5))
org-complete-tags-always-offer-all-agenda-tags t
org-return-follows-link t
org-confirm-elisp-link-function 'yes-or-no-p
org-refile-use-outline-path 'file
org-log-into-drawer LOGBOOK
org-icalendar-categories '(all-tags category)
org-agenda-mode-hook '(th-org-agenda-mode-init)
org-enforce-todo-dependencies t
org-refile-allow-creating-parent-nodes 'confirm
org-occur-hook '(org-first-headline-recenter)
org-icalendar-include-body t
org-agenda-skip-additional-timestamps-same-entry nil
org-export-preprocess-before-selecting-backend-code-hook '(org- 
beamer-select-beamer-code)
org-modules '(org-attach org-protocol org-id org-bbdb org-bibtex org- 
docview org-gnus org-info

  org-jsinfo org-irc org-w3m)
org-columns-default-format %50ITEM %TODO %ALLTAGS %SCHEDULED  
%DEADLINE

outline-minor-mode-hook '(th-outline-minor-mode-init)
org-remember-templates '((NORMAL 110
  * %?\n  :PROPERTIES:\n  :created: %U 
\n  :link: %a\n  :END:\n  %i)

 (TODO 116
  * TODO %?\n  :PROPERTIES:\n  :created: %U 
\n  :link: %a\n  :END:\n  %i)

 (IDEA 105
  * IDEA %?\n  :PROPERTIES:\n  :created: %U 
\n  :link: %a\n  :END:\n  %i)

 (BROWSER

Re: [Orgmode] Bug: iCalendar export creates VTODO *and* VEVENT for TODO entries with timestamp [6.36trans (release_6.36.158.g1378)]

2010-06-04 Thread Tassilo Horn
On Friday 04 June 2010 13:28:02 Carsten Dominik wrote:

Hi Carsten,

  But there's one thing which might be a bug.  I have this TODO entry:
 
  *** TODO Einteilung für Nacht der Informatik machen
 2010-06-08 Tue
 
 Hi Tassilo,  before looking deeper:  Why don't you schedule
 the item for this day?

Indeed, that would be more correct.  And after doing that, there're no
duplicate VEVENTs for TODOs.  Here's the VTODO I get:

--8---cut here---start-8---
BEGIN:VTODO
UID: TODO-148d89b6-7212-4ffc-94c6-48e27dc2af98
DTSTART;VALUE=DATE:20100608
SUMMARY:Einteilung für Nacht der Informatik machen
DESCRIPTION: normal: http://www.[snip]...
CATEGORIES:agebert,uni
SEQUENCE:1
PRIORITY:5
STATUS:NEEDS-ACTION
END:VTODO
--8---cut here---end---8---

The scheduled date is set as start time (DTSTART), which is correct as
far as I can tell.  The only problem is that KOrganizer doesn't show it
in its agenda.

It seems org behaves correctly, and there's only an issue with
KOrganizer.  So I'll knock on their doors. ;-)

Bye,
Tassilo

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Bug: iCalendar export creates VTODO *and* VEVENT for TODO entries with timestamp [6.36trans (release_6.36.158.g1378)]

2010-06-04 Thread Carsten Dominik


On Jun 4, 2010, at 2:10 PM, Tassilo Horn wrote:


On Friday 04 June 2010 13:28:02 Carsten Dominik wrote:

Hi Carsten,


But there's one thing which might be a bug.  I have this TODO entry:

*** TODO Einteilung für Nacht der Informatik machen
  2010-06-08 Tue


Hi Tassilo,  before looking deeper:  Why don't you schedule
the item for this day?


Indeed, that would be more correct.  And after doing that, there're no
duplicate VEVENTs for TODOs.  Here's the VTODO I get:

--8---cut here---start-8---
BEGIN:VTODO
UID: TODO-148d89b6-7212-4ffc-94c6-48e27dc2af98
DTSTART;VALUE=DATE:20100608
SUMMARY:Einteilung für Nacht der Informatik machen
DESCRIPTION: normal: http://www.[snip]...
CATEGORIES:agebert,uni
SEQUENCE:1
PRIORITY:5
STATUS:NEEDS-ACTION
END:VTODO
--8---cut here---end---8---

The scheduled date is set as start time (DTSTART), which is correct as
far as I can tell.  The only problem is that KOrganizer doesn't show  
it

in its agenda.

It seems org behaves correctly, and there's only an issue with
KOrganizer.  So I'll knock on their doors. ;-)


Great.

Another option would be of course a deadline with 0 warning days in  
there.  This would show up as a due date.


The start date is, I think, meant to make sure that the item will show  
up on that date in the TODO list.  But I have heard that not all  
organizers do support it.


OK, I consider this closed, unless you tell me otherwise.

- Carsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Bug: iCalendar export creates VTODO *and* VEVENT for TODO entries with timestamp [6.36trans (release_6.36.158.g1378)]

2010-06-04 Thread Tassilo Horn

  It seems org behaves correctly, and there's only an issue with
  KOrganizer.  So I'll knock on their doors. ;-)
 
 Great.

Haha, that sounds kinda maliciously. ;-)

 Another option would be of course a deadline with 0 warning days in
 there.  This would show up as a due date.

Yes, but org is the center of my planning game, and I refrain from
taking any extra burden just to make third-party apps happy.

After thinking about it, I concluded that I don't need any todos in the
KOrganizer views anyway, so now I only export events.

 OK, I consider this closed, unless you tell me otherwise.

Nope, it's dead and forgotten.  We'll never to touch that topic
anymore. :-)

Bye,
Tassilo

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


  1   2   >