Browse Source

Merge branch 'maint'

Bastien Guerry 13 years ago
parent
commit
b66ff157e1
2 changed files with 25 additions and 12 deletions
  1. 9 7
      lisp/org-agenda.el
  2. 16 5
      lisp/org.el

+ 9 - 7
lisp/org-agenda.el

@@ -4240,7 +4240,7 @@ See `org-agenda-skip-if' for details."
 (defun org-agenda-skip-if (subtree conditions)
 (defun org-agenda-skip-if (subtree conditions)
   "Checks current entity for CONDITIONS.
   "Checks current entity for CONDITIONS.
 If SUBTREE is non-nil, the entire subtree is checked.  Otherwise, only
 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
 CONDITIONS is a list of symbols, boolean OR is used to combine the results
 from different tests.  Valid conditions are:
 from different tests.  Valid conditions are:
@@ -4266,12 +4266,12 @@ keywords, which may include \"*\" to match any todo keyword.
 
 
 would skip all entries with \"TODO\" or \"WAITING\" keywords.
 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)
     (org-agenda-skip-entry-if 'nottodo 'done)
 
 
 would skip entries that haven't been marked with any of \"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
 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
 the entity, causing the search to continue from there.  This is a function
@@ -4304,8 +4304,8 @@ that can be put into `org-agenda-skip-function' for the duration of a command."
 	   (stringp (nth 1 m))
 	   (stringp (nth 1 m))
 	   (not (re-search-forward (nth 1 m) end t)))
 	   (not (re-search-forward (nth 1 m) end t)))
       (and (or
       (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)))
 	   (org-agenda-skip-if-todo m end)))
      end)))
      end)))
 
 
@@ -7314,7 +7314,9 @@ use the dedicated frame)."
   (if (and current-prefix-arg (listp current-prefix-arg))
   (if (and current-prefix-arg (listp current-prefix-arg))
       (org-agenda-do-tree-to-indirect-buffer)
       (org-agenda-do-tree-to-indirect-buffer)
     (let ((agenda-window (selected-window))
     (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))
       (save-window-excursion (org-agenda-do-tree-to-indirect-buffer))
       (unwind-protect
       (unwind-protect
           (progn
           (progn
@@ -7323,7 +7325,7 @@ use the dedicated frame)."
             (select-window indirect-window)
             (select-window indirect-window)
             (switch-to-buffer org-last-indirect-buffer :norecord)
             (switch-to-buffer org-last-indirect-buffer :norecord)
             (fit-window-to-buffer indirect-window))
             (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 ()
 (defun org-agenda-do-tree-to-indirect-buffer ()
   "Same as `org-agenda-tree-to-indirect-buffer' without saving window."
   "Same as `org-agenda-tree-to-indirect-buffer' without saving window."

+ 16 - 5
lisp/org.el

@@ -17115,7 +17115,7 @@ inspection."
 	 (dvifile (concat texfilebase ".dvi"))
 	 (dvifile (concat texfilebase ".dvi"))
 	 (pngfile (concat texfilebase ".png"))
 	 (pngfile (concat texfilebase ".png"))
 	 (fnh (if (featurep 'xemacs)
 	 (fnh (if (featurep 'xemacs)
-                  (font-height (get-face-font 'default))
+                  (font-height (face-font 'default))
                 (face-attribute 'default :height nil)))
                 (face-attribute 'default :height nil)))
 	 (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0))
 	 (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0))
 	 (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.))))))
 	 (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.))))))
@@ -17144,13 +17144,19 @@ inspection."
     (if (not (file-exists-p dvifile))
     (if (not (file-exists-p dvifile))
 	(progn (message "Failed to create dvi file from %s" texfile) nil)
 	(progn (message "Failed to create dvi file from %s" texfile) nil)
       (condition-case nil
       (condition-case nil
-	  (call-process "dvipng" nil nil nil
+	  (if (featurep 'xemacs)
+	      	  (call-process "dvipng" nil nil nil
 			"-fg" fg "-bg" bg
 			"-fg" fg "-bg" bg
-			"-D" dpi
-			;;"-x" scale "-y" scale
 			"-T" "tight"
 			"-T" "tight"
 			"-o" pngfile
 			"-o" pngfile
 			dvifile)
 			dvifile)
+	    (call-process "dvipng" nil nil nil
+			  "-fg" fg "-bg" bg
+			  "-D" dpi
+			  ;;"-x" scale "-y" scale
+			  "-T" "tight"
+			  "-o" pngfile
+			  dvifile))
 	(error nil))
 	(error nil))
       (if (not (file-exists-p pngfile))
       (if (not (file-exists-p pngfile))
 	  (if org-format-latex-signal-error
 	  (if org-format-latex-signal-error
@@ -17226,7 +17232,12 @@ SNIPPETS-P indicates if this is run to create snippet images for HTML."
   "Return an rgb color specification for dvipng."
   "Return an rgb color specification for dvipng."
   (apply 'format "rgb %s %s %s"
   (apply 'format "rgb %s %s %s"
 	 (mapcar 'org-normalize-color
 	 (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)
 (defun org-normalize-color (value)
   "Return string to be used as color value for an RGB component."
   "Return string to be used as color value for an RGB component."