[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] PATCH: Fix for agenda problems
From: |
Robert Goldman |
Subject: |
[Orgmode] PATCH: Fix for agenda problems |
Date: |
Thu, 29 Jul 2010 18:21:22 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 |
As far as I can tell, the current version of org-write-agenda evaluates
ps-print-buffer-with-faces too eagerly. I tripped over this because
aquamacs 2.0, which I'm using, seems to have ps-printing code that
conflicts with org-mode's expectation.
The attached patch tries to fix this, but does not do the job
particularly elegantly. Instead of EVALUATING the flet form, it
MACROEXPANDS that form, which I believe is correct in this context.
Please have a look at the patch and test it.
I believe you should be able to verify this problem with the git head by
doing something like:
1. (fmakunbound 'ps-print-buffer-with-faces)
2. push the mobile org agendas
If I am correct, then pushing the mobile org agendas, which does NOT
involve writing any postscript, will crash, because the
ps-print-buffer-with-faces will be called.
best,
r
PS I am not sure what the rules are about attachments on this mailing
list, so I am both attaching the patch and inserting it as text below.
>From 6bc0ba91667f84be9b7e334c517dad72f6eb277f Mon Sep 17 00:00:00 2001
From: Robert P. Goldman <address@hidden>
Date: Thu, 29 Jul 2010 18:11:21 -0500
Subject: [PATCH] Fixed macroexpansion bug for FLET in org-write-agenda
---
lisp/org-agenda.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index d62b193..b694ff3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2486,14 +2486,16 @@ higher priority settings."
(message "HTML written to %s" file))
((string-match "\\.ps\\'" file)
(require 'ps-print)
- ,(flet ((ps-get-buffer-name () "Agenda View"))
- (ps-print-buffer-with-faces file))
+ ,(macroexpand
+ '(flet ((ps-get-buffer-name () "Agenda View"))
+ (ps-print-buffer-with-faces file)))
(message "Postscript written to %s" file))
((string-match "\\.pdf\\'" file)
(require 'ps-print)
- ,(flet ((ps-get-buffer-name () "Agenda View"))
- (ps-print-buffer-with-faces
- (concat (file-name-sans-extension file) ".ps")))
+ ,(macroexpand
+ '(flet ((ps-get-buffer-name () "Agenda View"))
+ (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"))
--
1.7.1
0001-Fixed-macroexpansion-bug-for-FLET-in-org-write-agend.patch
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Orgmode] PATCH: Fix for agenda problems,
Robert Goldman <=