From 150e2db668e98e911c3af7dcde91bd9303b035ae Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 16 Mar 2012 18:55:41 +0100 Subject: [PATCH 1/3] org.el: Fix XEmacs compatibility bug when creating images. * org.el (org-create-formula-image, org-dvipng-color): Fix XEmacs compatibility bug. TINYCHANGE Thanks to Uwe Brauer for this patch. --- lisp/org.el | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f2a887f4e..c70b9244a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16988,7 +16988,7 @@ inspection." (dvifile (concat texfilebase ".dvi")) (pngfile (concat texfilebase ".png")) (fnh (if (featurep 'xemacs) - (font-height (get-face-font 'default)) + (font-height (face-font 'default)) (face-attribute 'default :height nil))) (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0)) (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.)))))) @@ -17017,13 +17017,19 @@ inspection." (if (not (file-exists-p dvifile)) (progn (message "Failed to create dvi file from %s" texfile) nil) (condition-case nil - (call-process "dvipng" nil nil nil + (if (featurep 'xemacs) + (call-process "dvipng" nil nil nil "-fg" fg "-bg" bg - "-D" dpi - ;;"-x" scale "-y" scale "-T" "tight" "-o" pngfile dvifile) + (call-process "dvipng" nil nil nil + "-fg" fg "-bg" bg + "-D" dpi + ;;"-x" scale "-y" scale + "-T" "tight" + "-o" pngfile + dvifile)) (error nil)) (if (not (file-exists-p pngfile)) (if org-format-latex-signal-error @@ -17099,7 +17105,12 @@ SNIPPETS-P indicates if this is run to create snippet images for HTML." "Return an rgb color specification for dvipng." (apply 'format "rgb %s %s %s" (mapcar 'org-normalize-color - (color-values (face-attribute 'default attr nil))))) + (if (featurep 'xemacs) + (color-rgb-components + (face-property 'default + (cond ((eq attr :foreground) 'foreground) + ((eq attr :background) 'background)))) + (color-values (face-attribute 'default attr nil)))))) (defun org-normalize-color (value) "Return string to be used as color value for an RGB component." From ced72ea5d8e3d6b57376bdbd5506be2857627b46 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 16 Mar 2012 19:05:26 +0100 Subject: [PATCH 2/3] org-agenda.el: Fix the display of indirect agenda window. * org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix the display of indirect agenda window. TINYCHANGE Thanks to Dave Abrahams for a patch to this effect. --- lisp/org-agenda.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 31aa9192a..f2b8fc242 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7290,7 +7290,9 @@ use the dedicated frame)." (if (and current-prefix-arg (listp current-prefix-arg)) (org-agenda-do-tree-to-indirect-buffer) (let ((agenda-window (selected-window)) - (indirect-window (and org-last-indirect-buffer (get-buffer-window org-last-indirect-buffer)))) + (indirect-window + (and org-last-indirect-buffer + (get-buffer-window org-last-indirect-buffer)))) (save-window-excursion (org-agenda-do-tree-to-indirect-buffer)) (unwind-protect (progn @@ -7299,7 +7301,7 @@ use the dedicated frame)." (select-window indirect-window) (switch-to-buffer org-last-indirect-buffer :norecord) (fit-window-to-buffer indirect-window)) - (select-window agenda-window))))) + (select-window (get-buffer-window org-agenda-buffer-name)))))) (defun org-agenda-do-tree-to-indirect-buffer () "Same as `org-agenda-tree-to-indirect-buffer' without saving window." From 8e7f84ea3d021c3513a9fce9b275c2f93fa95f2d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 16 Mar 2012 19:18:41 +0100 Subject: [PATCH 3/3] org-agenda.el: Fix the order conditions are being checked. * org-agenda.el (org-agenda-skip-if): Fix the order conditions are being checked. Also enhance the docstring a bit. TINYCHANGE Thanks to Toby Cubitt for a patch to this effect. --- lisp/org-agenda.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f2b8fc242..1457356d5 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4219,7 +4219,7 @@ See `org-agenda-skip-if' for details." (defun org-agenda-skip-if (subtree conditions) "Checks current entity for CONDITIONS. If SUBTREE is non-nil, the entire subtree is checked. Otherwise, only -the entry, i.e. the text before the next heading is checked. +the entry (i.e. the text before the next heading) is checked. CONDITIONS is a list of symbols, boolean OR is used to combine the results from different tests. Valid conditions are: @@ -4245,12 +4245,12 @@ keywords, which may include \"*\" to match any todo keyword. would skip all entries with \"TODO\" or \"WAITING\" keywords. -Instead of a list a keyword class may be given +Instead of a list, a keyword class may be given. For example: (org-agenda-skip-entry-if 'nottodo 'done) would skip entries that haven't been marked with any of \"DONE\" -keywords. Possible classes are: `todo', `done', `any'. +keywords. Possible classes are: `todo', `done', `any'. If any of these conditions is met, this function returns the end point of the entity, causing the search to continue from there. This is a function @@ -4283,8 +4283,8 @@ that can be put into `org-agenda-skip-function' for the duration of a command." (stringp (nth 1 m)) (not (re-search-forward (nth 1 m) end t))) (and (or - (setq m (memq 'todo conditions)) - (setq m (memq 'nottodo conditions))) + (setq m (memq 'nottodo conditions)) + (setq m (memq 'todo conditions))) (org-agenda-skip-if-todo m end))) end)))