org-mode/testing/lisp
Ihor Radchenko e3a7c01874
Refactor org-time-stamp-custom-formats' and org-time-stamp-formats'
* lisp/org.el (org-time-stamp-formats):
* lisp/org.el (org-time-stamp-custom-formats): Change the default
values stripping leading "<" and trailing ">".  Update the docstring
explaining the format and that leading and trailing brackets are now
ignored.  Update the :type specification to more precise.
(org-time-stamp-format): Update the argument list and docstring
allowing to use the function more flexibly to find the time stamp
format for both `org-time-stamp-formats' and
`org-time-stamp-custom-formats'.  Rename `long' argument to more
accurate `with-time'.  Ignore brackets in the `org-time-stamp-formats'
and `org-time-stamp-custom-formats'.  Allow `inactive' argument to be
`no-brackets'
(org-format-timestamp):
(org-read-date-display):
(org-insert-time-stamp):
(org-display-custom-time):
(org-timestamp-translate):
* lisp/org-compat.el (org-timestamp-format): Rename
`org-timestamp-format' to `org-format-timestamp'.  The old variant is
too similar with other `org-time-stamp-format' function.  Also, use
`org-time-stamp-format' to determine the timestamp format instead of
using `org-time-stamp-formats' directly.
* lisp/ol.el (org-store-link):
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
* lisp/org-clock.el (org-clock-special-range):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-element.el (org-element-timestamp-interpreter):
* lisp/org-macro.el (org-macro--find-date):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/date):
* lisp/ox-odt.el (org-odt--format-timestamp):
(org-odt-template):
* lisp/ox.el (org-export-get-date):
* testing/lisp/test-org.el (test-org/timestamp-format): Use
`org-time-stamp-format' instead of directly examining
`org-time-stamp-custom-formats' and `org-time-stamp-formats'.  Use the
new function name `org-format-timestamp'.
* etc/ORG-NEWS (Default values and interpretations of ~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are changed):
(~org-timestamp-format~ is renamed to ~org-format-timestamp~):
(Updated argument list in ~org-time-stamp-format~): Document the
user-facing changes.

This commit documents and unifies previously undocumented assumptions
about the values of `org-time-stamp-formats' and
`org-time-stamp-custom-formats'.  Instead of fiddling with
leading/trailing brackets in the values, expedite the time format
calculation to `org-time-stamp-format'.  The undocumented assumption
about brackets in user option `org-time-stamp-custom-formats' is not
relaxed making the docstring correct.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87k04ppp1t.fsf@localhost
2022-11-07 15:05:37 +08:00
..
test-ob-awk.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-C.el ob-C: do not swallow double quotes on raw output 2022-09-27 16:20:57 +02:00
test-ob-clojure.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-emacs-lisp.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-eshell.el testing/lisp/test-ob-eshell.el: Fix tests 2022-10-13 18:28:56 +08:00
test-ob-exp.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-fortran.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-header-arg-defaults.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-java.el test-ob-java: Test Java source block header arguments at all levels 2022-10-21 21:30:53 +08:00
test-ob-julia.el testing/lisp: Add missing `featurep' checks for required packages 2022-10-13 18:30:07 +08:00
test-ob-lilypond.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-lob.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-lua.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-maxima.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-octave.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-perl.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-plantuml.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-python.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-R.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-ruby.el testing/lisp: Add missing `featurep' checks for required packages 2022-10-13 18:30:07 +08:00
test-ob-scheme.el testing/lisp: Add missing `featurep' checks for required packages 2022-10-13 18:30:07 +08:00
test-ob-sed.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-shell.el org-babel: Never throw away standard error 2022-11-04 10:48:38 +08:00
test-ob-sql.el testing/lisp: Add missing `provide' 2022-10-13 18:30:44 +08:00
test-ob-sqlite.el testing/lisp: Add missing `provide' 2022-10-13 18:30:44 +08:00
test-ob-table.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ob-tangle.el org-babel: Add new "strip-tangle" :noweb argument value 2022-11-07 10:54:13 +08:00
test-ob.el test-ob: Test indentation of multiline text in list output 2022-10-22 12:30:21 +08:00
test-oc.el testing: Address FIXMEs identified in 1a5e3f931 2022-09-16 11:30:16 +08:00
test-ol-bbdb.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ol.el testing: Address FIXMEs identified in 1a5e3f931 2022-09-16 11:30:16 +08:00
test-org-agenda.el org-agenda: Make sure file restriction can be removed 2022-10-12 15:35:12 +08:00
test-org-archive.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-attach-git.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-attach.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-capture.el org-capture: Add template hook properties 2022-10-07 13:38:52 +08:00
test-org-clock.el test-org-clock: Test DWIM update of days 2022-11-06 11:27:35 +08:00
test-org-colview.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-datetree.el org-datetree-insert-line: Fix blank line insertion 2022-10-26 15:25:24 +08:00
test-org-duration.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-element.el lisp/org-element: Add a parameters-line property to special blocks 2022-10-20 17:39:55 +08:00
test-org-feed.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-fold.el test-org-fold.el: Add test for inline image displaying when cycling 2022-10-26 12:43:08 +08:00
test-org-footnote.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-info.el ol-info: Define :insert-description function 2022-08-26 21:09:39 +08:00
test-org-inlinetask.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-lint.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-list.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-macro.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-macs.el test-org-macs.el: Add test for template-expansion bug 2022-04-30 17:45:32 +08:00
test-org-num.el org-num: Add tests 2020-08-28 08:45:41 +02:00
test-org-pcomplete.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-protocol.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-src.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org-table.el org-latex-line-break-safe: Use safer value of "\\[0pt]" 2022-10-29 10:34:05 +08:00
test-org-tempo.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-timer.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-org.el Refactor org-time-stamp-custom-formats' and org-time-stamp-formats' 2022-11-07 15:05:37 +08:00
test-ox-latex.el org-latex-line-break-safe: Use safer value of "\\[0pt]" 2022-10-29 10:34:05 +08:00
test-ox-publish.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00
test-ox-texinfo.el ox-texinfo: Include LaTeX in Texinfo exports 2022-09-21 15:29:50 +08:00
test-ox.el Add a regression test for `org-export-with-buffer-copy' 2022-10-10 17:36:11 +08:00
test-property-inheritance.el testing: Make all files use lexical-binding 2022-09-15 19:17:19 +08:00