From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Irelan Subject: Re: Bug: org-capture files wrong date in capture template [9.1.7 (9.1.7-elpaplus @ /Users/rmirelan/.emacs.d/elpa/org-plus-contrib-20180226/)] Date: Mon, 09 Apr 2018 22:34:58 +0000 Message-ID: References: <87muykvwdn.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000adcee7056972049c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5fNY-0000vd-A6 for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 18:35:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5fNX-0000mT-4i for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 18:35:12 -0400 Received: from mail-ot0-x229.google.com ([2607:f8b0:4003:c0f::229]:32814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5fNW-0000ko-TD for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 18:35:11 -0400 Received: by mail-ot0-x229.google.com with SMTP id 23-v6so10541901otj.0 for ; Mon, 09 Apr 2018 15:35:10 -0700 (PDT) In-Reply-To: <87muykvwdn.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org-mode --000000000000adcee7056972049c Content-Type: text/plain; charset="UTF-8" Hi, that ended up being the problem. Specifically, the line at https://code.orgmode.org/bzg/org-mode/src/442e7a2911e3e0229b1b6dd1fe0449653274ec31/lisp/org-capture.el#L1013 needs to be fixed to read instead (append `(0 0 ,org-extend-today-until) On Sat, Apr 7, 2018 at 2:07 PM Nicolas Goaziou wrote: > Hello, > > Robert Irelan writes: > > > I have an org-capture template of type file+olp+datetree and :time-prompt > > t. Whenever I invoke it, it prompts me for a date. If I enter the current > > date at the prompt, `%u` correctly formats the captured entry with > today's > > date. However, if I enter any other date, whether in the future or past, > > `%u` is formatted with the date 1 day before the date I enter at the > > prompt. So, for example, if I enter the date "2018-04-01" at the prompt, > > `%u` is formatted as "[2018-03-31 Sat]". I can consistently reproduce > this > > with the following template, and also with version `Org mode version > 9.1.9 > > (9.1.9-3-gb1a639-elpaplus @ > > /Users/rmirelan/.emacs.d/elpa/org-plus-contrib-20180402/)`. > > > > ``` > > ("D" "Daily Log" entry (file+olp+datetree > (lambda > > nil (concat org-directory "/daily-log.org"))) > > "\n* %u Daily log\n:PROPERTIES:\n:Effort: > > 0:05\n:END:\n*Summary*:%?\n\n*Problem*:\n\n*Insight*:\n\n*Tomorrow*:\n\n" > > :time-prompt t :tree-type week :clock-in t :clock-resume t) > > ``` > > I cannot reproduce it with my configuration and the template above. > However... > > > org-extend-today-until 4 > > ... this could be related to the variable above. > > Regards, > > -- > Nicolas Goaziou > --000000000000adcee7056972049c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, that ended up being the problem. Specifically, the lin= e at https://code.orgmode.org= /bzg/org-mode/src/442e7a2911e3e0229b1b6dd1fe0449653274ec31/lisp/org-capture= .el#L1013 needs to be fixed to read instead

(append `(0 0 ,org-e= xtend-today-until)

On Sa= t, Apr 7, 2018 at 2:07 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Robert Irelan <ri= relan@gmail.com> writes:

> I have an org-capture template of type file+olp+datetree and :time-pro= mpt
> t. Whenever I invoke it, it prompts me for a date. If I enter the curr= ent
> date at the prompt, `%u` correctly formats the captured entry with tod= ay's
> date. However, if I enter any other date, whether in the future or pas= t,
> `%u` is formatted with the date 1 day before the date I enter at the > prompt. So, for example, if I enter the date "2018-04-01" at= the prompt,
> `%u` is formatted as "[2018-03-31 Sat]". I can consistently = reproduce this
> with the following template, and also with version `Org mode version 9= .1.9
> (9.1.9-3-gb1a639-elpaplus @
> /Users/rmirelan/.emacs.d/elpa/org-plus-contrib-20180402/)`.
>
> ```
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0("D" "Daily Log" entry (file= +olp+datetree (lambda
> nil (concat org-directory "/daily-log.org")))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n* %u Daily log\n:PROPERTIES:\n:Effort:<= br> > 0:05\n:END:\n*Summary*:%?\n\n*Problem*:\n\n*Insight*:\n\n*Tomorrow*:\n= \n"
> :time-prompt t :tree-type week :clock-in t :clock-resume t)
> ```

I cannot reproduce it with my configuration and the template above.
However...

>=C2=A0 =C2=A0org-extend-today-until 4

... this could be related to the variable above.

Regards,

--
Nicolas Goaziou
--000000000000adcee7056972049c--