diff options
| author | Carsten Dominik | 2008-12-18 10:15:08 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2008-12-18 10:15:08 +0000 |
| commit | 4ed008de3917f8fabf7c799ca5c0090334686db7 (patch) | |
| tree | 9cc5af656e271c992bb73538a05862d1a5e8e8aa | |
| parent | bd67cbf09014829f5b1159321d99e36a5745c054 (diff) | |
| download | emacs-4ed008de3917f8fabf7c799ca5c0090334686db7.tar.gz emacs-4ed008de3917f8fabf7c799ca5c0090334686db7.zip | |
2008-12-18 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-change-all-lines): Remove FORCE-TAGS
argument, get the current tags directly.
(org-agenda-set-tags): Leave getting current tags to
`org-agenda-change-all-lines'.
| -rw-r--r-- | lisp/org/org-agenda.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 89869918dc5..89f7c038f03 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -5068,8 +5068,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 5068 | (org-add-note)))) | 5068 | (org-add-note)))) |
| 5069 | 5069 | ||
| 5070 | (defun org-agenda-change-all-lines (newhead hdmarker | 5070 | (defun org-agenda-change-all-lines (newhead hdmarker |
| 5071 | &optional fixface just-this | 5071 | &optional fixface just-this) |
| 5072 | force-tags) | ||
| 5073 | "Change all lines in the agenda buffer which match HDMARKER. | 5072 | "Change all lines in the agenda buffer which match HDMARKER. |
| 5074 | The new content of the line will be NEWHEAD (as modified by | 5073 | The new content of the line will be NEWHEAD (as modified by |
| 5075 | `org-format-agenda-item'). HDMARKER is checked with | 5074 | `org-format-agenda-item'). HDMARKER is checked with |
| @@ -5080,6 +5079,12 @@ If JUST-THIS is non-nil, change just the current line, not all. | |||
| 5080 | If FORCE-TAGS is non nil, the car of it returns the new tags." | 5079 | If FORCE-TAGS is non nil, the car of it returns the new tags." |
| 5081 | (let* ((inhibit-read-only t) | 5080 | (let* ((inhibit-read-only t) |
| 5082 | (line (org-current-line)) | 5081 | (line (org-current-line)) |
| 5082 | (thetags | ||
| 5083 | (and hdmarker (markerp hdmarker) | ||
| 5084 | (with-current-buffer (marker-buffer hdmarker) | ||
| 5085 | (save-excursion (save-restriction (widen) | ||
| 5086 | (goto-char hdmarker) | ||
| 5087 | (org-get-tags-at)))))) | ||
| 5083 | props m pl undone-face done-face finish new dotime cat tags) | 5088 | props m pl undone-face done-face finish new dotime cat tags) |
| 5084 | (save-excursion | 5089 | (save-excursion |
| 5085 | (goto-char (point-max)) | 5090 | (goto-char (point-max)) |
| @@ -5092,9 +5097,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags." | |||
| 5092 | (setq props (text-properties-at (point)) | 5097 | (setq props (text-properties-at (point)) |
| 5093 | dotime (get-text-property (point) 'dotime) | 5098 | dotime (get-text-property (point) 'dotime) |
| 5094 | cat (get-text-property (point) 'org-category) | 5099 | cat (get-text-property (point) 'org-category) |
| 5095 | tags (if force-tags | 5100 | tags thetags |
| 5096 | (car force-tags) | ||
| 5097 | (get-text-property (point) 'tags)) | ||
| 5098 | new (org-format-agenda-item "x" newhead cat tags dotime 'noprefix) | 5101 | new (org-format-agenda-item "x" newhead cat tags dotime 'noprefix) |
| 5099 | pl (get-text-property (point) 'prefix-length) | 5102 | pl (get-text-property (point) 'prefix-length) |
| 5100 | undone-face (get-text-property (point) 'undone-face) | 5103 | undone-face (get-text-property (point) 'undone-face) |
| @@ -5197,7 +5200,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 5197 | (buffer (marker-buffer hdmarker)) | 5200 | (buffer (marker-buffer hdmarker)) |
| 5198 | (pos (marker-position hdmarker)) | 5201 | (pos (marker-position hdmarker)) |
| 5199 | (inhibit-read-only t) | 5202 | (inhibit-read-only t) |
| 5200 | newhead tags) | 5203 | newhead) |
| 5201 | (org-with-remote-undo buffer | 5204 | (org-with-remote-undo buffer |
| 5202 | (with-current-buffer buffer | 5205 | (with-current-buffer buffer |
| 5203 | (widen) | 5206 | (widen) |
| @@ -5209,10 +5212,9 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 5209 | (org-flag-heading nil))) ; show the next heading | 5212 | (org-flag-heading nil))) ; show the next heading |
| 5210 | (goto-char pos) | 5213 | (goto-char pos) |
| 5211 | (call-interactively 'org-set-tags) | 5214 | (call-interactively 'org-set-tags) |
| 5212 | (setq tags (org-get-tags-at)) | ||
| 5213 | (end-of-line 1) | 5215 | (end-of-line 1) |
| 5214 | (setq newhead (org-get-heading))) | 5216 | (setq newhead (org-get-heading))) |
| 5215 | (org-agenda-change-all-lines newhead hdmarker nil nil (list tags)) | 5217 | (org-agenda-change-all-lines newhead hdmarker) |
| 5216 | (beginning-of-line 1))))) | 5218 | (beginning-of-line 1))))) |
| 5217 | 5219 | ||
| 5218 | (defun org-agenda-toggle-archive-tag () | 5220 | (defun org-agenda-toggle-archive-tag () |