emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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/)]
@ 2022-01-02  2:01 Steven Bagley
  0 siblings, 0 replies; only message in thread
From: Steven Bagley @ 2022-01-02  2:01 UTC (permalink / raw)
  To: emacs-orgmode

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/)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-02  2:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02  2:01 [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/)] Steven Bagley

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).