emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christopher Genovese <genovese.cr@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-write-agenda failure
Date: Thu, 6 Jan 2011 23:24:37 -0500	[thread overview]
Message-ID: <AANLkTi=x-CmPeByLynS1sT+K0A6hrbJiRo5nTEmwLGs8@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 5011 bytes --]

On Mac OS X 10.5.8, GNU Emacs 23.2.1, Org Mode 7.4,
setting the following:

(setq org-todo-keywords
        '((sequence "TODO" "WAIT" "DONE")))
(setq org-todo-keyword-faces '(("WAIT" . "lightgoldenrod2")))

has the intended effect, with WAIT items properly displayed, ... *until*
I do org-write-agenda in the Agenda buffer (writing to "foobar.pdf"),
which fails in ps-print with the stack trace shown below.
(The failure is not dependent on the color chosen in the string.)

Note, however, that when doing the following instead
everything works:

 (setq org-todo-keywords
        '((sequence "TODO" "WAIT" "DONE")))
 (copy-face 'org-todo 'org-wait-face) ; bug with string when doing
org-write-agenda
 (set-face-foreground 'org-wait-face "lightgoldenrod2")
 (setq org-todo-keyword-faces '(("WAIT" . org-wait-face)))


In the former case (which fails), the problem appears in the call

  (ps-face-attribute-list '(:inherit org-todo :foreground
"lightgoldenrod2"))

but if the property list is itself wrapped in a list as

 (ps-face-attribute-list '((:inherit org-todo :foreground
"lightgoldenrod2")))

then this function does not raise an error.

This seems like a bug to me, as I'm pretty sure I'm matching the
documented form required for org-todo-keyword-faces (in both cases),
but I could be wrong. I have not had a chance to track this down all the
way, but I thought I'd
pass it on in hopes it is either helpful or will help someone show me the
error of my ways.

Thanks for your help. The backtrace for the original problem is given below.

      Debugger entered--Lisp error: (wrong-type-argument listp
"lightgoldenrod2")
        ps-face-attributes("lightgoldenrod2")
        ps-face-attribute-list((:inherit org-todo :foreground
"lightgoldenrod2"))
        ps-plot-with-face(662 666 (:inherit org-todo :foreground
"lightgoldenrod2"))
        ps-generate-postscript-with-faces1(1 1549)
        ps-generate-postscript-with-faces(1 1549)
        ps-generate(#<buffer Agenda View> 1 1549
ps-generate-postscript-with-faces)
        ps-spool-with-faces(1 1549 nil)
        ps-print-with-faces(1 1549 "~/foobar.ps")
        ps-print-buffer-with-faces("~/foobar.ps")
        (cond ((org-bound-and-true-p org-mobile-creating-agendas)
(org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'"
file) (require ...) (set-buffer ...) (when ... ... ... ...) (write-file
file) (kill-buffer ...) (message "HTML written to %s" file)) ((string-match
"\\.ps\\'" file) (require ...) (ps-print-buffer-with-faces file) (message
"Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require
...) (ps-print-buffer-with-faces ...) (call-process "ps2pdf" nil nil nil ...
...) (delete-file ...) (message "PDF written to %s" file)) ((string-match
"\\.ics\\'" file) (require ...) (let ... ...)) (t (let ... ... ... ... ...
... ...)))
        (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil)
(insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while
(setq beg ...) (delete-region beg ...)) (run-hooks (quote
org-agenda-before-write-hook)) (cond (... ...) (... ... ... ... ... ... ...)
(... ... ... ...) (... ... ... ... ... ...) (... ... ...) (t ...)))
        (unwind-protect (progn (rename-buffer "Agenda View" t)
(set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text ...)
(while ... ...) (run-hooks ...) (cond ... ... ... ... ... ...)) (and
(buffer-name temp-buffer) (kill-buffer temp-buffer)))
        (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
... ... ... ... ... ... ...) (and ... ...)))
        (with-current-buffer temp-buffer (unwind-protect (progn ... ... ...
... ... ... ...) (and ... ...)))
        (let ((temp-buffer ...)) (with-current-buffer temp-buffer
(unwind-protect ... ...)))
        (with-temp-buffer (rename-buffer "Agenda View" t)
(set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text
(quote org-filtered)) (while (setq beg ...) (delete-region beg ...))
(run-hooks (quote org-agenda-before-write-hook)) (cond (... ...) (... ...
... ... ... ... ...) (... ... ... ...) (... ... ... ... ... ...) (... ...
...) (t ...)))
        (let ((bs ...) beg) (org-agenda-unmark-filtered-text)
(with-temp-buffer (rename-buffer "Agenda View" t) (set-buffer-modified-p
nil) (insert bs) (org-agenda-remove-marked-text ...) (while ... ...)
(run-hooks ...) (cond ... ... ... ... ... ...)))
        (save-window-excursion (org-agenda-mark-filtered-text) (let (...
beg) (org-agenda-unmark-filtered-text) (with-temp-buffer ... ... ... ... ...
... ...)))
        (save-excursion (save-window-excursion
(org-agenda-mark-filtered-text) (let ... ... ...)))
        (let nil (save-excursion (save-window-excursion ... ...)) #<buffer
*Org Agenda*>)
        eval((let nil (save-excursion (save-window-excursion ... ...))
#<buffer *Org Agenda*>))
        org-let(nil (save-excursion (save-window-excursion
(org-agenda-mark-filtered-text) (let ... ... ...))) #<buffer *Org Agenda*>)
        org-write-agenda("~/foobar.pdf")

[-- Attachment #1.2: Type: text/html, Size: 5720 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

             reply	other threads:[~2011-01-07  4:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  4:24 Christopher Genovese [this message]
2011-01-23 13:14 ` org-write-agenda failure David Maus

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='AANLkTi=x-CmPeByLynS1sT+K0A6hrbJiRo5nTEmwLGs8@mail.gmail.com' \
    --to=genovese.cr@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).