From: "Bruce V. Chiarelli" <mano155@gmail.com>
To: "Bruce V. Chiarelli" <mano155@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Tasks don't repeat correctly if system-time-locale is set to certain languages
Date: Mon, 31 Oct 2016 17:29:20 -0700 [thread overview]
Message-ID: <CALGAe2LTVGWZDisrDghhXKPCq2J9XAQb63t5y5=VYM0GEcvoqQ@mail.gmail.com> (raw)
In-Reply-To: <87wpgodq0q.fsf@nicolasgoaziou.fr>
2016-10-31 17:04 GMT-07:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
> "Bruce V. Chiarelli" <mano155@gmail.com> 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))
It does! Wonderful.
-BC
next prev parent reply other threads:[~2016-11-01 0:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-30 21:08 Tasks don't repeat correctly if system-time-locale is set to certain languages Bruce V. Chiarelli
2016-10-31 15:23 ` Nicolas Goaziou
2016-10-31 22:47 ` Bruce V. Chiarelli
2016-11-01 0:04 ` Nicolas Goaziou
2016-11-01 0:29 ` Bruce V. Chiarelli [this message]
2016-11-01 8:43 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALGAe2LTVGWZDisrDghhXKPCq2J9XAQb63t5y5=VYM0GEcvoqQ@mail.gmail.com' \
--to=mano155@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).