diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-05 11:05:45 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-05 11:05:45 +0200 |
commit | d5690b62065ff9d9d4aa0fed4bd5dc98a79264fb (patch) | |
tree | 5f27044aa7c3716133aee2569f3280384e6f2d5c | |
parent | dd6be5d161d9d2434cdca3c283ae53c8d14db553 (diff) | |
parent | e67f0f29dec2978b6230a9885cf04c90647b03d0 (diff) | |
download | org-mode-d5690b62065ff9d9d4aa0fed4bd5dc98a79264fb.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-icalendar.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 966353a..9b0c5b4 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -879,22 +879,24 @@ The file is stored under the name chosen in "Export current agenda view to an iCalendar FILE. This function assumes major mode for current buffer is `org-agenda-mode'." - (let* ((org-export-use-babel) ; Don't evaluate Babel block. + (let* ((org-export-use-babel) ;don't evaluate Babel blocks (contents (org-export-string-as (with-output-to-string (save-excursion - (let ((p (point-min))) + (let ((p (point-min)) + (seen nil)) ;prevent duplicates (while (setq p (next-single-property-change p 'org-hd-marker)) (let ((m (get-text-property p 'org-hd-marker))) - (when m + (when (and m (not (memq m seen))) + (push m seen) (with-current-buffer (marker-buffer m) (org-with-wide-buffer (goto-char (marker-position m)) (princ (org-element-normalize-string - (buffer-substring - (point) (progn (outline-next-heading) (point))))))))) + (buffer-substring (point) + (org-entry-end-position)))))))) (forward-line))))) 'icalendar t '(:ascii-charset utf-8 :ascii-links-to-notes nil |