From: Steven Bagley <stevenbagley@fastmail.fm>
To: emacs-orgmode@gnu.org
Subject: [BUG] wrong date returned by org-read-date in table formula [9.5.2 (release_9.5.2-3-geb9f34 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Sat, 01 Jan 2022 18:01:59 -0800 [thread overview]
Message-ID: <D699EC1C-2FB1-4EE5-9FA7-DD851C68FA16@fastmail.fm> (raw)
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
The following example, reading from "-Tue", inserts the wrong date into the table. Last Tuesday is not Jan 1, 2022.
| date | (0 55 17 1 1 2022 6 nil -28800) |
#+TBLFM: @1$2='(format "%s" (decode-time (org-read-date nil t "-Tue")))
However, using "-tue" (all lowercase) instead does work correctly.
The problem is that org-table-eval-formula binds case-fold-search to nil, which breaks the regex search near the top of org-read-date-get-relative.
Emacs : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.2.0, NS appkit-2113.20 Version 12.1 (Build 21C52))
of 2022-01-01
Package: Org mode version 9.5.2 (release_9.5.2-3-geb9f34 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)
reply other threads:[~2022-01-02 2:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=D699EC1C-2FB1-4EE5-9FA7-DD851C68FA16@fastmail.fm \
--to=stevenbagley@fastmail.fm \
--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).