emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tasks don't repeat correctly if system-time-locale is set to cer


From: Nicolas Goaziou
Subject: Re: [O] Tasks don't repeat correctly if system-time-locale is set to certain languages
Date: Tue, 01 Nov 2016 01:04:21 +0100

"Bruce V. Chiarelli" <address@hidden> 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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]