diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3c3b089e..9091e6798 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-05-04 Carsten Dominik + * org-remember.el (org-select-remember-template): For the + selection of a valid template. + * org-latex.el (org-export-region-as-latex): Supply the force-no-subtree argument. (org-export-as-latex): Provide better limits when exporting the diff --git a/lisp/org-remember.el b/lisp/org-remember.el index 60d7563ee..6e4d7d226 100644 --- a/lisp/org-remember.el +++ b/lisp/org-remember.el @@ -318,6 +318,7 @@ RET at beg-of-buf -> Append to file as level 2 headline (append (list (nth 1 x) (car x)) (cddr x)) (append (list (car x) "") (cdr x)))) (delq nil pre-selected-templates2))) + msg (char (or use-char (cond ((= (length templates) 1) @@ -328,22 +329,32 @@ RET at beg-of-buf -> Append to file as level 2 headline (string-to-char org-force-remember-template-char) org-force-remember-template-char)) (t - (message "Select template: %s" - (mapconcat - (lambda (x) - (cond - ((not (string-match "\\S-" (nth 1 x))) - (format "[%c]" (car x))) - ((equal (downcase (car x)) - (downcase (aref (nth 1 x) 0))) - (format "[%c]%s" (car x) - (substring (nth 1 x) 1))) - (t (format "[%c]%s" (car x) (nth 1 x))))) - templates " ")) - (let ((inhibit-quit t) (char0 (read-char-exclusive))) + (setq msg (format + "Select template: %s" + (mapconcat + (lambda (x) + (cond + ((not (string-match "\\S-" (nth 1 x))) + (format "[%c]" (car x))) + ((equal (downcase (car x)) + (downcase (aref (nth 1 x) 0))) + (format "[%c]%s" (car x) + (substring (nth 1 x) 1))) + (t (format "[%c]%s" (car x) (nth 1 x))))) + templates " "))) + (let ((inhibit-quit t) char0) + (while (not char0) + (message msg) + (setq char0 (read-char-exclusive)) + (when (and (not (assoc char0 templates)) + (not (equal char0 ?\C-g))) + (message "No suche template \"%c\"" char0) + (ding) (sit-for 1) + (setq char0 nil))) (when (equal char0 ?\C-g) (jump-to-register remember-register) - (kill-buffer remember-buffer)) + (kill-buffer remember-buffer) + (error "Abort")) char0)))))) (cddr (assoc char templates)))))