changeset 85633:04432aad93c8

* textmodes/org.el: (org-agenda-get-restriction-and-command): Use `mapc' instead of `mapcar'. (org-agenda-list): Numeric prefix argument can specify the number of days. (remember-register, remember-buffer): Prevent byte compiler from complaining.
author Carsten Dominik <dominik@science.uva.nl>
date Thu, 25 Oct 2007 09:28:34 +0000
parents 30b2e2b12158
children 88924f5f0f12
files lisp/textmodes/org.el
diffstat 1 files changed, 32 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org.el	Thu Oct 25 09:28:14 2007 +0000
+++ b/lisp/textmodes/org.el	Thu Oct 25 09:28:34 2007 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 5.13e
+;; Version: 5.13f
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -83,7 +83,7 @@
 
 ;;; Version
 
-(defconst org-version "5.13e"
+(defconst org-version "5.13f"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -4307,6 +4307,8 @@
 (defvar texmathp-why)
 (defvar remember-save-after-remembering)
 (defvar remember-data-file)
+(defvar remember-register)
+(defvar remember-buffer)
 (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode'
 (defvar initial)    ; from remember.el, dynamically scoped in `remember-mode'
 (defvar org-latex-regexps)
@@ -13586,7 +13588,7 @@
 	  (set-buffer (get-buffer-create " *Org todo*"))
 ;	(delete-other-windows)
 ;	(split-window-vertically)
-	(org-switch-to-buffer-other-window (get-buffer-create " *Org tags*")))
+	(org-switch-to-buffer-other-window (get-buffer-create " *Org todo*")))
       (erase-buffer)
       (org-set-local 'org-done-keywords done-keywords)
       (setq tbl fulltable cnt 0)
@@ -15598,7 +15600,7 @@
 	 (key1 (concat key "_ALL"))
 	 (allowed (org-entry-get (point) key1 t))
 	 nval)
-    ;; FIXME: Cover editing TODO, TAGS etc inbuffer settings.????
+    ;; FIXME: Cover editing TODO, TAGS etc inbiffer settings.????
     (setq nval (read-string "Allowed: " allowed))
     (org-entry-put
      (cond ((marker-position org-entry-property-inherited-from)
@@ -18358,15 +18360,15 @@
 		  (format "set of %d commands" (length match)))
 		 (t ""))))))
 	  (when prefixes
-	    (mapcar (lambda (x)
-		      (insert
-		       (format "\n%s   %s"
-			       (org-add-props (char-to-string x)
-				   nil 'face 'bold)
-			       (or (cdr (assoc (concat selstring (char-to-string x))
-					       prefix-descriptions))
-				   "Prefix key"))))
-		    prefixes))
+	    (mapc (lambda (x)
+		    (insert
+		     (format "\n%s   %s"
+			     (org-add-props (char-to-string x)
+					    nil 'face 'bold)
+			     (or (cdr (assoc (concat selstring (char-to-string x))
+					     prefix-descriptions))
+				 "Prefix key"))))
+		  prefixes))
 	  (goto-char (point-min))
 	  (when (fboundp 'fit-window-to-buffer)
 	    (if second-time
@@ -19184,18 +19186,24 @@
 
 ;;;###autoload
 (defun org-agenda-list (&optional include-all start-day ndays)
-  "Produce a weekly view from all files in variable `org-agenda-files'.
-The view will be for the current week, but from the overview buffer you
-will be able to go to other weeks.
-With one \\[universal-argument] prefix argument INCLUDE-ALL, all unfinished TODO items will
-also be shown, under the current date.
-With two \\[universal-argument] prefix argument INCLUDE-ALL, all TODO entries marked DONE
-on the days are also shown.  See the variable `org-log-done' for how
-to turn on logging.
+  "Produce a daily/weekly view from all files in variable `org-agenda-files'.
+The view will be for the current day or week, but from the overview buffer
+you will be able to go to other days/weeks.
+
+With one \\[universal-argument] prefix argument INCLUDE-ALL,
+all unfinished TODO items will also be shown, before the agenda.
+This feature is considered obsolete, please use the TODO list or a block
+agenda instead.
+
+With a numeric prefix argument in an interactive call, the agenda will
+span INCLUDE-ALL days.  Lisp programs should instead specify NDAYS to change
+the number of days.  NDAYS defaults to `org-agenda-ndays'.
+
 START-DAY defaults to TODAY, or to the most recent match for the weekday
-given in `org-agenda-start-on-weekday'.
-NDAYS defaults to `org-agenda-ndays'."
-  (interactive "P")
+given in `org-agenda-start-on-weekday'."
+  (interactive "P")
+  (if (and (integerp include-all) (> include-all 0))
+      (setq ndays include-all include-all nil))
   (setq ndays (or ndays org-agenda-ndays)
 	start-day (or start-day org-agenda-start-day))
   (if org-agenda-overriding-arguments