From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Annoying behavior of RET after a timestamp Date: Tue, 29 May 2012 15:15:28 -0400 Message-ID: <8836.1338318928@alphaville> References: <7321.1338312260@alphaville> <7863.1338313608@alphaville> <8492.1338316991@alphaville> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZRtI-0001lR-LD for emacs-orgmode@gnu.org; Tue, 29 May 2012 15:15:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZRtG-0007rx-4p for emacs-orgmode@gnu.org; Tue, 29 May 2012 15:15:36 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:21558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZRtF-0007r7-KE for emacs-orgmode@gnu.org; Tue, 29 May 2012 15:15:34 -0400 In-Reply-To: Message from Samuel Wales of "Tue, 29 May 2012 11:57:18 PDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org Samuel Wales wrote: > WFM now too in a quick test. However, I wanted to point out that I'm > not sure it's a new bug only, in case it's relevant to bisecting. > Well, I don't know about the link bug you remember, but the timestamp "bug" (if it is a bug) was introduced by the following commit: ,---- | commit e01ce26c0bed630a1656fde8552e268d477326f8 | Author: Bastien Guerry | Date: Mon Aug 15 10:06:02 2011 +0200 | | 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. | | diff --git a/lisp/org.el b/lisp/org.el | index f40f46c..4de51b9 100644 | --- a/lisp/org.el | +++ b/lisp/org.el | @@ -15586,7 +15586,10 @@ (defun org-at-timestamp-p (&optional inactive-ok) | (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) `---- I haven't gone to gmane looking for the discussion, but if one of the principals involved remembers the reason, maybe they can enlighten us. Thanks, Nick