]> code.delx.au - gnu-emacs/commitdiff
* calendar/todos.el (todos-edit-quit): On quitting file editing,
authorStephen Berman <stephen.berman@gmx.net>
Mon, 11 Feb 2013 21:54:51 +0000 (22:54 +0100)
committerStephen Berman <stephen.berman@gmx.net>
Mon, 11 Feb 2013 21:54:51 +0000 (22:54 +0100)
rename buffer back to current Todos file.  After selecting
category, put point at top instead of recentering.

lisp/ChangeLog
lisp/calendar/todos.el

index 174c7fc4fa0ad526a9bc1cfba05f83c52f0348fe..15ad2b888a99e7339aedb15ca90fe151885be779 100644 (file)
@@ -1,3 +1,9 @@
+2013-02-11  Stephen Berman  <stephen.berman@gmx.net>
+
+       * calendar/todos.el (todos-edit-quit): On quitting file editing,
+       rename buffer back to current Todos file.  After selecting
+       category, put point at top instead of recentering.
+
 2013-02-08  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todos.el (todos-edit-multiline-item): Revert to using
index b49b46fa64de1b87630f207321363a3e3f0c880a..a67a98e27b007be7870bea16425b0e63e696a31d 100644 (file)
@@ -1547,6 +1547,8 @@ The final element is \"*\", indicating an unspecified month.")
 
 (defun todos-prefix-overlay ()
   "Return this item's prefix overlay."
+  ;; Why doesn't this work?
+  ;; (get-char-property-and-overlay lbp 'before-string)
   (let* ((lbp (line-beginning-position))
         (ovs (overlays-in lbp lbp)))
     (car ovs)))
@@ -4917,6 +4919,7 @@ in the number or names of categories."
        ;; (todos-repair-categories-sexp)
        ;; Compare (todos-make-categories-list t) with sexp and if
        ;; different ask (todos-update-categories-sexp) ?
+       (rename-buffer (file-name-nondirectory todos-current-todos-file))
        (todos-mode)
        (let* ((cat-beg (concat "^" (regexp-quote todos-category-beg)
                                "\\(.*\\)$"))
@@ -4929,7 +4932,7 @@ in the number or names of categories."
                           (match-string-no-properties 1)))))
          (todos-category-number cat)
          (todos-category-select)
-         (recenter)))))
+         (goto-char (point-min))))))
 
 (defun todos-edit-item-header-1 (what &optional inc)
   "Function underlying commands to edit item date/time header.
@@ -5569,8 +5572,8 @@ section in the category moved to."
            (let ((todos-show-with-done (or done-items done-item)))
              (todos-category-select))
            (goto-char nmark)
-           ;; If item is moved to end of category, make sure the
-           ;; items above it are displayed in the window.
+           ;; If item is moved to end of (just first?) category, make
+           ;; sure the items above it are displayed in the window.
            (recenter))
           ;; User quit before setting priority of todo item(s), so
           ;; return to starting category.