Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Christopher Genovese <genovese.cr <at> gmail.com>
Subject: org-write-agenda failure
Newsgroups: gmane.emacs.orgmode
Date: Friday 7th January 2011 04:24:37 UTC (over 6 years ago)
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(# 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 ... ...)) #)
        eval((let nil (save-excursion (save-window-excursion ... ...))
#))
        org-let(nil (save-excursion (save-window-excursion
(org-agenda-mark-filtered-text) (let ... ... ...))) #)
        org-write-agenda("~/foobar.pdf")
 
CD: 3ms