comparison lisp/textmodes/org.el @ 65583:703495630901

Message format spec fixes (2)
author Deepak Goel <deego@gnufans.org>
date Sun, 18 Sep 2005 12:28:30 +0000
parents a95981ee377b
children e274642bf5d5 fa0da9b57058
comparison
equal deleted inserted replaced
65582:4d1085b02d64 65583:703495630901
2803 (delete-window (get-buffer-window "*Completions*"))) 2803 (delete-window (get-buffer-window "*Completions*")))
2804 (if (and (eq type :todo) 2804 (if (and (eq type :todo)
2805 (assoc completion table)) 2805 (assoc completion table))
2806 (insert " ")) 2806 (insert " "))
2807 (if (and (equal type :opt) (assoc completion table)) 2807 (if (and (equal type :opt) (assoc completion table))
2808 (message (substitute-command-keys 2808 (message "%s" (substitute-command-keys
2809 "Press \\[org-complete] again to insert example settings")))) 2809 "Press \\[org-complete] again to insert example settings"))))
2810 (t 2810 (t
2811 (message "Making completion list...") 2811 (message "Making completion list...")
2812 (let ((list (sort (all-completions pattern table) 'string<))) 2812 (let ((list (sort (all-completions pattern table) 'string<)))
2813 (with-output-to-temp-buffer "*Completions*" 2813 (with-output-to-temp-buffer "*Completions*"
2910 (interactive) 2910 (interactive)
2911 (insert 2911 (insert
2912 org-deadline-string " " 2912 org-deadline-string " "
2913 (format-time-string (car org-time-stamp-formats) 2913 (format-time-string (car org-time-stamp-formats)
2914 (org-read-date nil 'to-time))) 2914 (org-read-date nil 'to-time)))
2915 (message (substitute-command-keys 2915 (message "%s" (substitute-command-keys
2916 "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date."))) 2916 "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date.")))
2917 2917
2918 (defun org-schedule () 2918 (defun org-schedule ()
2919 "Insert the SCHEDULED: string to schedule a TODO item. 2919 "Insert the SCHEDULED: string to schedule a TODO item.
2920 A timestamp is also inserted - use \\[org-timestamp-up] and \\[org-timestamp-down] 2920 A timestamp is also inserted - use \\[org-timestamp-up] and \\[org-timestamp-down]
2922 (interactive) 2922 (interactive)
2923 (insert 2923 (insert
2924 org-scheduled-string " " 2924 org-scheduled-string " "
2925 (format-time-string (car org-time-stamp-formats) 2925 (format-time-string (car org-time-stamp-formats)
2926 (org-read-date nil 'to-time))) 2926 (org-read-date nil 'to-time)))
2927 (message (substitute-command-keys 2927 (message "%s" (substitute-command-keys
2928 "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date."))) 2928 "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date.")))
2929 2929
2930 2930
2931 (defun org-occur (regexp &optional callback) 2931 (defun org-occur (regexp &optional callback)
2932 "Make a compact tree which shows all matches of REGEXP. 2932 "Make a compact tree which shows all matches of REGEXP.
2995 (setq current (string-to-char (match-string 2)) 2995 (setq current (string-to-char (match-string 2))
2996 have t) 2996 have t)
2997 (setq current org-default-priority)) 2997 (setq current org-default-priority))
2998 (cond 2998 (cond
2999 ((eq action 'set) 2999 ((eq action 'set)
3000 (message (format "Priority A-%c, SPC to remove: " org-lowest-priority)) 3000 (message "Priority A-%c, SPC to remove: " org-lowest-priority)
3001 (setq new (read-char-exclusive)) 3001 (setq new (read-char-exclusive))
3002 (cond ((equal new ?\ ) (setq remove t)) 3002 (cond ((equal new ?\ ) (setq remove t))
3003 ((or (< (upcase new) ?A) (> (upcase new) org-lowest-priority)) 3003 ((or (< (upcase new) ?A) (> (upcase new) org-lowest-priority))
3004 (error "Priority must be between `%c' and `%c'" 3004 (error "Priority must be between `%c' and `%c'"
3005 ?A org-lowest-priority)))) 3005 ?A org-lowest-priority))))
7012 m (floor (/ diff 60)) diff (mod diff 60) 7012 m (floor (/ diff 60)) diff (mod diff 60)
7013 s diff) 7013 s diff)
7014 (format "%d:%02d:%02d" h m s)))) 7014 (format "%d:%02d:%02d" h m s))))
7015 (kill-new sres) 7015 (kill-new sres)
7016 (if (interactive-p) 7016 (if (interactive-p)
7017 (message (substitute-command-keys 7017 (message "%s"
7018 (format "Sum of %d items: %-20s (\\[yank] will insert result into buffer)" 7018 (concat
7019 (length numbers) sres)))) 7019 (format "Sum of %d items: %-20s " (length numbers) sres)
7020 (substitute-command-keys
7021 "(\\[yank] will insert result into buffer)")
7022 ))
7023 )
7020 sres)))) 7024 sres))))
7021 7025
7022 (defun org-table-get-number-for-summing (s) 7026 (defun org-table-get-number-for-summing (s)
7023 (let (n) 7027 (let (n)
7024 (if (string-match "^ *|? *" s) 7028 (if (string-match "^ *|? *" s)