From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Subject: Bug: org-time-stamp-inactive on the end of a CLOCK interval edits start time [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)] Date: Mon, 10 Aug 2015 22:37:32 +0200 Message-ID: <877fp2ev77.fsf@nicolasgoaziou.fr> References: <55C7659D.8050408@gmail.com> <874mk89jsa.fsf@nicolasgoaziou.fr> <55C7F422.2060206@gmail.com> <87wpx38uuk.fsf@nicolasgoaziou.fr> <55C88AD0.4090007@gmail.com> <87bnefghzi.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOtne-00065n-IX for emacs-orgmode@gnu.org; Mon, 10 Aug 2015 16:36:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOtnY-0004e8-Nm for emacs-orgmode@gnu.org; Mon, 10 Aug 2015 16:36:02 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:54684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOtnY-0004dh-HR for emacs-orgmode@gnu.org; Mon, 10 Aug 2015 16:35:56 -0400 In-Reply-To: <87bnefghzi.fsf@kmlap.domain.org> (Kyle Meyer's message of "Mon, 10 Aug 2015 13:40:01 -0400") 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: Kyle Meyer Cc: "emacs-orgmode@gnu.org" Kyle Meyer writes: > Christoph LANGE wrote: > [...] >> Running "emacs -q" and then (package-initialize) and then opening a >> minimal file like >> >> * Hello >> CLOCK: [2015-08-07 Fri 10:14]--[2015-08-07 Fri 10:20] => 0:06 >> >> was enough to reproduce the bug. I.e. C-c ! or C-c . on the second >> timestamp prompted me with the time of the first one. > > Yes, I can reproduce this too. Bisecting indicates e50baa4 ("Fix > `org-time-stamp'", 2015-02-13) changed this behavior. > > I think this is the problematic bit > > (let* ((ts > (cond ((org-at-date-range-p t) > (save-excursion > (goto-char (match-beginning 0)) > (looking-at (if inactive org-ts-regexp-both org-ts-regexp))) > (match-string 0)) > ((org-at-timestamp-p t) (match-string 0)))) > ;; Default time is either the timestamp at point or today. > ;; When entering a range, only the range start is considered. > (default-time (if (not ts) (current-time) > (apply #'encode-time (org-parse-time-string ts)))) > > because it jumps to the beginning of a date range match and grabs the > first group as the default. Correct. Fixed. Thank you to you both. Regards,