;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 6.31a
+;; Version: 6.33
;;
;; This file is part of GNU Emacs.
;;
(eval-when-compile
(require 'cl))
(require 'org)
+(require 'org-datetree)
(declare-function remember-mode "remember" ())
(declare-function remember "remember" (&optional initial))
(function :tag "Function")
(const :tag "Use `org-remember-default-headline'" nil)
(const :tag "At beginning of file" top)
- (const :tag "At end of file" bottom))
+ (const :tag "At end of file" bottom)
+ (const :tag "In a date tree" date-tree))
(choice :tag "Context"
(const :tag "Use in all contexts" nil)
(const :tag "Use in all contexts" t)
(defvar org-jump-to-target-location nil)
(defvar org-remember-previous-location nil)
+(defvar org-remember-reference-date nil)
(defvar org-force-remember-template-char) ;; dynamically scoped
;; Save the major mode of the buffer we called remember from
(org-set-local 'org-default-notes-file file))
(if headline
(org-set-local 'org-remember-default-headline headline))
+ (org-set-local 'org-remember-reference-date
+ (list (nth 4 dct) (nth 3 dct) (nth 5 dct)))
;; Interactive template entries
(goto-char (point-min))
(while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t)
(pall (concat prop "_ALL"))
(allowed
(with-current-buffer
- (get-buffer (file-name-nondirectory file))
+ (or (find-buffer-visiting file)
+ (find-file-noselect file))
(or (cdr (assoc pall org-file-properties))
(cdr (assoc pall org-global-properties))
(cdr (assoc pall org-global-properties-fixed)))))
(existing (with-current-buffer
- (get-buffer (file-name-nondirectory file))
+ (or (find-buffer-visiting file)
+ (find-file-noselect file))
(mapcar 'list (org-property-values prop))))
(propprompt (concat "Value for " prop ": "))
(val (if allowed
nil nil (list org-end-time-was-given)))
(t
(let (org-completion-use-ido)
- (insert (org-completing-read-no-i
- (concat (if prompt prompt "Enter string")
- (if default (concat " [" default "]"))
- ": ")
- completions nil nil nil histvar default)))))))
+ (insert (org-without-partial-completion
+ (org-completing-read-no-i
+ (concat (if prompt prompt "Enter string")
+ (if default (concat " [" default "]"))
+ ": ")
+ completions nil nil nil histvar default))))))))
(goto-char (point-min))
(if (re-search-forward "%\\?" nil t)
(delete-file (concat backup-file "~"))))
(set-buffer-modified-p nil)
(throw 'quit t)))
+ (reference-date org-remember-reference-date)
(previousp (and (member current-prefix-arg '((16) 0))
org-remember-previous-location))
(clockp (equal current-prefix-arg 2))
;; remove empty lines at end
(replace-match "")))
(goto-char (point-min))
+ (setq text-before-node-creation (buffer-string))
(unless (looking-at org-outline-regexp)
;; add a headline
- (setq text-before-node-creation (buffer-string))
(insert (concat "* " (current-time-string)
" (" (remember-buffer-desc) ")\n"))
(backward-char 1)
(goto-char (point-max))
(or (bolp) (newline))
(setq org-goto-start-pos (point)))
+ ((eq heading 'date-tree)
+ (org-datetree-find-date-create reference-date)
+ (setq reversed nil)
+ (setq org-goto-start-pos (point)))
((and (stringp heading) (string-match "\\S-" heading))
(goto-char (point-min))
(if (re-search-forward