From 2e5900308012b94bfb9e068243c9ab3d13397c17 Mon Sep 17 00:00:00 2001 From: Oliver Seidel Date: Fri, 24 Oct 1997 16:53:20 +0000 Subject: [PATCH] Paul Stodghill writes: When invoked with a prefix, todo-insert-item should not prompt for a category. (He adds: At least that's what I think.) --- lisp/calendar/todo-mode.el | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 80ddcdc03ad..d265b258cae 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -4,7 +4,7 @@ ;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997) ;; Created: 2 Aug 1997 -;; Version: $Id: todo-mode.el,v 1.21 1997/10/18 13:31:40 os10000 Exp $ +;; Version: $Id: todo-mode.el,v 1.21 1997/10/24 16:51:02 os10000 Exp os10000 $ ;; Keywords: Categorised TODO list editor, todo-mode ;; This file is part of GNU Emacs. @@ -77,7 +77,7 @@ ;; ;; Which version of todo-mode.el does this documentation refer to? ;; -;; $Id: todo-mode.el,v 1.21 1997/10/18 13:31:40 os10000 Exp $ +;; $Id: todo-mode.el,v 1.21 1997/10/24 16:51:02 os10000 Exp os10000 $ ;; ;; Pre-Requisites ;; @@ -250,6 +250,25 @@ ;;; Change Log: ;; $Log: todo-mode.el,v $ +;; Revision 1.21 1997/10/24 16:51:02 os10000 +;; Rafael Laboissiere writes: +;; +;; I was just annoyed with the fact that there is no way +;; to dynamically control the insertion accuracy. I mean: +;; the variable `todo-insert-threshold' does the job, but +;; it is not very handy if one wants to mix the two +;; behaviors (bisection and "insert right here under the +;; cursor"). +;; +;; Therefore I did a quick hack in the function +;; `todo-insert-item'. Now by giving a prefix argument to +;; the insert command (i.e. by typing "C-u i"), entries +;; are inserted exactly at the line where the cursor is. +;; It would be better to give the value of +;; `todo-insert-threshold' as a numeric argument of +;; `todo-insert-item' (like "M-8 i"), but it's too late +;; now for continuing to hack. +;; ;; Revision 1.20 1997/10/17 15:41:57 os10000 ;; Thanks to Harald Backer , we now have ;; the following facilities available: @@ -586,10 +605,14 @@ TODO categories. Use `todo-categories' instead.") (funcall todo-entry-prefix-function))))) (categories todo-categories) (history (cons 'categories (1+ todo-category-number))) - (category (completing-read + (current-category (nth todo-category-number todo-categories)) + (category + (if ARG + current-category + (completing-read (concat "Category [" - (nth todo-category-number todo-categories) "]: ") - (todo-category-alist) nil nil nil history))) + current-category "]: ") + (todo-category-alist) nil nil nil history)))) (if (string= "" category) (setq category (nth todo-category-number todo-categories))) (let ((cat-exists (member category todo-categories))) -- 2.39.2