From: Paul R <paul.r.ml@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug in iCalendar export
Date: Wed, 28 May 2008 23:02:37 +0200 [thread overview]
Message-ID: <87iqwyf8gi.fsf@gmail.com> (raw)
In-Reply-To: <854.1212005012@alphaville.zko.hp.com> (Nick Dokos's message of "Wed\, 28 May 2008 16\:03\:32 -0400")
Nick Dokos <nicholas.dokos@hp.com> writes:
You have some faulty site-lisp code provided by debian emacs packages.
Because it was the Nth bug I had to track down due to the way debian
handles site-lisp, I just decided to get rid, for good, of debian
emacs packages, and do everything by hand. So I'm sorry to tell you
that I can't tell what line is faulty this time. But I can tell, for
sure, that it lives in debian site-lisp. Good luck.
> There seems to be a bug somewhere in org-export-icalendar code where the
> *ical-tmp* buffer seems to get deleted prematurely, but I can't figure out
> where exactly, so I'm hoping that a) it's reproducible and b) somebody will
> see what's wrong.
>
> Versions:
> ---------
>
> emacs: GNU Emacs 22.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2007-11-23 on gamaville.dokosmarshall.org
> org: Org-mode version 6.04b
>
> Sample org file:
> ----------------
>
> I just cut and pasted from the org manual:
>
> ---------------------------------------------------------------------------
> * Birthdays and similar stuff
> #+CATEGORY: Holiday
> %%(org-calendar-holiday) ; special function for holiday names
> #+CATEGORY: Ann
> %%(diary-anniversary 14 5 1956) Arthur Dent is %d years old
> %%(diary-anniversary 2 10 1869) Mahatma Gandhi would be %d years old
> ---------------------------------------------------------------------------
>
> Then I do M-x org-export-icalendar-this-file (or C-c C-e i) and I get the following
> backtrace:
>
> ---------------------------------------------------------------------------
> Debugger entered--Lisp error: (error "Selecting deleted buffer")
> set-buffer(#<killed buffer>)
> (save-current-buffer (set-buffer sexp-buffer) (insert sexp "\n"))
> (with-current-buffer sexp-buffer (insert sexp "\n"))
> (catch :skip (org-agenda-skip) (setq b (match-beginning 0)) (goto-char (1- ...)) (forward-sexp 1) (end-of-line 1) (setq sexp (buffer-substring b ...)) (with-current-buffer sexp-buffer (insert sexp "\n")) (princ (org-diary-to-ical-string sexp-buffer)))
> (while (re-search-forward "^&?%%(" nil t) (catch :skip (org-agenda-skip) (setq b ...) (goto-char ...) (forward-sexp 1) (end-of-line 1) (setq sexp ...) (with-current-buffer sexp-buffer ...) (princ ...)))
> (progn (goto-char (point-min)) (while (re-search-forward "^&?%%(" nil t) (catch :skip ... ... ... ... ... ... ... ...)))
> (if (and org-icalendar-include-sexps (condition-case nil ... ...) (fboundp ...)) (progn (goto-char ...) (while ... ...)))
> (when (and org-icalendar-include-sexps (condition-case nil ... ...) (fboundp ...)) (goto-char (point-min)) (while (re-search-forward "^&?%%(" nil t) (catch :skip ... ... ... ... ... ... ... ...)))
> (save-excursion (goto-char (point-min)) (while (re-search-forward re1 nil t) (catch :skip ... ... ... ... ... ... ... ... ... ... ... ...)) (when (and org-icalendar-include-sexps ... ...) (goto-char ...) (while ... ...)) (when org-icalendar-include-todo (setq prefix "TODO-") (goto-char ...) (while ... ...)))
> (let ((re1 ...) (re2 ...) (dts ...) hd ts ts2 state status (inc t) pos b sexp rrule scheduledp deadlinep prefix tmp pri category entry location summary desc uid (sexp-buffer ...)) (org-refresh-category-properties) (save-excursion (goto-char ...) (while ... ...) (when ... ... ...) (when org-icalendar-include-todo ... ... ...)))
> org-print-icalendar-entries(nil)
> (let ((standard-output ical-buffer)) (if combine (and ... ... ...) (org-start-icalendar-file category)) (org-print-icalendar-entries combine) (when (or ... ...) (org-finish-icalendar-file) (set-buffer ical-buffer) (save-buffer) (run-hooks ...) (and ... ... ...)))
> (catch (quote nextfile) (org-check-agenda-file file) (set-buffer (org-get-agenda-file-buffer file)) (unless combine (setq ical-file ...) (setq ical-buffer ...) (with-current-buffer ical-buffer ...)) (setq category (or org-category ...)) (if (symbolp category) (setq category ...)) (let (...) (if combine ... ...) (org-print-icalendar-entries combine) (when ... ... ... ... ... ...)))
> (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (set-buffer ...) (unless combine ... ... ...) (setq category ...) (if ... ...) (let ... ... ... ...)))
> (let* ((dir ...) file ical-file ical-buffer category started org-agenda-new-buffers) (and (get-buffer "*ical-tmp*") (kill-buffer "*ical-tmp*")) (when combine (setq ical-file ... ical-buffer ...) (set-buffer ical-buffer) (erase-buffer)) (while (setq file ...) (catch ... ... ... ... ... ... ...)) (org-release-buffers org-agenda-new-buffers))
> (save-excursion (org-prepare-agenda-buffers files) (let* (... file ical-file ical-buffer category started org-agenda-new-buffers) (and ... ...) (when combine ... ... ...) (while ... ...) (org-release-buffers org-agenda-new-buffers)))
> org-export-icalendar(nil "/home/nick/lib/org/ical.org")
> org-export-icalendar-this-file()
> call-interactively(org-export-icalendar-this-file)
> (if (and bg (nth 2 ass)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (call-interactively (nth 1 ass)))
> (let* ((bg ...) (help "[t] insert the export option template\n[v] limit export to visible part of outline tree\n\n[a] export as ASCII\n\n[h] export as HTML\n[H] export as HTML to temporary buffer\n[R] export region as HTML\n[b] export as HTML and browse immediately\n[x] export as XOXO\n\n[l] export as LaTeX\n[L] export as LaTeX to temporary buffer\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files\n[c] export agenda files into combined iCalendar file\n\n[F] publish current file\n[P] publish current project\n[X] publish... (project will be prompted for)\n[A] publish all projects") (cmds ...) r1 r2 ass) (save-window-excursion (delete-other-windows) (with-output-to-temp-buffer "*Org Export/Publishing Help*" ...) (message "Select command: ") (s
et
> q r1 ...)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ...) (let ... ... ...) (call-interactively ...)))
> org-export(nil)
> call-interactively(org-export)
> ---------------------------------------------------------------------------
>
>
> If there is only one %%(...) expression in the file, the export seems to work, but
> with more than one, the error gets triggered.
>
> If more information is needed, let me know: I'd be happy to supply it.
>
> Thanks,
> Nick
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
Paul
next prev parent reply other threads:[~2008-05-28 21:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 20:03 Bug in iCalendar export Nick Dokos
2008-05-28 21:02 ` Paul R [this message]
2008-05-28 22:05 ` Adam Spiers
2008-05-29 9:29 ` Paul R
2008-05-29 17:12 ` Adam Spiers
2008-06-11 23:13 ` Nick Dokos
2008-06-12 7:53 ` Paul R
2008-06-12 14:44 ` Nick Dokos
2008-06-12 10:03 ` Adam Spiers
2008-06-12 15:20 ` Adam Spiers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iqwyf8gi.fsf@gmail.com \
--to=paul.r.ml@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).