Browse Source

Bug fixed.

Carsten Dominik 16 years ago
parent
commit
c16d17d0e6
4 changed files with 11 additions and 9 deletions
  1. 2 0
      lisp/ChangeLog
  2. 2 2
      lisp/org-exp.el
  3. 2 2
      lisp/org-macs.el
  4. 5 5
      lisp/org.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2008-06-12  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org-macs.el (org-with-point-at): Bug fix in macro defintion.
+
 	* org.el (org-beginning-of-line, org-end-of-line): Make sure the
 	zmacs-region stays after this command in XEmacs.
 

+ 2 - 2
lisp/org-exp.el

@@ -1755,7 +1755,7 @@ can work correctly."
 	(if (string-match "\\`[A-Z]\\'" number-string)
 	    (aset org-section-numbers i
 		  (- (string-to-char number-string) ?A -1))
-	    (aset org-section-numbers i (string-to-number number-string)))
+	  (aset org-section-numbers i (string-to-number number-string)))
 	(pop numbers))
       (setq i (1- i)))))
 
@@ -1785,7 +1785,7 @@ When LEVEL is non-nil, increase section numbers on that level."
 	      n (aref org-section-numbers idx)
 	      string (if (> n 0)
 			 (concat string sep (org-number-to-counter n ctype))
-		       (concat string (if ".0")))
+		       (concat string ".0"))
 	      sep (nth 1 fmt)))
       (setq idx (1+ idx)))
     (save-match-data

+ 2 - 2
lisp/org-macs.el

@@ -89,9 +89,9 @@ We use a macro so that the test can happen at compilation time."
 (defmacro org-with-point-at (pom &rest body)
   "Move to buffer and point of point-or-marker POM for the duration of BODY."
   `(save-excursion
-     (if (markerp pom) (set-buffer (marker-buffer pom)))
+     (if (markerp ,pom) (set-buffer (marker-buffer ,pom)))
      (save-excursion
-       (goto-char (or pom (point)))
+       (goto-char (or ,pom (point)))
        ,@body)))
 
 (defmacro org-no-warnings (&rest body)

+ 5 - 5
lisp/org.el

@@ -9205,7 +9205,7 @@ only lines with a TODO keyword are included in the output."
 	 (case-fold-search nil)
          lspos tags tags-list
 	 (tags-alist (list (cons 0 (mapcar 'downcase org-file-tags))))
-	 (llast 0) rtn level category i txt
+	 (llast 0) rtn rtn1 level category i txt
 	 todo marker entry priority)
     (when (not (member action '(agenda sparse-tree)))
       (setq action (list 'lambda nil action)))
@@ -9274,7 +9274,8 @@ only lines with a TODO keyword are included in the output."
 	      (push txt rtn))
 	     ((functionp action)
 	      (save-excursion
-		(push (let (post-command-hook) (funcall action) rtn)))
+		(setq rtn1 (funcall action))
+		(push rtn1 rtn))
 	      (goto-char (point-at-eol)))
 	     (t (error "Invalid action")))
 
@@ -9981,7 +9982,7 @@ the scanner.  The following items can be given here:
 	 (org-agenda-skip-function
 	  (car (org-delete-all '(comment archive) skip)))
 	 (org-tags-match-list-sublevels t)
-	 matcher)
+	 matcher pos)
 
     (cond
      ((eq match t)   (setq matcher t))
@@ -10011,8 +10012,7 @@ the scanner.  The following items can be given here:
        ((eq scope 'file)
 	(setq scope (list (buffer-file-name))))
        ((eq scope 'file-with-archives)
-	(setq scope (org-add-archive-files (list (buffer-file-name)))
-	      rm-file-column t)))
+	(setq scope (org-add-archive-files (list (buffer-file-name))))))
       (org-prepare-agenda-buffers scope)
       (while (setq file (pop scope))
 	(with-current-buffer (org-find-base-buffer-visiting file)