Просмотр исходного кода

Make dot an alias for today in the date prompt.

Carsten Dominik 17 лет назад
Родитель
Сommit
403485afd3
3 измененных файлов с 8 добавлено и 0 удалено
  1. 3 0
      ChangeLog
  2. 2 0
      doc/org.texi
  3. 3 0
      lisp/org.el

+ 3 - 0
ChangeLog

@@ -1,5 +1,8 @@
 2008-05-02  Carsten Dominik  <dominik@science.uva.nl>
 
+	* lisp/org.el (org-read-date-analyze): "." as an alias for "+0" in
+	read date.
+
 	* lisp/org-clock.el (org-clock-save-markers-for-cut-and-paste):
 	New function.
 

+ 2 - 0
doc/org.texi

@@ -4210,6 +4210,8 @@ a single letter, you use the abbreviation of day name, the date will be
 the nth such day.  E.g.
 
 @example
++0            --> today
+.             --> today
 +4d           --> four days from today
 +4            --> same as above
 +2w           --> two weeks from today

+ 3 - 0
lisp/org.el

@@ -10241,6 +10241,9 @@ user."
 	      hour minute second wday pm h2 m2 tl wday1
 	      iso-year iso-weekday iso-week iso-year iso-date)
 
+    (when (string-match "\\`[ \t]*\\.[ \t]*\\'" ans)
+      (setq ans "+0"))
+
     (when (setq delta (org-read-date-get-relative ans (current-time) def))
       (setq ans (replace-match "" t t ans)
 	    deltan (car delta)