emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DRAFT PATCH v4] Decouple LANG= and testing (was: Test failure due t


From: Ihor Radchenko
Subject: Re: [DRAFT PATCH v4] Decouple LANG= and testing (was: Test failure due to LANG)
Date: Sun, 23 Apr 2023 15:07:44 +0000

Ruijie Yu <ruijie@netyu.xyz> writes:

>> I recommend `org-element-timestamp-parser' for analysis.
>
> Thanks for pointing that out!  I didn't realize it was there.  Although,
> I don't think I can use this function as-is, nor its internal regexps:
> all the relevant tests where I used `org-test-timestamp-regexp' tried to
> remove the day-of-week part.  So I would need to know the region for the
> day-of-week portion.  At the moment, I can't think of anything other
> than making a group for DoW, and removing wrapping `save-match-data' in
> `org-element-timestamp-parser' -- which is why I had those convoluted
> group numbers in my `org-test-timestamp-regexp' for all portions that
> one may ever want to use, hoping that nobody goes beyond defining 100
> groups.

(let ((org-time-stamp-formats '("%Y-%m-%d" . "%Y-%m-%d %H:%M")))
     (org-element-timestamp-interpreter timestamp nil))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]