From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Tasks don't repeat correctly if system-time-locale is set to certain languages Date: Tue, 01 Nov 2016 01:04:21 +0100 Message-ID: <87wpgodq0q.fsf@nicolasgoaziou.fr> References: <87a8dkfsou.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1MYu-00041G-Lf for emacs-orgmode@gnu.org; Mon, 31 Oct 2016 20:04:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1MYt-0005N0-TG for emacs-orgmode@gnu.org; Mon, 31 Oct 2016 20:04:20 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:55675) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1MYt-0005LZ-Mu for emacs-orgmode@gnu.org; Mon, 31 Oct 2016 20:04:19 -0400 In-Reply-To: (Bruce V. Chiarelli's message of "Mon, 31 Oct 2016 15:47:51 -0700") 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" To: "Bruce V. Chiarelli" Cc: emacs-orgmode@gnu.org "Bruce V. Chiarelli" writes: > org-todo calls org-auto-repeat-maybe, which sees the ".+" style > repeater. It calls org-timestamp-change to move the timestamp up to > today. Point is left at the closing bracket. So far, so good. > > org-timestamp-change sets origin-cat to 'after and origin to (point). > It then changes the timestamp to today as advertized. > > Now these lines get evaluated > > (goto-char (cond > ;; `day' category ends before `hour' if any, or at > ;; the end of the day name. > ((eq origin-cat 'day) > (min (or (match-beginning 7) (- (match-end 5) 2)) origin)) > ((eq origin-cat 'hour) (min (match-end 7) origin)) > ((eq origin-cat 'minute) (min (1- (match-end 8)) origin)) > ((integerp origin-cat) (min (1- (match-end 0)) origin)) > ;; `year' and `month' have both fixed size: point > ;; couldn't have moved into another part. > (t origin)))) > > The since origin-cat is 'after, matching nothing else, we get > (goto-char origin). > > This seems to be where the problem lies. When "<2016-10-29 szo .+1>" > becomes "<2016-10-31 h .+1>" (today), origin is now two characters > ahead of where it should be, now on the next line in fact. I see. Thank you for the analysis. Does adding the following branch in the `cond' above, before the catch-all one, solves the issue? ((eq origin-cat 'after) (match-end 0)) Regards,