* error writing agenda view to html file
@ 2011-07-15 16:46 Rainer Stengele
2011-07-15 18:30 ` Jambunathan K
2011-07-16 17:03 ` Bastien
0 siblings, 2 replies; 10+ messages in thread
From: Rainer Stengele @ 2011-07-15 16:46 UTC (permalink / raw)
To: emacs-orgmode
Hi all!
In agenda view doing a C-x C-w produces a face related error.
Can somebody help me out finding the issue in this debug message?
Which font shoudl I change/correct?
Thanks,
- Rainer
Debugger entered--Lisp error: (error "Invalid face")
internal-get-lisp-face-attribute(nil :height nil)
face-attribute(nil :height)
(setq h (face-attribute f :height))
(while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil))
(let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote unspecified)) nil
h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))
(catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push
(if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f
:height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))))
(block nil (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote
unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
(loop for f = face then (face-attribute f :inherit) until (eq f (quote unspecified)) for h = (face-attribute f :height) collect (if (eq h (quote unspecified)) nil h))
(let ((size-list (loop for f = face then (face-attribute f :inherit) until (eq f (quote unspecified)) for h = (face-attribute f :height) collect (if (eq h (quote unspecified)) nil h)))) (reduce (quote htmlize-merge-size) (cons nil
size-list)))
htmlize-face-size(default)
(let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf (htmlize-fstruct-size fstruct) size)))
(cond (htmlize-running-xemacs (let* ((font-instance (face-font-instance face)) (props (font-instance-properties font-instance))) (when (equalp (cdr (assq (quote WEIGHT_NAME) props)) "bold") (setf (htmlize-fstruct-boldp fstruct) t)) (when
(or (equalp (cdr (assq ... props)) "i") (equalp (cdr (assq ... props)) "o")) (setf (htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct)
(face-underline-p face)))) ((fboundp (quote face-attribute)) (dolist (attr (quote (:weight :slant :underline :overline :strike-through))) (let ((value (if (>= emacs-major-version 22) (face-attribute face attr nil t) (let ... ... ...))))
(when (and value (not (eq value ...))) (htmlize-face-emacs21-attr fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf (htmlize-fstruct-size fstruct) size)))) (t (when (fboundp (quote face-bold-p))
(setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when (fboundp (quote face-italic-p)) (setf (htmlize-fstruct-italicp fstruct) (face-italic-p face))) (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face))))
(let ((fstruct (make-htmlize-fstruct :foreground (htmlize-color-to-rgb (htmlize-face-foreground face)) :background (htmlize-color-to-rgb (htmlize-face-background face))))) (cond (htmlize-running-xemacs (let* ((font-instance
(face-font-instance face)) (props (font-instance-properties font-instance))) (when (equalp (cdr (assq ... props)) "bold") (setf (htmlize-fstruct-boldp fstruct) t)) (when (or (equalp (cdr ...) "i") (equalp (cdr ...) "o")) (setf
(htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face)))) ((fboundp (quote face-attribute)) (dolist (attr (quote (:weight
:slant :underline :overline :strike-through))) (let ((value (if ... ... ...))) (when (and value (not ...)) (htmlize-face-emacs21-attr fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf
(htmlize-fstruct-size fstruct) size)))) (t (when (fboundp (quote face-bold-p)) (setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when (fboundp (quote face-italic-p)) (setf (htmlize-fstruct-italicp fstruct) (face-italic-p face)))
(setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face)))) (setf (htmlize-fstruct-css-name fstruct) (let ((name (downcase (symbol-name face)))) (when (string-match "\\`font-lock-" name) (setq name (replace-match "" t t name)))
(when (string-match "-face\\'" name) (setq name (replace-match "" t t name))) (while (string-match "[^-a-zA-Z0-9]" name) (setq name (replace-match "X" t t name))) (when (string-match "\\`[-0-9]" name) (setq name (concat "X" name))) (when
(equal name "") (setq name "face")) (setq name (concat htmlize-css-name-prefix name)) name)) fstruct)
htmlize-face-to-fstruct(default)
(if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))
(let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member
new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))
(if (gethash face face-map) nil (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name
css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))
(unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name
css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))
(while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct)
(let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name
fstruct) new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))))
(setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name ...))) (unless (equal new-name css-name) (setf
(htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)
(catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if ... ... ...))) (setf (gethash face face-map) fstruct)
(let* ((css-name ...) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name ...)) (unless (equal new-name css-name) (setf ... new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct ...)) (setf (gethash face face-map)
fstruct) (let* (... ... ...) (while ... ...) (unless ... ...) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)))
(block nil (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if ... ... ...))) (setf (gethash face face-map) fstruct) (let* ((css-name
...) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name ...)) (unless (equal new-name css-name) (setf ... new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil))
(dolist (face faces) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name
fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))))
(let ((face-map (make-hash-table :test (quote equal))) css-names) (dolist (face faces) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash
face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name ...))) (unless (equal new-name css-name) (setf
(htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))) face-map)
htmlize-make-face-map((default org-link org-table org-agenda-date-weekend org-agenda-current-time org-time-grid org-agenda-date-today (:foreground "purple" :weight bold :underline nil) (:foreground "dark orange" :weight bold :underline
nil) (:foreground "light green" :weight normal :underline nil) org-tag (:foreground "red" :weight bold :underline nil) org-agenda-done org-agenda-date))
(let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map (htmlize-make-face-map (adjoin (quote default) buffer-faces))) (htmlbuf (generate-new-buffer (if (buffer-file-name) (htmlize-make-file-name (file-name-nondirectory
(buffer-file-name))) "*html*"))) (places (quote (nil nil))) (title (if (buffer-file-name) (file-name-nondirectory (buffer-file-name)) (buffer-name)))) (with-current-buffer htmlbuf (buffer-disable-undo) (insert (htmlize-method doctype) 10
(format "<!-- Created by htmlize-%s in %s mode. -->\n" htmlize-version htmlize-output-type) "<html>\n ") (plist-put places (quote head-start) (point-marker)) (insert "<head>\n" " <title>" (htmlize-protect-string title) "</title>\n" (if
htmlize-html-charset (format (concat " <meta http-equiv=\"Content-Type\" " "content=\"text/html; charset=%s\">\n") htmlize-html-charset) "") htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map) (insert " </head>")
(plist-put places (quote head-end) (point-marker)) (insert "\n ") (plist-put places (quote body-start) (point-marker)) (insert (htmlize-method body-tag face-map) "\n ") (plist-put places (quote content-start) (point-marker)) (insert
"<pre>\n")) (let ((insert-text-method (htmlize-method-function (quote insert-text))) next-change text face-list fstruct-list trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq next-change (htmlize-next-change (point)
(quote face))) (setq face-list (htmlize-faces-at-point) fstruct-list (delq nil (mapcar (lambda (f) (gethash f face-map)) face-list))) (setq text (htmlize-buffer-substring-no-invisible (point) next-change)) (when trailing-ellipsis (setq text
(htmlize-trim-ellipsis text))) (when (> (length text) 0) (setq trailing-ellipsis (get-text-property (1- (length text)) (quote htmlize-ellipsis) text))) (setq text (htmlize-untabify text (current-column))) (setq text (htmlize-protect-string
text)) (when (> (length text) 0) (funcall insert-text-method text fstruct-list htmlbuf)) (goto-char next-change))) (with-current-buffer htmlbuf (insert "</pre>") (plist-put places (quote content-end) (point-marker)) (insert "\n </body>")
(plist-put places (quote body-end) (point-marker)) (insert "\n</html>\n") (when htmlize-generate-hyperlinks (htmlize-make-hyperlinks)) (htmlize-defang-local-variables) (when htmlize-replace-form-feeds (goto-char (point-min)) (let ((source
(htmlize-protect-string "\n\f")) (replacement (if (stringp htmlize-replace-form-feeds) htmlize-replace-form-feeds "</pre><hr /><pre>"))) (while (search-forward source nil t) (replace-match replacement t t)))) (goto-char (point-min)) (when
htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set (make-local-variable (quote htmlize-buffer-places)) places) (run-hooks (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf)
(save-excursion (save-excursion (run-hooks (quote htmlize-before-hook))) (htmlize-ensure-fontified) (clrhash htmlize-extended-character-cache) (clrhash htmlize-memoization-table) (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map
(htmlize-make-face-map (adjoin (quote default) buffer-faces))) (htmlbuf (generate-new-buffer (if (buffer-file-name) (htmlize-make-file-name (file-name-nondirectory ...)) "*html*"))) (places (quote (nil nil))) (title (if (buffer-file-name)
(file-name-nondirectory (buffer-file-name)) (buffer-name)))) (with-current-buffer htmlbuf (buffer-disable-undo) (insert (htmlize-method doctype) 10 (format "<!-- Created by htmlize-%s in %s mode. -->\n" htmlize-version htmlize-output-type)
"<html>\n ") (plist-put places (quote head-start) (point-marker)) (insert "<head>\n" " <title>" (htmlize-protect-string title) "</title>\n" (if htmlize-html-charset (format (concat " <meta http-equiv=\"Content-Type\" "
"content=\"text/html; charset=%s\">\n") htmlize-html-charset) "") htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map) (insert " </head>") (plist-put places (quote head-end) (point-marker)) (insert "\n ") (plist-put
places (quote body-start) (point-marker)) (insert (htmlize-method body-tag face-map) "\n ") (plist-put places (quote content-start) (point-marker)) (insert "<pre>\n")) (let ((insert-text-method (htmlize-method-function (quote
insert-text))) next-change text face-list fstruct-list trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq next-change (htmlize-next-change (point) (quote face))) (setq face-list (htmlize-faces-at-point) fstruct-list (delq
nil (mapcar (lambda ... ...) face-list))) (setq text (htmlize-buffer-substring-no-invisible (point) next-change)) (when trailing-ellipsis (setq text (htmlize-trim-ellipsis text))) (when (> (length text) 0) (setq trailing-ellipsis
(get-text-property (1- ...) (quote htmlize-ellipsis) text))) (setq text (htmlize-untabify text (current-column))) (setq text (htmlize-protect-string text)) (when (> (length text) 0) (funcall insert-text-method text fstruct-list htmlbuf))
(goto-char next-change))) (with-current-buffer htmlbuf (insert "</pre>") (plist-put places (quote content-end) (point-marker)) (insert "\n </body>") (plist-put places (quote body-end) (point-marker)) (insert "\n</html>\n") (when
htmlize-generate-hyperlinks (htmlize-make-hyperlinks)) (htmlize-defang-local-variables) (when htmlize-replace-form-feeds (goto-char (point-min)) (let ((source (htmlize-protect-string "\n\f")) (replacement (if ... htmlize-replace-form-feeds
"</pre><hr /><pre>"))) (while (search-forward source nil t) (replace-match replacement t t)))) (goto-char (point-min)) (when htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set (make-local-variable (quote htmlize-buffer-places))
places) (run-hooks (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf))
htmlize-buffer-1()
(save-current-buffer (set-buffer (or buffer (current-buffer))) (htmlize-buffer-1))
(with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1))
(let ((htmlbuf (with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1)))) (when (interactive-p) (switch-to-buffer htmlbuf)) htmlbuf)
htmlize-buffer(#<buffer Agenda View>)
(set-buffer (htmlize-buffer (current-buffer)))
(cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and
org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file)
(kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
(require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file))
(delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array
(org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t
(let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))
(progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg
(or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match
"\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
(search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote
ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process
"ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'"
file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array (org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file
file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain
text written to %s" file)))))
(unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t))
(delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min))
(kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps"))
(call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match
"\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array ...)) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply
(quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to
%s" file))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any
(point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match
"<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s"
file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
(file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file))
((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine)
(org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min)
(point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas)
(org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>"
org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file))
((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
(file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file))
((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine)
(org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered))
(while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer ...)) (when (and org-agenda-export-html-style ...) (goto-char ...) (kill-region
... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message
"Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name ...) (expand-file-name file)) (delete-file
(concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t (let (...) (find-file file) (erase-buffer) (insert bs) (save-buffer 0)
(kill-buffer ...) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(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 (text-property-any (point-min) (point-max) (quote org-filtered) t))
(delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min))
(kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps"))
(call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match
"\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array (org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table))
(org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
(current-buffer)) (message "Plain text written to %s" file)))))
(let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq
beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond
((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and
org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file)
(kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
(require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file))
(delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array ...))
(org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string)))
(find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))))
(save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max))))
(run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer
(current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file
file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'"
file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat
(file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...)
(org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer))
(message "Plain text written to %s" file)))))))
(save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max)))) (run-hooks (quote
org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer ...)) (when (and
org-agenda-export-html-style ...) (goto-char ...) (kill-region ... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf" nil nil nil
(expand-file-name ...) (expand-file-name file)) (delete-file (concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t (let (...)
(find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer ...) (message "Plain text written to %s" file))))))))
(let nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any ... ... ... t)) (delete-region beg (or ... ...))) (run-hooks (quote org-agenda-before-write-hook)) (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 ... ... ... ... ... ... ...))))))) #<buffer *Org Agenda*>)
eval((let nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any ... ... ... t)) (delete-region beg (or ... ...))) (run-hooks (quote org-agenda-before-write-hook)) (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 ... ... ... ... ... ... ...))))))) #<buffer *Org Agenda*>))
org-let(nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max))))
(run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer
...)) (when (and org-agenda-export-html-style ...) (goto-char ...) (kill-region ... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'"
file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf"
nil nil nil (expand-file-name ...) (expand-file-name file)) (delete-file (concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t
(let (...) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer ...) (message "Plain text written to %s" file)))))))) #<buffer *Org Agenda*>)
org-write-agenda(#("~/agenda.html" 8 9 (rear-nonsticky t)) nil)
call-interactively(org-write-agenda nil nil)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-15 16:46 error writing agenda view to html file Rainer Stengele
@ 2011-07-15 18:30 ` Jambunathan K
2011-07-16 17:04 ` Bastien
2011-07-16 17:03 ` Bastien
1 sibling, 1 reply; 10+ messages in thread
From: Jambunathan K @ 2011-07-15 18:30 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
Rainer Stengele <rainer.stengele@diplan.de> writes:
> Hi all!
>
> In agenda view doing a C-x C-w produces a face related error.
> Can somebody help me out finding the issue in this debug message?
> Which font shoudl I change/correct?
Possible candidates are one of these faces
--8<---------------cut here---------------start------------->8---
htmlize-make-face-map((default org-link org-table
org-agenda-date-weekend org-agenda-current-time org-time-grid
org-agenda-date-today (:foreground "purple" :weight bold :underline
nil) (:foreground "dark orange" :weight bold :underline
nil) (:foreground "light green" :weight normal :underline nil) org-tag
(:foreground "red" :weight bold :underline nil) org-agenda-done
org-agenda-date))
--8<---------------cut here---------------end--------------->8---
A cursory look and a programmer's gut feeling suggests that it is the
`default' face.
I remember Bastien adding a org-default face that inherits the default face.
--8<---------------cut here---------------start------------->8---
+(defface org-default
+ (org-compatible-face 'default nil)
+ "Face used for default text."
+ :group 'org-faces)
--8<---------------cut here---------------end--------------->8---
author Bastien Guerry <bzg@altern.org>
Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
committer Bastien Guerry <bzg@altern.org>
Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
commit 7a88eaec295d50a6e27cc1d6b6f1a725ace01076
tree 91e803908793a91bb614a775c599dda172c72385 tree | snapshot
parent c6b22dee33fa418b344fa68bf36bb496db473a89
Revback your commit to c6b22d level and see if the problem persists.
Warning: I could be wrong. I have not done a thorough analysis. The
stack trace is quite a windowful. The crash is in htmlize.
>
> Thanks,
> - Rainer
>
>
> Debugger entered--Lisp error: (error "Invalid face")
> internal-get-lisp-face-attribute(nil :height nil)
> face-attribute(nil :height)
> (setq h (face-attribute f :height))
> (while (progn (setq f (if --cl-var-- face (face-attribute f
> :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute
> f :height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--)
> (setq --cl-var-- nil))
> (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while
> (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not
> (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push
> (if (eq h (quote unspecified)) nil
> h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))
> (catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var--
> nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face
> (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq
> h (face-attribute f :height)) (push
> (if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var--
> nil)) (nreverse --cl-var--)))
> (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((f nil) (h
> nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if
> --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote
> unspecified)))) (setq h (face-attribute f
> :height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--)
> (setq --cl-var-- nil)) (nreverse --cl-var--))))
> (block nil (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t))
> (while (progn (setq f (if --cl-var-- face (face-attribute f
> :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute
> f :height)) (push (if (eq h (quote
> unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
> (loop for f = face then (face-attribute f :inherit) until (eq f
> (quote unspecified)) for h = (face-attribute f :height) collect (if
> (eq h (quote unspecified)) nil h))
> (let ((size-list (loop for f = face then (face-attribute f :inherit)
> until (eq f (quote unspecified)) for h = (face-attribute f :height)
> collect (if (eq h (quote unspecified)) nil h)))) (reduce (quote
> htmlize-merge-size) (cons nil
> size-list)))
> htmlize-face-size(default)
> (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf
> (htmlize-fstruct-size fstruct) size)))
> (cond (htmlize-running-xemacs (let* ((font-instance
> (face-font-instance face)) (props (font-instance-properties
> font-instance))) (when (equalp (cdr (assq (quote WEIGHT_NAME) props))
> "bold") (setf (htmlize-fstruct-boldp fstruct) t)) (when
> (or (equalp (cdr (assq ... props)) "i") (equalp (cdr (assq ... props))
> "o")) (setf (htmlize-fstruct-italicp fstruct) t)) (setf
> (htmlize-fstruct-strikep fstruct) (face-strikethru-p face)) (setf
> (htmlize-fstruct-underlinep fstruct)
> (face-underline-p face)))) ((fboundp (quote face-attribute)) (dolist
> (attr (quote (:weight :slant :underline :overline :strike-through)))
> (let ((value (if (>= emacs-major-version 22) (face-attribute face attr
> nil t) (let ... ... ...))))
> (when (and value (not (eq value ...))) (htmlize-face-emacs21-attr
> fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless
> (eql size 1.0) (setf (htmlize-fstruct-size fstruct) size)))) (t (when
> (fboundp (quote face-bold-p))
> (setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when
> (fboundp (quote face-italic-p)) (setf (htmlize-fstruct-italicp
> fstruct) (face-italic-p face))) (setf (htmlize-fstruct-underlinep
> fstruct) (face-underline-p face))))
> (let ((fstruct (make-htmlize-fstruct :foreground
> (htmlize-color-to-rgb (htmlize-face-foreground face)) :background
> (htmlize-color-to-rgb (htmlize-face-background face))))) (cond
> (htmlize-running-xemacs (let* ((font-instance
> (face-font-instance face)) (props (font-instance-properties
> font-instance))) (when (equalp (cdr (assq ... props)) "bold") (setf
> (htmlize-fstruct-boldp fstruct) t)) (when (or (equalp (cdr ...) "i")
> (equalp (cdr ...) "o")) (setf
> (htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep
> fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep
> fstruct) (face-underline-p face)))) ((fboundp (quote face-attribute))
> (dolist (attr (quote (:weight
> :slant :underline :overline :strike-through))) (let ((value (if
> ... ... ...))) (when (and value (not ...)) (htmlize-face-emacs21-attr
> fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless
> (eql size 1.0) (setf
> (htmlize-fstruct-size fstruct) size)))) (t (when (fboundp (quote
> face-bold-p)) (setf (htmlize-fstruct-boldp fstruct) (face-bold-p
> face))) (when (fboundp (quote face-italic-p)) (setf
> (htmlize-fstruct-italicp fstruct) (face-italic-p face)))
> (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face))))
> (setf (htmlize-fstruct-css-name fstruct) (let ((name (downcase
> (symbol-name face)))) (when (string-match "\\`font-lock-" name) (setq
> name (replace-match "" t t name)))
> (when (string-match "-face\\'" name) (setq name (replace-match "" t t
> name))) (while (string-match "[^-a-zA-Z0-9]" name) (setq name
> (replace-match "X" t t name))) (when (string-match "\\`[-0-9]" name)
> (setq name (concat "X" name))) (when
> (equal name "") (setq name "face")) (setq name (concat
> htmlize-css-name-prefix name)) name)) fstruct)
> htmlize-face-to-fstruct(default)
> (if (symbolp face) (htmlize-face-to-fstruct face)
> (htmlize-attrlist-to-fstruct face))
> (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face)
> (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map)
> fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct))
> (new-name css-name) (i 0)) (while (member
> new-name css-names) (setq new-name (format "%s-%s" css-name (incf
> i)))) (unless (equal new-name css-name) (setf
> (htmlize-fstruct-css-name fstruct) new-name)) (push new-name
> css-names)))
> (if (gethash face face-map) nil (let ((fstruct (if (symbolp face)
> (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))))
> (setf (gethash face face-map) fstruct) (let* ((css-name
> (htmlize-fstruct-css-name fstruct)) (new-name
> css-name) (i 0)) (while (member new-name css-names) (setq new-name
> (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name)
> (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name
> css-names))))
> (unless (gethash face face-map) (let ((fstruct (if (symbolp face)
> (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))))
> (setf (gethash face face-map) fstruct) (let* ((css-name
> (htmlize-fstruct-css-name fstruct)) (new-name
> css-name) (i 0)) (while (member new-name css-names) (setq new-name
> (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name)
> (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name
> css-names))))
> (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--))
> (unless (gethash face face-map) (let ((fstruct (if (symbolp face)
> (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))))
> (setf (gethash face face-map) fstruct)
> (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name
> css-name) (i 0)) (while (member new-name css-names) (setq new-name
> (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name)
> (setf (htmlize-fstruct-css-name
> fstruct) new-name)) (push new-name css-names)))) (setq
> --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
> (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp--
> (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map)
> (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face)
> (htmlize-attrlist-to-fstruct face))))
> (setf (gethash face face-map) fstruct) (let* ((css-name
> (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while
> (member new-name css-names) (setq new-name (format "%s-%s" css-name
> ...))) (unless (equal new-name css-name) (setf
> (htmlize-fstruct-css-name fstruct) new-name)) (push new-name
> css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)
> (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- faces)
> face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--))
> (unless (gethash face face-map) (let ((fstruct (if ... ... ...)))
> (setf (gethash face face-map) fstruct)
> (let* ((css-name ...) (new-name css-name) (i 0)) (while (member
> new-name css-names) (setq new-name ...)) (unless (equal new-name
> css-name) (setf ... new-name)) (push new-name css-names)))) (setq
> --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
> nil))
> (cl-block-wrapper (catch (quote --cl-block-nil--) (let
> ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face
> (car --cl-dolist-temp--)) (unless (gethash face face-map) (let
> ((fstruct ...)) (setf (gethash face face-map)
> fstruct) (let* (... ... ...) (while ... ...) (unless ... ...) (push
> new-name css-names)))) (setq --cl-dolist-temp-- (cdr
> --cl-dolist-temp--))) nil)))
> (block nil (let ((--cl-dolist-temp-- faces) face) (while
> --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless
> (gethash face face-map) (let ((fstruct (if ... ... ...))) (setf
> (gethash face face-map) fstruct) (let* ((css-name
> ...) (new-name css-name) (i 0)) (while (member new-name css-names)
> (setq new-name ...)) (unless (equal new-name css-name) (setf
> ... new-name)) (push new-name css-names)))) (setq --cl-dolist-temp--
> (cdr --cl-dolist-temp--))) nil))
> (dolist (face faces) (unless (gethash face face-map) (let ((fstruct
> (if (symbolp face) (htmlize-face-to-fstruct face)
> (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map)
> fstruct) (let* ((css-name (htmlize-fstruct-css-name
> fstruct)) (new-name css-name) (i 0)) (while (member new-name
> css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless
> (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct)
> new-name)) (push new-name css-names)))))
> (let ((face-map (make-hash-table :test (quote equal))) css-names)
> (dolist (face faces) (unless (gethash face face-map) (let ((fstruct
> (if (symbolp face) (htmlize-face-to-fstruct face)
> (htmlize-attrlist-to-fstruct face)))) (setf (gethash
> face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name
> fstruct)) (new-name css-name) (i 0)) (while (member new-name
> css-names) (setq new-name (format "%s-%s" css-name ...))) (unless
> (equal new-name css-name) (setf
> (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))) face-map)
> htmlize-make-face-map((default org-link org-table
> org-agenda-date-weekend org-agenda-current-time org-time-grid
> org-agenda-date-today (:foreground "purple" :weight bold :underline
> nil) (:foreground "dark orange" :weight bold :underline
> nil) (:foreground "light green" :weight normal :underline nil) org-tag
> (:foreground "red" :weight bold :underline nil) org-agenda-done
> org-agenda-date))
> (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map
> (htmlize-make-face-map (adjoin (quote default) buffer-faces)))
> (htmlbuf (generate-new-buffer (if (buffer-file-name)
> (htmlize-make-file-name (file-name-nondirectory
> (buffer-file-name))) "*html*"))) (places (quote (nil nil))) (title (if
> (buffer-file-name) (file-name-nondirectory (buffer-file-name))
> (buffer-name)))) (with-current-buffer htmlbuf (buffer-disable-undo)
> (insert (htmlize-method doctype) 10
> (format "<!-- Created by htmlize-%s in %s mode. -->\n" htmlize-version
> htmlize-output-type) "<html>\n ") (plist-put places (quote head-start)
> (point-marker)) (insert "<head>\n" " <title>" (htmlize-protect-string
> title) "</title>\n" (if
> htmlize-html-charset (format (concat " <meta
> http-equiv=\"Content-Type\" " "content=\"text/html; charset=%s\">\n")
> htmlize-html-charset) "") htmlize-head-tags) (htmlize-method
> insert-head buffer-faces face-map) (insert " </head>")
> (plist-put places (quote head-end) (point-marker)) (insert "\n ")
> (plist-put places (quote body-start) (point-marker)) (insert
> (htmlize-method body-tag face-map) "\n ") (plist-put places (quote
> content-start) (point-marker)) (insert
> "<pre>\n")) (let ((insert-text-method (htmlize-method-function (quote
> insert-text))) next-change text face-list fstruct-list
> trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq
> next-change (htmlize-next-change (point)
> (quote face))) (setq face-list (htmlize-faces-at-point) fstruct-list
> (delq nil (mapcar (lambda (f) (gethash f face-map)) face-list))) (setq
> text (htmlize-buffer-substring-no-invisible (point) next-change))
> (when trailing-ellipsis (setq text
> (htmlize-trim-ellipsis text))) (when (> (length text) 0) (setq
> trailing-ellipsis (get-text-property (1- (length text)) (quote
> htmlize-ellipsis) text))) (setq text (htmlize-untabify text
> (current-column))) (setq text (htmlize-protect-string
> text)) (when (> (length text) 0) (funcall insert-text-method text
> fstruct-list htmlbuf)) (goto-char next-change))) (with-current-buffer
> htmlbuf (insert "</pre>") (plist-put places (quote content-end)
> (point-marker)) (insert "\n </body>")
> (plist-put places (quote body-end) (point-marker)) (insert
> "\n</html>\n") (when htmlize-generate-hyperlinks
> (htmlize-make-hyperlinks)) (htmlize-defang-local-variables) (when
> htmlize-replace-form-feeds (goto-char (point-min)) (let ((source
> (htmlize-protect-string "\n\f")) (replacement (if (stringp
> htmlize-replace-form-feeds) htmlize-replace-form-feeds "</pre><hr
> /><pre>"))) (while (search-forward source nil t) (replace-match
> replacement t t)))) (goto-char (point-min)) (when
> htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set
> (make-local-variable (quote htmlize-buffer-places)) places) (run-hooks
> (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf)
> (save-excursion (save-excursion (run-hooks (quote
> htmlize-before-hook))) (htmlize-ensure-fontified) (clrhash
> htmlize-extended-character-cache) (clrhash htmlize-memoization-table)
> (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map
> (htmlize-make-face-map (adjoin (quote default) buffer-faces)))
> (htmlbuf (generate-new-buffer (if (buffer-file-name)
> (htmlize-make-file-name (file-name-nondirectory ...)) "*html*")))
> (places (quote (nil nil))) (title (if (buffer-file-name)
> (file-name-nondirectory (buffer-file-name)) (buffer-name))))
> (with-current-buffer htmlbuf (buffer-disable-undo) (insert
> (htmlize-method doctype) 10 (format "<!-- Created by htmlize-%s in %s
> mode. -->\n" htmlize-version htmlize-output-type)
> "<html>\n ") (plist-put places (quote head-start) (point-marker))
> (insert "<head>\n" " <title>" (htmlize-protect-string title)
> "</title>\n" (if htmlize-html-charset (format (concat " <meta
> http-equiv=\"Content-Type\" "
> "content=\"text/html; charset=%s\">\n") htmlize-html-charset) "")
> htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map)
> (insert " </head>") (plist-put places (quote head-end) (point-marker))
> (insert "\n ") (plist-put
> places (quote body-start) (point-marker)) (insert (htmlize-method
> body-tag face-map) "\n ") (plist-put places (quote content-start)
> (point-marker)) (insert "<pre>\n")) (let ((insert-text-method
> (htmlize-method-function (quote
> insert-text))) next-change text face-list fstruct-list
> trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq
> next-change (htmlize-next-change (point) (quote face))) (setq
> face-list (htmlize-faces-at-point) fstruct-list (delq
> nil (mapcar (lambda ... ...) face-list))) (setq text
> (htmlize-buffer-substring-no-invisible (point) next-change)) (when
> trailing-ellipsis (setq text (htmlize-trim-ellipsis text))) (when (>
> (length text) 0) (setq trailing-ellipsis
> (get-text-property (1- ...) (quote htmlize-ellipsis) text))) (setq
> text (htmlize-untabify text (current-column))) (setq text
> (htmlize-protect-string text)) (when (> (length text) 0) (funcall
> insert-text-method text fstruct-list htmlbuf))
> (goto-char next-change))) (with-current-buffer htmlbuf (insert
> "</pre>") (plist-put places (quote content-end) (point-marker))
> (insert "\n </body>") (plist-put places (quote body-end)
> (point-marker)) (insert "\n</html>\n") (when
> htmlize-generate-hyperlinks (htmlize-make-hyperlinks))
> (htmlize-defang-local-variables) (when htmlize-replace-form-feeds
> (goto-char (point-min)) (let ((source (htmlize-protect-string "\n\f"))
> (replacement (if ... htmlize-replace-form-feeds
> "</pre><hr /><pre>"))) (while (search-forward source nil t)
> (replace-match replacement t t)))) (goto-char (point-min)) (when
> htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set
> (make-local-variable (quote htmlize-buffer-places))
> places) (run-hooks (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf))
> htmlize-buffer-1()
> (save-current-buffer (set-buffer (or buffer (current-buffer))) (htmlize-buffer-1))
> (with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1))
> (let ((htmlbuf (with-current-buffer (or buffer (current-buffer))
> (htmlize-buffer-1)))) (when (interactive-p) (switch-to-buffer
> htmlbuf)) htmlbuf)
> htmlize-buffer(#<buffer Agenda View>)
> (set-buffer (htmlize-buffer (current-buffer)))
> (cond ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
> (search-forward "<style") 6) (search-forward "</style>")) (insert
> org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message "Postscript written to %s"
> file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil
> nil (expand-file-name (concat (file-name-sans-extension file) ".ps"))
> (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require
> (quote org-icalendar)) (let ((org-agenda-marker-table
> (org-create-marker-find-array
> (org-agenda-collect-markers))) (org-icalendar-verify-function (quote
> org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file
> file)) (apply (quote org-export-icalendar) (quote combine)
> (org-agenda-files nil (quote ifmode))))) (t
> (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert
> bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain
> text written to %s" file))))
> (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil)
> (insert bs) (org-agenda-remove-marked-text (quote org-filtered))
> (while (setq beg (text-property-any (point-min) (point-max) (quote
> org-filtered) t)) (delete-region beg
> (or (next-single-property-change beg (quote org-filtered))
> (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
> (search-forward "<style") 6) (search-forward "</style>")) (insert
> org-agenda-export-html-style)) (write-file file) (kill-buffer
> (current-buffer)) (message "HTML written to %s" file)) ((string-match
> "\\.ps\\'" file) (require (quote
> ps-print)) (ps-print-buffer-with-faces file) (message "Postscript
> written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote
> ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process
> "ps2pdf" nil nil nil (expand-file-name (concat
> (file-name-sans-extension file) ".ps")) (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file)) ((string-match "\\.ics\\'"
> file) (require (quote org-icalendar)) (let ((org-agenda-marker-table
> (org-create-marker-find-array (org-agenda-collect-markers)))
> (org-icalendar-verify-function (quote org-check-agenda-marker-table))
> (org-combined-agenda-icalendar-file
> file)) (apply (quote org-export-icalendar) (quote combine)
> (org-agenda-files nil (quote ifmode))))) (t (let ((bs
> (buffer-string))) (find-file file) (erase-buffer) (insert bs)
> (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain
> text written to %s" file)))))
> (unwind-protect (progn (rename-buffer "Agenda View" t)
> (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text
> (quote org-filtered)) (while (setq beg (text-property-any (point-min)
> (point-max) (quote org-filtered) t))
> (delete-region beg (or (next-single-property-change beg (quote
> org-filtered)) (point-max)))) (run-hooks (quote
> org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
> org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
> file)) ((string-match "\\.html?\\'" file) (require (quote htmlize))
> (set-buffer (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min))
> (kill-region (- (search-forward "<style") 6) (search-forward
> "</style>")) (insert org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require
> (quote ps-print)) (ps-print-buffer-with-faces file) (message
> "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps"))
> (call-process "ps2pdf" nil nil nil (expand-file-name (concat
> (file-name-sans-extension file) ".ps")) (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file)) ((string-match
> "\\.ics\\'" file) (require (quote org-icalendar)) (let
> ((org-agenda-marker-table (org-create-marker-find-array ...))
> (org-icalendar-verify-function (quote org-check-agenda-marker-table))
> (org-combined-agenda-icalendar-file file)) (apply
> (quote org-export-icalendar) (quote combine) (org-agenda-files nil
> (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file)
> (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
> (current-buffer)) (message "Plain text written to
> %s" file))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
> (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
> (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert
> bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq
> beg (text-property-any
> (point-min) (point-max) (quote org-filtered) t)) (delete-region beg
> (or (next-single-property-change beg (quote org-filtered))
> (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p
> org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
> file)) ((string-match "\\.html?\\'" file) (require (quote htmlize))
> (set-buffer (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match
> "<style>" org-agenda-export-html-style)) (goto-char (point-min))
> (kill-region (- ... 6) (search-forward "</style>")) (insert
> org-agenda-export-html-style)) (write-file file) (kill-buffer
> (current-buffer)) (message "HTML written to %s"
> file)) ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message "Postscript written to %s"
> file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil
> nil (expand-file-name (concat ... ".ps")) (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file))
> ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let
> ((org-agenda-marker-table ...) (org-icalendar-verify-function ...)
> (org-combined-agenda-icalendar-file file)) (apply (quote
> org-export-icalendar) (quote combine)
> (org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file)
> (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
> (current-buffer)) (message "Plain text written to %s" file))))) (and
> (buffer-name temp-buffer) (kill-buffer
> temp-buffer))))
> (with-current-buffer temp-buffer (unwind-protect (progn
> (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert
> bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq
> beg (text-property-any (point-min)
> (point-max) (quote org-filtered) t)) (delete-region beg (or
> (next-single-property-change beg (quote org-filtered)) (point-max))))
> (run-hooks (quote org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
> ... 6) (search-forward "</style>")) (insert
> org-agenda-export-html-style)) (write-file file) (kill-buffer
> (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message "Postscript written to %s"
> file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil
> nil (expand-file-name (concat ... ".ps")) (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file))
> ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let
> ((org-agenda-marker-table ...) (org-icalendar-verify-function ...)
> (org-combined-agenda-icalendar-file file)) (apply (quote
> org-export-icalendar) (quote combine)
> (org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file)
> (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
> (current-buffer)) (message "Plain text written to %s" file))))) (and
> (buffer-name temp-buffer) (kill-buffer
> temp-buffer))))
> (let ((temp-buffer (generate-new-buffer " *temp*")))
> (with-current-buffer temp-buffer (unwind-protect (progn (rename-buffer
> "Agenda View" t) (set-buffer-modified-p nil) (insert bs)
> (org-agenda-remove-marked-text (quote org-filtered))
> (while (setq beg (text-property-any (point-min) (point-max) (quote
> org-filtered) t)) (delete-region beg (or (next-single-property-change
> beg ...) (point-max)))) (run-hooks (quote
> org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
> org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
> file)) ((string-match "\\.html?\\'" file) (require (quote htmlize))
> (set-buffer (htmlize-buffer ...)) (when (and
> org-agenda-export-html-style ...) (goto-char ...) (kill-region
> ... ...) (insert org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message
> "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> ... ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name ...)
> (expand-file-name file)) (delete-file
> (concat ... ".ps")) (message "PDF written to %s" file)) ((string-match
> "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...)
> (apply ... ... ...))) (t (let (...) (find-file file) (erase-buffer)
> (insert bs) (save-buffer 0)
> (kill-buffer ...) (message "Plain text written to %s" file))))) (and
> (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
> (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 (text-property-any (point-min)
> (point-max) (quote org-filtered) t))
> (delete-region beg (or (next-single-property-change beg (quote
> org-filtered)) (point-max)))) (run-hooks (quote
> org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
> org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
> file)) ((string-match "\\.html?\\'" file) (require (quote htmlize))
> (set-buffer (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min))
> (kill-region (- (search-forward "<style") 6) (search-forward
> "</style>")) (insert org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require
> (quote ps-print)) (ps-print-buffer-with-faces file) (message
> "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps"))
> (call-process "ps2pdf" nil nil nil (expand-file-name (concat
> (file-name-sans-extension file) ".ps")) (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file)) ((string-match
> "\\.ics\\'" file) (require (quote org-icalendar)) (let
> ((org-agenda-marker-table (org-create-marker-find-array
> (org-agenda-collect-markers))) (org-icalendar-verify-function (quote
> org-check-agenda-marker-table))
> (org-combined-agenda-icalendar-file file)) (apply (quote
> org-export-icalendar) (quote combine) (org-agenda-files nil (quote
> ifmode))))) (t (let ((bs (buffer-string))) (find-file file)
> (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
> (current-buffer)) (message "Plain text written to %s" file)))))
> (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq
> beg (text-property-any (point-min) (point-max) (quote org-filtered)
> t)) (delete-region beg (or (next-single-property-change beg (quote
> org-filtered)) (point-max)))) (run-hooks (quote
> org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer (current-buffer))) (when (and
> org-agenda-export-html-style (string-match "<style>"
> org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
> (search-forward "<style") 6) (search-forward "</style>")) (insert
> org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message "Postscript written to %s"
> file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil
> nil (expand-file-name (concat (file-name-sans-extension file) ".ps"))
> (expand-file-name file))
> (delete-file (concat (file-name-sans-extension file) ".ps")) (message
> "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require
> (quote org-icalendar)) (let ((org-agenda-marker-table
> (org-create-marker-find-array ...))
> (org-icalendar-verify-function (quote org-check-agenda-marker-table))
> (org-combined-agenda-icalendar-file file)) (apply (quote
> org-export-icalendar) (quote combine) (org-agenda-files nil (quote
> ifmode))))) (t (let ((bs (buffer-string)))
> (find-file file) (erase-buffer) (insert bs) (save-buffer 0)
> (kill-buffer (current-buffer)) (message "Plain text written to %s"
> file))))))
> (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs
> (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg
> (text-property-any (point-min) (point-max) (quote org-filtered) t))
> (delete-region beg (or (next-single-property-change beg (quote
> org-filtered)) (point-max))))
> (run-hooks (quote org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer
> (current-buffer))) (when (and org-agenda-export-html-style
> (string-match "<style>" org-agenda-export-html-style)) (goto-char
> (point-min)) (kill-region (- ... 6) (search-forward "</style>"))
> (insert org-agenda-export-html-style)) (write-file
> file) (kill-buffer (current-buffer)) (message "HTML written to %s"
> file)) ((string-match "\\.ps\\'" file) (require (quote ps-print))
> (ps-print-buffer-with-faces file) (message "Postscript written to %s"
> file)) ((string-match "\\.pdf\\'"
> file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil
> nil (expand-file-name (concat ... ".ps")) (expand-file-name file))
> (delete-file (concat
> (file-name-sans-extension file) ".ps")) (message "PDF written to %s"
> file)) ((string-match "\\.ics\\'" file) (require (quote
> org-icalendar)) (let ((org-agenda-marker-table ...)
> (org-icalendar-verify-function ...)
> (org-combined-agenda-icalendar-file file)) (apply (quote
> org-export-icalendar) (quote combine) (org-agenda-files nil ...)))) (t
> (let ((bs ...)) (find-file file) (erase-buffer) (insert bs)
> (save-buffer 0) (kill-buffer (current-buffer))
> (message "Plain text written to %s" file)))))))
> (save-excursion (save-window-excursion
> (org-agenda-mark-filtered-text) (let ((bs (copy-sequence
> (buffer-string))) 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 (quote org-filtered)) (while (setq
> beg (text-property-any (point-min) (point-max) (quote org-filtered)
> t)) (delete-region beg (or (next-single-property-change beg ...)
> (point-max)))) (run-hooks (quote
> org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
> org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
> file)) ((string-match "\\.html?\\'" file) (require (quote htmlize))
> (set-buffer (htmlize-buffer ...)) (when (and
> org-agenda-export-html-style ...) (goto-char ...) (kill-region
> ... ...) (insert org-agenda-export-html-style)) (write-file file)
> (kill-buffer (current-buffer)) (message "HTML written to %s" file))
> ((string-match "\\.ps\\'" file) (require
> (quote ps-print)) (ps-print-buffer-with-faces file) (message
> "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
> (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> ... ".ps")) (call-process "ps2pdf" nil nil nil
> (expand-file-name ...) (expand-file-name file)) (delete-file (concat
> ... ".ps")) (message "PDF written to %s" file)) ((string-match
> "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...)
> (apply ... ... ...))) (t (let (...)
> (find-file file) (erase-buffer) (insert bs) (save-buffer 0)
> (kill-buffer ...) (message "Plain text written to %s" file))))))))
> (let nil (save-excursion (save-window-excursion
> (org-agenda-mark-filtered-text) (let ((bs (copy-sequence
> (buffer-string))) 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 (quote org-filtered))
> (while (setq beg (text-property-any ... ... ... t)) (delete-region beg
> (or ... ...))) (run-hooks (quote org-agenda-before-write-hook)) (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
> ... ... ... ... ... ... ...))))))) #<buffer *Org Agenda*>)
> eval((let nil (save-excursion (save-window-excursion
> (org-agenda-mark-filtered-text) (let ((bs (copy-sequence
> (buffer-string))) 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
> (quote org-filtered)) (while (setq beg (text-property-any
> ... ... ... t)) (delete-region beg (or ... ...))) (run-hooks (quote
> org-agenda-before-write-hook)) (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 ... ... ... ... ... ... ...))))))) #<buffer *Org
> Agenda*>))
> org-let(nil (save-excursion (save-window-excursion
> (org-agenda-mark-filtered-text) (let ((bs (copy-sequence
> (buffer-string))) 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 (quote org-filtered))
> (while (setq beg (text-property-any (point-min) (point-max) (quote
> org-filtered) t)) (delete-region beg (or (next-single-property-change
> beg ...) (point-max))))
> (run-hooks (quote org-agenda-before-write-hook)) (cond
> ((org-bound-and-true-p org-mobile-creating-agendas)
> (org-mobile-write-agenda-for-mobile file)) ((string-match
> "\\.html?\\'" file) (require (quote htmlize)) (set-buffer
> (htmlize-buffer
> ...)) (when (and org-agenda-export-html-style ...) (goto-char ...)
> (kill-region ... ...) (insert org-agenda-export-html-style))
> (write-file file) (kill-buffer (current-buffer)) (message "HTML
> written to %s" file)) ((string-match "\\.ps\\'"
> file) (require (quote ps-print)) (ps-print-buffer-with-faces file)
> (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'"
> file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
> ... ".ps")) (call-process "ps2pdf"
> nil nil nil (expand-file-name ...) (expand-file-name file))
> (delete-file (concat ... ".ps")) (message "PDF written to %s" file))
> ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let
> (... ... ...) (apply ... ... ...))) (t
> (let (...) (find-file file) (erase-buffer) (insert bs) (save-buffer 0)
> (kill-buffer ...) (message "Plain text written to %s" file))))))))
> #<buffer *Org Agenda*>)
> org-write-agenda(#("~/agenda.html" 8 9 (rear-nonsticky t)) nil)
> call-interactively(org-write-agenda nil nil)
>
>
>
>
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-15 18:30 ` Jambunathan K
@ 2011-07-16 17:04 ` Bastien
2011-07-17 9:02 ` Rainer Stengele
0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2011-07-16 17:04 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode, Rainer Stengele
Jambunathan K <kjambunathan@gmail.com> writes:
> +(defface org-default
> + (org-compatible-face 'default nil)
> + "Face used for default text."
> + :group 'org-faces)
>
> author Bastien Guerry <bzg@altern.org>
> Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
> committer Bastien Guerry <bzg@altern.org>
> Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
> commit 7a88eaec295d50a6e27cc1d6b6f1a725ace01076
> tree 91e803908793a91bb614a775c599dda172c72385 tree | snapshot
> parent c6b22dee33fa418b344fa68bf36bb496db473a89
>
> Revback your commit to c6b22d level and see if the problem persists.
Yes, doing this will also be useful, on top of letting us know
how to reproduce the problem.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-16 17:04 ` Bastien
@ 2011-07-17 9:02 ` Rainer Stengele
2011-07-18 6:51 ` Bastien
0 siblings, 1 reply; 10+ messages in thread
From: Rainer Stengele @ 2011-07-17 9:02 UTC (permalink / raw)
To: Bastien; +Cc: Rainer Stengele, emacs-orgmode, Jambunathan K
Am 16.07.2011 19:04, schrieb Bastien:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> +(defface org-default
>> + (org-compatible-face 'default nil)
>> + "Face used for default text."
>> + :group 'org-faces)
>>
>> author Bastien Guerry <bzg@altern.org>
>> Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
>> committer Bastien Guerry <bzg@altern.org>
>> Wed, 6 Jul 2011 15:25:29 +0000 (17:25 +0200)
>> commit 7a88eaec295d50a6e27cc1d6b6f1a725ace01076
>> tree 91e803908793a91bb614a775c599dda172c72385 tree | snapshot
>> parent c6b22dee33fa418b344fa68bf36bb496db473a89
>>
>> Revback your commit to c6b22d level and see if the problem persists.
>
> Yes, doing this will also be useful, on top of letting us know
> how to reproduce the problem.
>
> Thanks,
>
release_7.5-584-gc6b22
Org-mode version 7.5 (release_7.5.584.gc6b22)
face-attribute: Invalid face
problem is still the same. I hope I did the right thing going back to that rev.
I am not used using git yet. I did:
make clean
git checkout c6b22d
How can I go back to the current development?
Thanks,
Rainer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-15 16:46 error writing agenda view to html file Rainer Stengele
2011-07-15 18:30 ` Jambunathan K
@ 2011-07-16 17:03 ` Bastien
2011-07-18 6:57 ` Rainer Stengele
1 sibling, 1 reply; 10+ messages in thread
From: Bastien @ 2011-07-16 17:03 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
Hi Rainer,
Rainer Stengele <rainer.stengele@diplan.de> writes:
> In agenda view doing a C-x C-w produces a face related error.
I cannot reproduce this. C-x C-w works fine in the agenda views
I could test.
> Can somebody help me out finding the issue in this debug message?
Please send a small file.org with the agenda config to reproduce
this problem with latest Org.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-16 17:03 ` Bastien
@ 2011-07-18 6:57 ` Rainer Stengele
2011-07-18 8:51 ` Bastien
0 siblings, 1 reply; 10+ messages in thread
From: Rainer Stengele @ 2011-07-18 6:57 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 39256 bytes --]
Am 16.07.2011 19:03, schrieb Bastien:
> Hi Rainer,
>
> Rainer Stengele <rainer.stengele@diplan.de> writes:
>
>> In agenda view doing a C-x C-w produces a face related error.
>
> I cannot reproduce this. C-x C-w works fine in the agenda views
> I could test.
>
>> Can somebody help me out finding the issue in this debug message?
>
> Please send a small file.org with the agenda config to reproduce
> this problem with latest Org.
>
> Thanks!
>
Hi Bastien,
attached please find a simple smal org file.
Bein gin the file I enter
C-c a y a
and get the error (see dump). I am quite sure it is some misconfiguration in my settings but I just don't know how to find it.
Org-mode version 7.6 (release_7.6.88.gd1c9)
Debugger entered--Lisp error: (error "Invalid face")
internal-get-lisp-face-attribute(nil :height nil)
face-attribute(nil :height)
(setq h (face-attribute f :height))
(while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil))
(let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote unspecified)) nil
h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))
(catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push
(if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f
:height)) (push (if (eq h (quote unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--))))
(block nil (let* ((f nil) (h nil) (--cl-var-- nil) (--cl-var-- t)) (while (progn (setq f (if --cl-var-- face (face-attribute f :inherit))) (not (eq f (quote unspecified)))) (setq h (face-attribute f :height)) (push (if (eq h (quote
unspecified)) nil h) --cl-var--) (setq --cl-var-- nil)) (nreverse --cl-var--)))
(loop for f = face then (face-attribute f :inherit) until (eq f (quote unspecified)) for h = (face-attribute f :height) collect (if (eq h (quote unspecified)) nil h))
(let ((size-list (loop for f = face then (face-attribute f :inherit) until (eq f (quote unspecified)) for h = (face-attribute f :height) collect (if (eq h (quote unspecified)) nil h)))) (reduce (quote htmlize-merge-size) (cons nil
size-list)))
htmlize-face-size(default)
(let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf (htmlize-fstruct-size fstruct) size)))
(cond (htmlize-running-xemacs (let* ((font-instance (face-font-instance face)) (props (font-instance-properties font-instance))) (when (equalp (cdr (assq (quote WEIGHT_NAME) props)) "bold") (setf (htmlize-fstruct-boldp fstruct) t)) (when
(or (equalp (cdr (assq ... props)) "i") (equalp (cdr (assq ... props)) "o")) (setf (htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct)
(face-underline-p face)))) ((fboundp (quote face-attribute)) (dolist (attr (quote (:weight :slant :underline :overline :strike-through))) (let ((value (if (>= emacs-major-version 22) (face-attribute face attr nil t) (let ... ... ...))))
(when (and value (not (eq value ...))) (htmlize-face-emacs21-attr fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf (htmlize-fstruct-size fstruct) size)))) (t (when (fboundp (quote face-bold-p))
(setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when (fboundp (quote face-italic-p)) (setf (htmlize-fstruct-italicp fstruct) (face-italic-p face))) (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face))))
(let ((fstruct (make-htmlize-fstruct :foreground (htmlize-color-to-rgb (htmlize-face-foreground face)) :background (htmlize-color-to-rgb (htmlize-face-background face))))) (cond (htmlize-running-xemacs (let* ((font-instance
(face-font-instance face)) (props (font-instance-properties font-instance))) (when (equalp (cdr (assq ... props)) "bold") (setf (htmlize-fstruct-boldp fstruct) t)) (when (or (equalp (cdr ...) "i") (equalp (cdr ...) "o")) (setf
(htmlize-fstruct-italicp fstruct) t)) (setf (htmlize-fstruct-strikep fstruct) (face-strikethru-p face)) (setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face)))) ((fboundp (quote face-attribute)) (dolist (attr (quote (:weight
:slant :underline :overline :strike-through))) (let ((value (if ... ... ...))) (when (and value (not ...)) (htmlize-face-emacs21-attr fstruct attr value)))) (let ((size (htmlize-face-size face))) (unless (eql size 1.0) (setf
(htmlize-fstruct-size fstruct) size)))) (t (when (fboundp (quote face-bold-p)) (setf (htmlize-fstruct-boldp fstruct) (face-bold-p face))) (when (fboundp (quote face-italic-p)) (setf (htmlize-fstruct-italicp fstruct) (face-italic-p face)))
(setf (htmlize-fstruct-underlinep fstruct) (face-underline-p face)))) (setf (htmlize-fstruct-css-name fstruct) (let ((name (downcase (symbol-name face)))) (when (string-match "\\`font-lock-" name) (setq name (replace-match "" t t name)))
(when (string-match "-face\\'" name) (setq name (replace-match "" t t name))) (while (string-match "[^-a-zA-Z0-9]" name) (setq name (replace-match "X" t t name))) (when (string-match "\\`[-0-9]" name) (setq name (concat "X" name))) (when
(equal name "") (setq name "face")) (setq name (concat htmlize-css-name-prefix name)) name)) fstruct)
htmlize-face-to-fstruct(default)
(if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))
(let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member
new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))
(if (gethash face face-map) nil (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name
css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))
(unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name
css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))
(while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct)
(let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name
fstruct) new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face))))
(setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name ...))) (unless (equal new-name css-name) (setf
(htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)
(catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if ... ... ...))) (setf (gethash face face-map) fstruct)
(let* ((css-name ...) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name ...)) (unless (equal new-name css-name) (setf ... new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct ...)) (setf (gethash face face-map)
fstruct) (let* (... ... ...) (while ... ...) (unless ... ...) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)))
(block nil (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ((fstruct (if ... ... ...))) (setf (gethash face face-map) fstruct) (let* ((css-name
...) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name ...)) (unless (equal new-name css-name) (setf ... new-name)) (push new-name css-names)))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil))
(dolist (face faces) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name
fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name (incf i)))) (unless (equal new-name css-name) (setf (htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names)))))
(let ((face-map (make-hash-table :test (quote equal))) css-names) (dolist (face faces) (unless (gethash face face-map) (let ((fstruct (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)))) (setf (gethash
face face-map) fstruct) (let* ((css-name (htmlize-fstruct-css-name fstruct)) (new-name css-name) (i 0)) (while (member new-name css-names) (setq new-name (format "%s-%s" css-name ...))) (unless (equal new-name css-name) (setf
(htmlize-fstruct-css-name fstruct) new-name)) (push new-name css-names))))) face-map)
htmlize-make-face-map((default org-agenda-date-weekend org-agenda-diary org-agenda-date org-agenda-date-today))
(let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map (htmlize-make-face-map (adjoin (quote default) buffer-faces))) (htmlbuf (generate-new-buffer (if (buffer-file-name) (htmlize-make-file-name (file-name-nondirectory
(buffer-file-name))) "*html*"))) (places (quote (nil nil))) (title (if (buffer-file-name) (file-name-nondirectory (buffer-file-name)) (buffer-name)))) (with-current-buffer htmlbuf (buffer-disable-undo) (insert (htmlize-method doctype) 10
(format "<!-- Created by htmlize-%s in %s mode. -->\n" htmlize-version htmlize-output-type) "<html>\n ") (plist-put places (quote head-start) (point-marker)) (insert "<head>\n" " <title>" (htmlize-protect-string title) "</title>\n" (if
htmlize-html-charset (format (concat " <meta http-equiv=\"Content-Type\" " "content=\"text/html; charset=%s\">\n") htmlize-html-charset) "") htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map) (insert " </head>")
(plist-put places (quote head-end) (point-marker)) (insert "\n ") (plist-put places (quote body-start) (point-marker)) (insert (htmlize-method body-tag face-map) "\n ") (plist-put places (quote content-start) (point-marker)) (insert
"<pre>\n")) (let ((insert-text-method (htmlize-method-function (quote insert-text))) next-change text face-list fstruct-list trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq next-change (htmlize-next-change (point)
(quote face))) (setq face-list (htmlize-faces-at-point) fstruct-list (delq nil (mapcar (lambda (f) (gethash f face-map)) face-list))) (setq text (htmlize-buffer-substring-no-invisible (point) next-change)) (when trailing-ellipsis (setq text
(htmlize-trim-ellipsis text))) (when (> (length text) 0) (setq trailing-ellipsis (get-text-property (1- (length text)) (quote htmlize-ellipsis) text))) (setq text (htmlize-untabify text (current-column))) (setq text (htmlize-protect-string
text)) (when (> (length text) 0) (funcall insert-text-method text fstruct-list htmlbuf)) (goto-char next-change))) (with-current-buffer htmlbuf (insert "</pre>") (plist-put places (quote content-end) (point-marker)) (insert "\n </body>")
(plist-put places (quote body-end) (point-marker)) (insert "\n</html>\n") (when htmlize-generate-hyperlinks (htmlize-make-hyperlinks)) (htmlize-defang-local-variables) (when htmlize-replace-form-feeds (goto-char (point-min)) (let ((source
(htmlize-protect-string "\n\f")) (replacement (if (stringp htmlize-replace-form-feeds) htmlize-replace-form-feeds "</pre><hr /><pre>"))) (while (search-forward source nil t) (replace-match replacement t t)))) (goto-char (point-min)) (when
htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set (make-local-variable (quote htmlize-buffer-places)) places) (run-hooks (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf)
(save-excursion (save-excursion (run-hooks (quote htmlize-before-hook))) (htmlize-ensure-fontified) (clrhash htmlize-extended-character-cache) (clrhash htmlize-memoization-table) (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map
(htmlize-make-face-map (adjoin (quote default) buffer-faces))) (htmlbuf (generate-new-buffer (if (buffer-file-name) (htmlize-make-file-name (file-name-nondirectory ...)) "*html*"))) (places (quote (nil nil))) (title (if (buffer-file-name)
(file-name-nondirectory (buffer-file-name)) (buffer-name)))) (with-current-buffer htmlbuf (buffer-disable-undo) (insert (htmlize-method doctype) 10 (format "<!-- Created by htmlize-%s in %s mode. -->\n" htmlize-version htmlize-output-type)
"<html>\n ") (plist-put places (quote head-start) (point-marker)) (insert "<head>\n" " <title>" (htmlize-protect-string title) "</title>\n" (if htmlize-html-charset (format (concat " <meta http-equiv=\"Content-Type\" "
"content=\"text/html; charset=%s\">\n") htmlize-html-charset) "") htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map) (insert " </head>") (plist-put places (quote head-end) (point-marker)) (insert "\n ") (plist-put
places (quote body-start) (point-marker)) (insert (htmlize-method body-tag face-map) "\n ") (plist-put places (quote content-start) (point-marker)) (insert "<pre>\n")) (let ((insert-text-method (htmlize-method-function (quote
insert-text))) next-change text face-list fstruct-list trailing-ellipsis) (goto-char (point-min)) (while (not (eobp)) (setq next-change (htmlize-next-change (point) (quote face))) (setq face-list (htmlize-faces-at-point) fstruct-list (delq
nil (mapcar (lambda ... ...) face-list))) (setq text (htmlize-buffer-substring-no-invisible (point) next-change)) (when trailing-ellipsis (setq text (htmlize-trim-ellipsis text))) (when (> (length text) 0) (setq trailing-ellipsis
(get-text-property (1- ...) (quote htmlize-ellipsis) text))) (setq text (htmlize-untabify text (current-column))) (setq text (htmlize-protect-string text)) (when (> (length text) 0) (funcall insert-text-method text fstruct-list htmlbuf))
(goto-char next-change))) (with-current-buffer htmlbuf (insert "</pre>") (plist-put places (quote content-end) (point-marker)) (insert "\n </body>") (plist-put places (quote body-end) (point-marker)) (insert "\n</html>\n") (when
htmlize-generate-hyperlinks (htmlize-make-hyperlinks)) (htmlize-defang-local-variables) (when htmlize-replace-form-feeds (goto-char (point-min)) (let ((source (htmlize-protect-string "\n\f")) (replacement (if ... htmlize-replace-form-feeds
"</pre><hr /><pre>"))) (while (search-forward source nil t) (replace-match replacement t t)))) (goto-char (point-min)) (when htmlize-html-major-mode (funcall htmlize-html-major-mode)) (set (make-local-variable (quote htmlize-buffer-places))
places) (run-hooks (quote htmlize-after-hook)) (buffer-enable-undo)) htmlbuf))
htmlize-buffer-1()
(save-current-buffer (set-buffer (or buffer (current-buffer))) (htmlize-buffer-1))
(with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1))
(let ((htmlbuf (with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1)))) (when (interactive-p) (switch-to-buffer htmlbuf)) htmlbuf)
htmlize-buffer(#<buffer Agenda View>)
(set-buffer (htmlize-buffer (current-buffer)))
(cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and
org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file)
(kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
(require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file))
(delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array
(org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t
(let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))
(progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg
(or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match
"\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (-
(search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote
ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process
"ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'"
file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array (org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file
file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain
text written to %s" file)))))
(unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t))
(delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min))
(kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps"))
(call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match
"\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array ...)) (org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply
(quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to
%s" file))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any
(point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match
"<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s"
file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
(file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file))
((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine)
(org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered)) (while (setq beg (text-property-any (point-min)
(point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas)
(org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>"
org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file))
((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat
(file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file))
((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine)
(org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (rename-buffer "Agenda View" t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text (quote org-filtered))
(while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p
org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer ...)) (when (and org-agenda-export-html-style ...) (goto-char ...) (kill-region
... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message
"Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name ...) (expand-file-name file)) (delete-file
(concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t (let (...) (find-file file) (erase-buffer) (insert bs) (save-buffer 0)
(kill-buffer ...) (message "Plain text written to %s" file))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(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 (text-property-any (point-min) (point-max) (quote org-filtered) t))
(delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile
file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min))
(kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps"))
(call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file)) (delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match
"\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array (org-agenda-collect-markers))) (org-icalendar-verify-function (quote org-check-agenda-marker-table))
(org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string))) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer
(current-buffer)) (message "Plain text written to %s" file)))))
(let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq
beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max)))) (run-hooks (quote org-agenda-before-write-hook)) (cond
((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer (current-buffer))) (when (and
org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- (search-forward "<style") 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file file)
(kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file)
(require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat (file-name-sans-extension file) ".ps")) (expand-file-name file))
(delete-file (concat (file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table (org-create-marker-find-array ...))
(org-icalendar-verify-function (quote org-check-agenda-marker-table)) (org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil (quote ifmode))))) (t (let ((bs (buffer-string)))
(find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer)) (message "Plain text written to %s" file))))))
(save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg (quote org-filtered)) (point-max))))
(run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer
(current-buffer))) (when (and org-agenda-export-html-style (string-match "<style>" org-agenda-export-html-style)) (goto-char (point-min)) (kill-region (- ... 6) (search-forward "</style>")) (insert org-agenda-export-html-style)) (write-file
file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'"
file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat (file-name-sans-extension file) ".ps")) (call-process "ps2pdf" nil nil nil (expand-file-name (concat ... ".ps")) (expand-file-name file)) (delete-file (concat
(file-name-sans-extension file) ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let ((org-agenda-marker-table ...) (org-icalendar-verify-function ...)
(org-combined-agenda-icalendar-file file)) (apply (quote org-export-icalendar) (quote combine) (org-agenda-files nil ...)))) (t (let ((bs ...)) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer (current-buffer))
(message "Plain text written to %s" file)))))))
(save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max)))) (run-hooks (quote
org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer ...)) (when (and
org-agenda-export-html-style ...) (goto-char ...) (kill-region ... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'" file) (require
(quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf" nil nil nil
(expand-file-name ...) (expand-file-name file)) (delete-file (concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t (let (...)
(find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer ...) (message "Plain text written to %s" file))))))))
(let nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any ... ... ... t)) (delete-region beg (or ... ...))) (run-hooks (quote org-agenda-before-write-hook)) (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 ... ... ... ... ... ... ...))))))) #<buffer *Org Agenda*>)
eval((let nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any ... ... ... t)) (delete-region beg (or ... ...))) (run-hooks (quote org-agenda-before-write-hook)) (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 ... ... ... ... ... ... ...))))))) #<buffer *Org Agenda*>))
org-let(nil (save-excursion (save-window-excursion (org-agenda-mark-filtered-text) (let ((bs (copy-sequence (buffer-string))) 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 (quote org-filtered)) (while (setq beg (text-property-any (point-min) (point-max) (quote org-filtered) t)) (delete-region beg (or (next-single-property-change beg ...) (point-max))))
(run-hooks (quote org-agenda-before-write-hook)) (cond ((org-bound-and-true-p org-mobile-creating-agendas) (org-mobile-write-agenda-for-mobile file)) ((string-match "\\.html?\\'" file) (require (quote htmlize)) (set-buffer (htmlize-buffer
...)) (when (and org-agenda-export-html-style ...) (goto-char ...) (kill-region ... ...) (insert org-agenda-export-html-style)) (write-file file) (kill-buffer (current-buffer)) (message "HTML written to %s" file)) ((string-match "\\.ps\\'"
file) (require (quote ps-print)) (ps-print-buffer-with-faces file) (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require (quote ps-print)) (ps-print-buffer-with-faces (concat ... ".ps")) (call-process "ps2pdf"
nil nil nil (expand-file-name ...) (expand-file-name file)) (delete-file (concat ... ".ps")) (message "PDF written to %s" file)) ((string-match "\\.ics\\'" file) (require (quote org-icalendar)) (let (... ... ...) (apply ... ... ...))) (t
(let (...) (find-file file) (erase-buffer) (insert bs) (save-buffer 0) (kill-buffer ...) (message "Plain text written to %s" file)))))))) #<buffer *Org Agenda*>)
org-write-agenda(#("h:/agenda.html" 9 10 (rear-nonsticky t)) nil)
call-interactively(org-write-agenda nil nil)
recursive-edit()
byte-code("\306\x10\t@\307=\203!
[-- Attachment #2: test.org --]
[-- Type: text/org, Size: 603 bytes --]
#+TITLE: test.org
#+AUTHOR: Rainer Stengele
#+EMAIL: rainer@STENGELEPC
#+DATE: 2011-07-14 Do
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: de
#+OPTIONS: H:7 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:nil
#+OPTIONS: TeX:t LaTeX:t skip:t d:nil todo:nil pri:nil tags:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
* Test
** header 2
- item 1
* subitem 11
* subitem 12
- item 2
* subitem 21
* subitem 22
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file
2011-07-18 6:57 ` Rainer Stengele
@ 2011-07-18 8:51 ` Bastien
2011-07-18 9:51 ` error writing agenda view to html file => SOLVED Rainer Stengele
0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2011-07-18 8:51 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
Hi Rainer,
Rainer Stengele <rainer.stengele@diplan.de> writes:
> I am quite sure it is some misconfiguration
> in my settings but I just don't know how to find it.
If you changed some faces through M-x customize-face RET,
then you will have a (custom-set-faces ...) somewhere in
your configuration files (either in .emacs.el or some
other value of the variable custom-file, which see.
Can you send this part of the configuration?
Is anybody else able to reproduce this problem?
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: error writing agenda view to html file => SOLVED.
2011-07-18 8:51 ` Bastien
@ 2011-07-18 9:51 ` Rainer Stengele
2011-07-18 12:13 ` Bastien
0 siblings, 1 reply; 10+ messages in thread
From: Rainer Stengele @ 2011-07-18 9:51 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Am 18.07.2011 10:51, schrieb Bastien:
> Hi Rainer,
>
> Rainer Stengele <rainer.stengele@diplan.de> writes:
>
>> I am quite sure it is some misconfiguration
>> in my settings but I just don't know how to find it.
> If you changed some faces through M-x customize-face RET,
> then you will have a (custom-set-faces ...) somewhere in
> your configuration files (either in .emacs.el or some
> other value of the variable custom-file, which see.
>
> Can you send this part of the configuration?
>
> Is anybody else able to reproduce this problem?
>
> Thanks,
>
Hi Bastien,
after your hint about the
(custom-set-faces ...)
I could already imagine where the problem was:
The zenburn theme.
After updating it to the most recent version found here:
https://github.com/dbrock/zenburn-el
the export works, tested already for large agenda views.
Most excellent! Exported agenda looks perfect!
Thanks for helping me solve the problem!
Best,
- Rainer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-07-18 12:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 16:46 error writing agenda view to html file Rainer Stengele
2011-07-15 18:30 ` Jambunathan K
2011-07-16 17:04 ` Bastien
2011-07-17 9:02 ` Rainer Stengele
2011-07-18 6:51 ` Bastien
2011-07-16 17:03 ` Bastien
2011-07-18 6:57 ` Rainer Stengele
2011-07-18 8:51 ` Bastien
2011-07-18 9:51 ` error writing agenda view to html file => SOLVED Rainer Stengele
2011-07-18 12:13 ` Bastien
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).