emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/org org-agenda.el


From: Carsten Dominik
Subject: [Emacs-diffs] emacs/lisp/org org-agenda.el
Date: Thu, 18 Dec 2008 10:15:09 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Carsten Dominik <cdominik>      08/12/18 10:15:09

Modified files:
        lisp/org       : org-agenda.el 

Log message:
        2008-12-18  Carsten Dominik  <address@hidden>
        
                * 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'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-agenda.el?cvsroot=emacs&r1=1.18&r2=1.19

Patches:
Index: org-agenda.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-agenda.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-agenda.el       17 Dec 2008 12:34:50 -0000      1.18
+++ org-agenda.el       18 Dec 2008 10:15:08 -0000      1.19
@@ -5068,8 +5068,7 @@
       (org-add-note))))
 
 (defun org-agenda-change-all-lines (newhead hdmarker
-                                           &optional fixface just-this
-                                           force-tags)
+                                           &optional fixface just-this)
   "Change all lines in the agenda buffer which match HDMARKER.
 The new content of the line will be NEWHEAD (as modified by
 `org-format-agenda-item').  HDMARKER is checked with
@@ -5080,6 +5079,12 @@
 If FORCE-TAGS is non nil, the car of it returns the new tags."
   (let* ((inhibit-read-only t)
         (line (org-current-line))
+        (thetags
+         (and hdmarker (markerp hdmarker)
+              (with-current-buffer (marker-buffer hdmarker)
+                   (save-excursion (save-restriction (widen)
+                                                     (goto-char hdmarker)
+                                                     (org-get-tags-at))))))
         props m pl undone-face done-face finish new dotime cat tags)
     (save-excursion
       (goto-char (point-max))
@@ -5092,9 +5097,7 @@
          (setq props (text-properties-at (point))
                dotime (get-text-property (point) 'dotime)
                cat (get-text-property (point) 'org-category)
-               tags (if force-tags
-                        (car force-tags)
-                      (get-text-property (point) 'tags))
+               tags thetags
                new (org-format-agenda-item "x" newhead cat tags dotime 
'noprefix)
                pl (get-text-property (point) 'prefix-length)
                undone-face (get-text-property (point) 'undone-face)
@@ -5197,7 +5200,7 @@
           (buffer (marker-buffer hdmarker))
           (pos (marker-position hdmarker))
           (inhibit-read-only t)
-          newhead tags)
+          newhead)
       (org-with-remote-undo buffer
        (with-current-buffer buffer
          (widen)
@@ -5209,10 +5212,9 @@
                 (org-flag-heading nil)))   ; show the next heading
          (goto-char pos)
          (call-interactively 'org-set-tags)
-         (setq tags (org-get-tags-at))
          (end-of-line 1)
          (setq newhead (org-get-heading)))
-       (org-agenda-change-all-lines newhead hdmarker nil nil (list tags))
+       (org-agenda-change-all-lines newhead hdmarker)
        (beginning-of-line 1)))))
 
 (defun org-agenda-toggle-archive-tag ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]