• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/calendar/

Lines Matching +defs:buffer +defs:file +defs:format

11 ;; This file is part of GNU Emacs.
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
35 ;; treat most lines in one buffer as a list of items one has to
37 ;; categorised, to edit or even delete items from the buffer.
38 ;; The buffer contents are currently compatible with the diary,
42 ;; Notice: Besides the major mode, this file also exports the
44 ;; TODO file that has been specified in the todo-file-do
45 ;; variable. If this file does not conform to the TODO mode
49 ;; file.
63 ;; or enter your TODO list file by typing "M-x todo-show".
65 ;; The TODO list file has a special format and some auxiliary
67 ;; it attempts to visit an un-initialised file. Hence it is
69 ;; in order to initialise the file, but it is not necessary
74 ;; personally have the following in my initialisation file:
76 ;; (global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer
88 ;; entered by visiting the TODO file, and later by switching to
89 ;; its buffer).
112 ;; d to file the current entry, including a
116 ;; f to file the current entry, including a
126 ;; q to save the list and exit the buffer
152 ;; include your todo list file as part of your diary.
160 ;; down the processing of your diary file some.
173 ;; Variable todo-file-do
177 ;; where to go and find this file.
179 ;; Variable todo-file-done
185 ;; variable holds the name of the file for the filed todo-items.
187 ;; Variable todo-file-top
225 ;; o Fancy fonts for todo/top-priority buffer
237 ;; o export to diary file
279 in your diary file to include your todo list file as part of your
284 the diary file somewhat."
287 (defcustom todo-file-do "~/.todo-do"
288 "*TODO mode list file."
289 :type 'file
291 (defcustom todo-file-done "~/.todo-done"
292 "*TODO mode archive file."
293 :type 'file
319 (defvar todo-edit-buffer " *TODO Edit*"
320 "TODO Edit buffer name.")
321 (defcustom todo-file-top "~/.todo-top"
322 "*TODO mode top priorities file.
324 Not in TODO format, but diary compatible.
329 (defcustom todo-print-function 'ps-print-buffer-with-faces
330 "*Function to print the current buffer."
349 "*Non-nil makes `todo-save' automatically save top-priorities in `todo-file-top'."
353 ;; Thanks for the ISO time stamp format go to Karl Eichwalder <ke@suse.de>
354 ;; My format string for the appt.el package is "%3b %2d, %y, %02I:%02M%p".
356 (defcustom todo-time-string-format
358 "*TODO mode time string format for done entries.
359 For details see the variable `time-stamp-format'."
374 (let ((time-stamp-format todo-time-string-format))
399 (define-key map "d" 'todo-file-item) ;done/delete
402 (define-key map "f" 'todo-file-item)
421 (defvar todo-tmp-buffer-name " *todo tmp*")
440 (setq mode-line-buffer-identification
442 (concat "Category: " (format "%18s" name)))
494 (save-buffer)))
504 (bury-buffer))
521 "Set up a buffer for editing a multiline TODO list entry."
523 (let ((buffer-name (generate-new-buffer-name todo-edit-buffer)))
524 (switch-to-buffer
525 (make-indirect-buffer
526 (file-name-nondirectory todo-file-do) buffer-name))
527 (message "To exit, simply kill this buffer and return to list.")
537 (find-file todo-file-do)
547 (insert (format "todo-categories: %S; -*-" todo-categories))
549 (insert (format "%s%s%s\n%s\n%s %s\n"
580 ;; goto-line doesn't have the desired behavior in a narrowed buffer
681 (defun todo-file-item (&optional comment)
685 (error "No TODO list entry to file away"))
686 (let ((time-stamp-format todo-time-string-format))
705 (append-to-file temp-point (1+ (todo-item-end)) todo-file-done)
729 (let ((todo-print-buffer-name todo-tmp-buffer-name)
744 (copy-to-buffer todo-print-buffer-name (point-min) (point-max))
745 (set-buffer todo-print-buffer-name)
767 (goto-char (point-min)) ;Due to display buffer
769 ;; Could have used switch-to-buffer as it has a norecord argument,
771 ;; Else we could have used pop-to-buffer.
772 (display-buffer todo-print-buffer-name)
774 todo-print-buffer-name)))
777 "Save top priorities for each category in `todo-file-top'.
786 (set-buffer todo-tmp-buffer-name)
787 (write-file todo-file-top)
788 (kill-this-buffer)))))
803 (set-buffer todo-tmp-buffer-name)
805 (kill-this-buffer))
827 "Return current line in buffer as a string."
828 (buffer-substring (line-beginning-position) (line-end-position)))
861 (buffer-substring (todo-item-start) (todo-item-end)))
886 ["File item" todo-file-item t]
937 (if (file-exists-p todo-file-do)
938 (find-file todo-file-do)
943 todo-file-do)
954 (find-file todo-file-do)
955 (erase-buffer)