summaryrefslogtreecommitdiff
path: root/etc/ORG-NEWS
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@posteo.net>2022-11-07 15:05:37 +0800
committerIhor Radchenko <yantar92@posteo.net>2022-11-07 15:05:37 +0800
commite3a7c01874c9bb80e04ffa58c578619faf09e7f0 (patch)
tree6fac86213f88963f776b30f9e8b8689d4cbf8b25 /etc/ORG-NEWS
parent155dc778e8cd12bdfb4c7cac7e03f166ece1059c (diff)
downloadorg-mode-e3a7c01874c9bb80e04ffa58c578619faf09e7f0.tar.gz
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
Diffstat (limited to 'etc/ORG-NEWS')
-rw-r--r--etc/ORG-NEWS30
1 files changed, 30 insertions, 0 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index ca19446..b84a689 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -460,6 +460,36 @@ exported and an ASCII graph will be inserted below the src block.
The new variable name is =org-plantuml-args=. It now applies to both
jar PlantUML file and executable.
+*** Default values and interpretations of ~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are changed
+
+Leading =<= and trailing =>= in the default values of
+~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are
+stripped.
+
+The Org functions that are using these variables also ignore leading
+and trailing brackets (=<...>= and =[...]=, if present).
+
+This change makes the Org code more consistent and also makes the
+docstring for ~org-time-stamp-custom-formats~ accurate.
+
+No changes on the user side are needed if
+~org-time-stamp-custom-formats~ was customized.
+*** ~org-timestamp-format~ is renamed to ~org-format-timestamp~
+
+The old function name is similar to other ~org-time-stamp-format~
+function. The new name emphasizes that ~org-format-timestamp~ works
+on =timestamp= objects.
+
+*** Updated argument list in ~org-time-stamp-format~
+
+New =custom= argument in ~org-time-stamp-format~ makes the function
+use ~org-time-stamp-custom-formats~ instead of
+~org-time-stamp-formats~ to determine the format.
+
+Optional argument =long= is renamed to =with-time=, emphasizing that it refers to time stamp format with time specification.
+
+Optional argument =inactive= can now have a value =no-brackets= to
+return format string with brackets stripped.
** Miscellaneous
*** SQL Babel ~:dbconnection~ parameter can be mixed with other SQL Babel parameters