emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Irelan <rirelan@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Org-mode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <CAJUyYjowo-M2F0r6ySiyw7xLhSnuxFLH3Hpen_Q+QwP3Mz8hzA@mail.gmail.com> (raw)
In-Reply-To: <87muykvwdn.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

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 <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Robert Irelan <rirelan@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 2440 bytes --]

  reply	other threads:[~2018-04-09 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 19:09 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/)] Robert Irelan
2018-04-03 21:00 ` Nicolas Goaziou
2018-04-09 22:34   ` Robert Irelan [this message]
2018-04-11 21:03     ` 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=CAJUyYjowo-M2F0r6ySiyw7xLhSnuxFLH3Hpen_Q+QwP3Mz8hzA@mail.gmail.com \
    --to=rirelan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).