소스 검색

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 14 년 전
부모
커밋
e01ce26c0b
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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)