From: Stephen Berman Date: Mon, 11 Feb 2013 21:54:51 +0000 (+0100) Subject: * calendar/todos.el (todos-edit-quit): On quitting file editing, X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb2077b4335c641080db8aa8d36cb8d3f37121ca;p=emacs.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 174c7fc4fa0..15ad2b888a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-02-11 Stephen Berman + + * 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 * calendar/todos.el (todos-edit-multiline-item): Revert to using diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index b49b46fa64d..a67a98e27b0 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -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.