Browse Source

Rename `org-format-agenda-item' to `org-agenda-format-item'.

* org.el (org-format-agenda-item, org-scan-tags): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

* org-agenda.el (org-search-view)
(org-get-entries-from-diary, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-format-item, org-agenda-add-time-grid-maybe)
(org-agenda-change-all-lines)
(org-agenda-add-entry-to-org-agenda-diary-file): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

Using the `org-agenda-' prefix makes more sense here.
Bastien Guerry 14 years ago
parent
commit
da5a68a0bc
2 changed files with 18 additions and 18 deletions
  1. 16 16
      lisp/org-agenda.el
  2. 2 2
      lisp/org.el

+ 16 - 16
lisp/org-agenda.el

@@ -3950,7 +3950,7 @@ in `org-agenda-text-search-extra-files'."
 			    category (org-get-category)
 			    category (org-get-category)
 			    org-category-pos (get-text-property (point) 'org-category-position)
 			    org-category-pos (get-text-property (point) 'org-category-position)
 			    tags (org-get-tags-at (point))
 			    tags (org-get-tags-at (point))
-			    txt (org-format-agenda-item
+			    txt (org-agenda-format-item
 				 ""
 				 ""
 				 (buffer-substring-no-properties
 				 (buffer-substring-no-properties
 				  beg1 (point-at-eol))
 				  beg1 (point-at-eol))
@@ -4400,7 +4400,7 @@ of what a project is and how to check if it stuck, customize the variable
       (setq entries
       (setq entries
 	    (mapcar
 	    (mapcar
 	     (lambda (x)
 	     (lambda (x)
-	       (setq x (org-format-agenda-item "" x "Diary" nil 'time))
+	       (setq x (org-agenda-format-item "" x "Diary" nil 'time))
 	       ;; Extend the text properties to the beginning of the line
 	       ;; Extend the text properties to the beginning of the line
 	       (org-add-props x (text-properties-at (1- (length x)) x)
 	       (org-add-props x (text-properties-at (1- (length x)) x)
 		 'type "diary" 'date date 'face 'org-agenda-diary))
 		 'type "diary" 'date date 'face 'org-agenda-diary))
@@ -4622,7 +4622,7 @@ the documentation of `org-diary'."
 	      org-category-pos (get-text-property (point) 'org-category-position)
 	      org-category-pos (get-text-property (point) 'org-category-position)
 	      txt (match-string 1)
 	      txt (match-string 1)
 	      tags (org-get-tags-at (point))
 	      tags (org-get-tags-at (point))
-	      txt (org-format-agenda-item "" txt category tags)
+	      txt (org-agenda-format-item "" txt category tags)
 	      priority (1+ (org-get-priority txt))
 	      priority (1+ (org-get-priority txt))
 	      todo-state (org-get-todo-state))
 	      todo-state (org-get-todo-state))
 	(org-add-props txt props
 	(org-add-props txt props
@@ -4794,7 +4794,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 		  tags (org-get-tags-at))
 		  tags (org-get-tags-at))
 	    (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
 	    (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
 	    (setq head (or (match-string 1) ""))
 	    (setq head (or (match-string 1) ""))
-	    (setq txt (org-format-agenda-item
+	    (setq txt (org-agenda-format-item
 		       (if inactivep org-agenda-inactive-leader nil)
 		       (if inactivep org-agenda-inactive-leader nil)
 		       head category tags timestr
 		       head category tags timestr
 		       remove-re)))
 		       remove-re)))
@@ -4848,7 +4848,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 		(setq txt r)
 		(setq txt r)
 	      (setq txt "SEXP entry returned empty string"))
 	      (setq txt "SEXP entry returned empty string"))
 
 
-	    (setq txt (org-format-agenda-item
+	    (setq txt (org-agenda-format-item
 		       "" txt category tags 'time))
 		       "" txt category tags 'time))
 	    (org-add-props txt props 'org-marker marker)
 	    (org-add-props txt props 'org-marker marker)
 	    (org-add-props txt nil
 	    (org-add-props txt nil
@@ -5004,7 +5004,7 @@ please use `org-class' instead."
 		  (setq txt (concat (substring txt 0 (match-beginning 1))
 		  (setq txt (concat (substring txt 0 (match-beginning 1))
 				    " - " extra " " (match-string 2 txt)))
 				    " - " extra " " (match-string 2 txt)))
 		(setq txt (concat txt " - " extra))))
 		(setq txt (concat txt " - " extra))))
-	    (setq txt (org-format-agenda-item
+	    (setq txt (org-agenda-format-item
 		       (cond
 		       (cond
 			(closedp "Closed:    ")
 			(closedp "Closed:    ")
 			    (statep (concat "State:     (" state ")"))
 			    (statep (concat "State:     (" state ")"))
@@ -5214,7 +5214,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
 		      (setq timestr
 		      (setq timestr
 			    (concat (substring s (match-beginning 1)) " "))
 			    (concat (substring s (match-beginning 1)) " "))
 		    (setq timestr 'time))
 		    (setq timestr 'time))
-		  (setq txt (org-format-agenda-item
+		  (setq txt (org-agenda-format-item
 			     (if (= diff 0)
 			     (if (= diff 0)
 				 (car org-agenda-deadline-leaders)
 				 (car org-agenda-deadline-leaders)
 			       (if (functionp
 			       (if (functionp
@@ -5329,7 +5329,7 @@ FRACTION is what fraction of the head-warning time has passed."
 		    (setq timestr
 		    (setq timestr
 			  (concat (substring s (match-beginning 1)) " "))
 			  (concat (substring s (match-beginning 1)) " "))
 		  (setq timestr 'time))
 		  (setq timestr 'time))
-		(setq txt (org-format-agenda-item
+		(setq txt (org-agenda-format-item
 			   (if (= diff 0)
 			   (if (= diff 0)
 			       (car org-agenda-scheduled-leaders)
 			       (car org-agenda-scheduled-leaders)
 			     (format (nth 1 org-agenda-scheduled-leaders)
 			     (format (nth 1 org-agenda-scheduled-leaders)
@@ -5412,7 +5412,7 @@ FRACTION is what fraction of the head-warning time has passed."
 			      "--"
 			      "--"
 			      "<" (regexp-quote s2) ".*?>")
 			      "<" (regexp-quote s2) ".*?>")
 			   nil)))
 			   nil)))
-		    (setq txt (org-format-agenda-item
+		    (setq txt (org-agenda-format-item
 			       (format
 			       (format
 				(nth (if (= d1 d2) 0 1)
 				(nth (if (= d1 d2) 0 1)
 				     org-agenda-timerange-leaders)
 				     org-agenda-timerange-leaders)
@@ -5461,7 +5461,7 @@ The flag is set if the currently compiled format contains a `%e'.")
 	  (return (cadr entry))
 	  (return (cadr entry))
       (return (apply 'create-image (cdr entry)))))))
       (return (apply 'create-image (cdr entry)))))))
 
 
-(defun org-format-agenda-item (extra txt &optional category tags dotime
+(defun org-agenda-format-item (extra txt &optional category tags dotime
 				     remove-re habitp)
 				     remove-re habitp)
   "Format TXT to be inserted into the agenda buffer.
   "Format TXT to be inserted into the agenda buffer.
 In particular, it adds the prefix and corresponding text properties.  EXTRA
 In particular, it adds the prefix and corresponding text properties.  EXTRA
@@ -5681,14 +5681,14 @@ The modified list may contain inherited tags, and tags matched by
       (while (setq time (pop gridtimes))
       (while (setq time (pop gridtimes))
 	(unless (and remove (member time have))
 	(unless (and remove (member time have))
 	  (setq time (replace-regexp-in-string " " "0" (format "%04s" time)))
 	  (setq time (replace-regexp-in-string " " "0" (format "%04s" time)))
-	  (push (org-format-agenda-item
+	  (push (org-agenda-format-item
 		 nil string "" nil
 		 nil string "" nil
 		 (concat (substring time 0 -2) ":" (substring time -2)))
 		 (concat (substring time 0 -2) ":" (substring time -2)))
 		new)
 		new)
 	  (put-text-property
 	  (put-text-property
 	   2 (length (car new)) 'face 'org-time-grid (car new))))
 	   2 (length (car new)) 'face 'org-time-grid (car new))))
       (when (and todayp org-agenda-show-current-time-in-grid)
       (when (and todayp org-agenda-show-current-time-in-grid)
-	(push (org-format-agenda-item
+	(push (org-agenda-format-item
 	       nil
 	       nil
 	       org-agenda-current-time-string
 	       org-agenda-current-time-string
 	       "" nil
 	       "" nil
@@ -7268,7 +7268,7 @@ the same tree node, and the headline of the tree node in the Org-mode file."
 					    &optional fixface just-this)
 					    &optional fixface just-this)
   "Change all lines in the agenda buffer which match HDMARKER.
   "Change all lines in the agenda buffer which match HDMARKER.
 The new content of the line will be NEWHEAD (as modified by
 The new content of the line will be NEWHEAD (as modified by
-`org-format-agenda-item').  HDMARKER is checked with
+`org-agenda-format-item').  HDMARKER is checked with
 `equal' against all `org-hd-marker' text properties in the file.
 `equal' against all `org-hd-marker' text properties in the file.
 If FIXFACE is non-nil, the face of each item is modified according to
 If FIXFACE is non-nil, the face of each item is modified according to
 the new TODO state.
 the new TODO state.
@@ -7301,7 +7301,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
 		    (save-excursion
 		    (save-excursion
 		      (save-restriction
 		      (save-restriction
 			(widen)
 			(widen)
-			(org-format-agenda-item (org-get-at-bol 'extra)
+			(org-agenda-format-item (org-get-at-bol 'extra)
 						newhead cat tags dotime)))))
 						newhead cat tags dotime)))))
 		pl (text-property-any (point-at-bol) (point-at-eol) 'org-heading t)
 		pl (text-property-any (point-at-bol) (point-at-eol) 'org-heading t)
 		undone-face (org-get-at-bol 'undone-face)
 		undone-face (org-get-at-bol 'undone-face)
@@ -7902,10 +7902,10 @@ the resulting entry will not be shown.  When TEXT is empty, switch to
 	    (org-agenda-time-leading-zero t)
 	    (org-agenda-time-leading-zero t)
 	    fmt time time2)
 	    fmt time time2)
 	(if org-agenda-insert-diary-extract-time
 	(if org-agenda-insert-diary-extract-time
-	    ;; Use org-format-agenda-item to parse text for a time-range and
+	    ;; Use org-agenda-format-item to parse text for a time-range and
 	    ;; remove it.  FIXME: This is a hack, we should refactor
 	    ;; remove it.  FIXME: This is a hack, we should refactor
 	    ;; that function to make time extraction available separately
 	    ;; that function to make time extraction available separately
-	    (setq fmt (org-format-agenda-item nil text nil nil t)
+	    (setq fmt (org-agenda-format-item nil text nil nil t)
 		  time (get-text-property 0 'time fmt)
 		  time (get-text-property 0 'time fmt)
 		  time2 (if (> (length time) 0)
 		  time2 (if (> (length time) 0)
 			    ;; split-string removes trailing ...... if
 			    ;; split-string removes trailing ...... if

+ 2 - 2
lisp/org.el

@@ -3720,7 +3720,7 @@ Normal means, no org-mode-specific context."
 (defvar org-agenda-tags-todo-honor-ignore-options)
 (defvar org-agenda-tags-todo-honor-ignore-options)
 (declare-function org-agenda-skip "org-agenda" ())
 (declare-function org-agenda-skip "org-agenda" ())
 (declare-function
 (declare-function
- org-format-agenda-item "org-agenda"
+ org-agenda-format-item "org-agenda"
  (extra txt &optional category tags dotime noprefix remove-re habitp))
  (extra txt &optional category tags dotime noprefix remove-re habitp))
 (declare-function org-agenda-new-marker "org-agenda" (&optional pos))
 (declare-function org-agenda-new-marker "org-agenda" (&optional pos))
 (declare-function org-agenda-change-all-lines "org-agenda"
 (declare-function org-agenda-change-all-lines "org-agenda"
@@ -12737,7 +12737,7 @@ only lines with a TODO keyword are included in the output."
 		    (match-beginning 0) (match-beginning 1)))
 		    (match-beginning 0) (match-beginning 1)))
 	      (org-show-context 'tags-tree))
 	      (org-show-context 'tags-tree))
 	     ((eq action 'agenda)
 	     ((eq action 'agenda)
-	      (setq txt (org-format-agenda-item
+	      (setq txt (org-agenda-format-item
 			 ""
 			 ""
 			 (concat
 			 (concat
 			  (if (eq org-tags-match-list-sublevels 'indented)
 			  (if (eq org-tags-match-list-sublevels 'indented)