Browse Source

org.el: set `org-ts-what' correctly in `org-at-timestamp-p'.

(org-at-timestamp-p): set `org-ts-what' in a way that point will be
considered to be "on the bracket" whether it is really on it or right
after it.

Thanks to Matt Lundin for reporting this and to Nicolas Goaziou for
discussion about this.
Bastien Guerry 13 years ago
parent
commit
e01ce26c0b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/org.el

+ 4 - 1
lisp/org.el

@@ -15586,7 +15586,10 @@ With prefix ARG, change that many days."
 	 (setq org-ts-what
 	      (cond
 	       ((= pos (match-beginning 0))         'bracket)
-	       ((= pos (1- (match-end 0)))          'bracket)
+	       ;; Point is considered to be "on the bracket" whether
+	       ;; it's really on it or right after it.
+	       ((or (= pos (1- (match-end 0)))
+                    (= pos (match-end 0)))          'bracket)
 	       ((org-pos-in-match-range pos 2)      'year)
 	       ((org-pos-in-match-range pos 3)      'month)
 	       ((org-pos-in-match-range pos 7)      'hour)