org-macs.el: new function `org-format-seconds'.
* install/git/org-mode/lisp/org-table.el (org-table-time-seconds-to-string): use `org-format-seconds' instead of `format-seconds'. * install/git/org-mode/lisp/org-macs.el (org-format-seconds): handle case where `format-seconds' does not exist.
This commit is contained in:
parent
a14815aa92
commit
16faa2b6c1
|
@ -361,6 +361,12 @@ The number of levels is controlled by `org-inlinetask-min-level'"
|
|||
(nstars (if org-odd-levels-only (1- (* limit-level 2)) limit-level)))
|
||||
(format "\\*\\{1,%d\\} " nstars))))
|
||||
|
||||
(defun org-format-seconds (string seconds)
|
||||
"Compatibility function replacing format-seconds"
|
||||
(if (fboundp 'format-seconds)
|
||||
(format-seconds string seconds)
|
||||
(format-time-string string (seconds-to-time seconds))))
|
||||
|
||||
(provide 'org-macs)
|
||||
|
||||
;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668
|
||||
|
|
|
@ -3220,9 +3220,9 @@ For example: 28 -> AB."
|
|||
|
||||
(defun org-table-time-seconds-to-string (secs)
|
||||
"Convert a number of seconds to a time string."
|
||||
(cond ((>= secs 3600) (format-seconds "%h:%.2m:%.2s" secs))
|
||||
((>= secs 60) (format-seconds "%m:%.2s" secs))
|
||||
(t (format-seconds "%s" secs))))
|
||||
(cond ((>= secs 3600) (org-format-seconds "%h:%.2m:%.2s" secs))
|
||||
((>= secs 60) (org-format-seconds "%m:%.2s" secs))
|
||||
(t (org-format-seconds "%s" secs))))
|
||||
|
||||
(defun org-table-fedit-convert-buffer (function)
|
||||
"Convert all references in this buffer, using FUNCTION."
|
||||
|
|
Loading…
Reference in New Issue