Adding release tag

-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEG+FaXQip1ZWVgUdrFDesAvc/kaIFAl1vQ38ACgkQFDesAvc/
 kaKMNAgAhPFwl7VJ6mnKPkBfQWclYKWZTKDhRqnX1BQ1uamvZsbuPqVpWjmlAWos
 TvNqNOkXTpVlMJnR0UeSogrEkWT7Gwnzi3bbkSAVbQ/LqbLw8hH6JCD1zLOxiR14
 NjwDzBcG7WW5Ev6W9OSSi0j6ZZSdm4ekH9f0NyiF+PS96GZulLpStnBn7aLCizjZ
 tUwwERlu/izio55lInWFEKq3YZu5sMQfoPh44iiqDhaFA8i4OqXe7v3510soGyX5
 wJT3AcvlDe5/K2JJC7Y5j4gVDs8EBmVmmaXmdfp18MY+ufRvIFlKnwQ5RKQcLe2R
 tLg14uGQOS67qrsOwS/+3bqlq9S5pg==
 =1YrF
 -----END PGP SIGNATURE-----

Merge tag 'release_9.2.6' into emacs-sync

Adding release tag

# gpg: Signature made Wed 04 Sep 2019 12:54:23 AM EDT
# gpg:                using RSA key 1BE15A5D08A9D5959581476B1437AC02F73F91A2
# gpg: Can't check signature: No public key
This commit is contained in:
Kyle Meyer 2019-09-07 16:47:53 -04:00
commit bff2f97b22
24 changed files with 284 additions and 266 deletions

View File

@ -22,8 +22,8 @@
;;; Commentary:
;; This library implements a RSS 2.0 back-end for Org exporter, based on
;; the `html' back-end.
;; This library implements an RSS 2.0 back-end for Org exporter, based
;; on the `html' back-end.
;;
;; It requires Emacs 24.1 at least.
;;
@ -85,7 +85,7 @@
:package-version '(Org . "8.0"))
(defcustom org-rss-image-url "https://orgmode.org/img/org-mode-unicorn-logo.png"
"The URL of the an image for the RSS feed."
"The URL of the image for the RSS feed."
:group 'org-export-rss
:type 'string)
@ -143,7 +143,7 @@ When nil, Org will create ids using `org-icalendar-create-uid'."
;;;###autoload
(defun org-rss-export-as-rss (&optional async subtreep visible-only)
"Export current buffer to a RSS buffer.
"Export current buffer to an RSS buffer.
If narrowing is active in the current buffer, only export its
narrowed part.
@ -173,7 +173,7 @@ non-nil."
;;;###autoload
(defun org-rss-export-to-rss (&optional async subtreep visible-only)
"Export current buffer to a RSS file.
"Export current buffer to an RSS file.
If narrowing is active in the current buffer, only export its
narrowed part.

View File

@ -12986,13 +12986,13 @@ general options (see [[*Export Settings]]).
In order to be effective, the =babel= or =polyglossia=
packages---according to the LaTeX compiler used---must be loaded
with the appropriate language as argument. This can be
accomplished by modifying the =org-latex-package-alist= variable,
accomplished by modifying the ~org-latex-packages-alist~ variable,
e.g., with the following snippet:
#+begin_src emacs-lisp
(add-to-list org-latex-package-alist
(add-to-list 'org-latex-packages-alist
'("AUTO" "babel" t ("pdflatex")))
(add-to-list org-latex-package-alist
(add-to-list 'org-latex-packages-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
#+end_src

View File

@ -2278,7 +2278,7 @@ its files. You can directly use TeX-like syntax for special symbols, enter
formulas and entire @LaTeX{} environments.
@smallexample
Angles are written as Greek letters \alpha, \beta and \gamma. The mass if
Angles are written as Greek letters \alpha, \beta and \gamma. The mass of
the sun is M_sun = 1.989 x 10^30 kg. The radius of the sun is R_@{sun@} =
6.96 x 10^8 m. If $a^2=b$ and $b=2$, then the solution must be either
$a=+\sqrt@{2@}$ or $a=-\sqrt@{2@}$.

View File

@ -281,7 +281,8 @@ this template."
(set-marker begin nil)
(set-marker end nil)))))
(kill-buffer org-babel-exp-reference-buffer)
(remove-text-properties (point-min) (point-max) '(org-reference)))))))
(remove-text-properties (point-min) (point-max)
'(org-reference nil)))))))
(defun org-babel-exp-do-export (info type &optional hash)
"Return a string with the exported content of a code block.

View File

@ -158,7 +158,7 @@ constructs (header arguments, no-web syntax etc...) are ignored."
(interactive "P")
(let* ((contents (buffer-string))
(haskell-regexp
(concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)?[\r\n]"
(concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)[\r\n]"
"\\([^\000]*?\\)[\r\n][ \t]*#\\+end_src.*"))
(base-name (file-name-sans-extension (buffer-file-name)))
(tmp-file (org-babel-temp-file "haskell-"))

View File

@ -4189,9 +4189,12 @@ items if they have an hour specification like [h]h:mm."
((= w1 w2) (format " (W%02d)" w1))
(t (format " (W%02d-W%02d)" w1 w2)))
":\n")))
(add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
'org-date-line t))
(org-agenda-mark-header-line s))
;; Add properties if we actually inserted a header.
(when (> (point) s)
(add-text-properties s (1- (point))
(list 'face 'org-agenda-structure
'org-date-line t))
(org-agenda-mark-header-line s)))
(while (setq d (pop day-numbers))
(setq date (calendar-gregorian-from-absolute d)
s (point))
@ -5428,7 +5431,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(and org-agenda-todo-ignore-deadlines
(re-search-forward org-deadline-time-regexp end t)
(cond
((memq org-agenda-todo-ignore-deadlines '(t all)) t)
((eq org-agenda-todo-ignore-deadlines 'all) t)
((eq org-agenda-todo-ignore-deadlines 'far)
(not (org-deadline-close-p (match-string 1))))
((eq org-agenda-todo-ignore-deadlines 'future)
@ -5497,8 +5500,8 @@ displayed in agenda view."
(substring
(format-time-string
(car org-time-stamp-formats)
(apply #'encode-time ; DATE bound by calendar
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
(encode-time ; DATE bound by calendar
0 0 0 (nth 1 date) (car date) (nth 2 date)))
1 11))
"\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[hdwmy]>\\)"
"\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
@ -5748,8 +5751,8 @@ then those holidays will be skipped."
(substring
(format-time-string
(car org-time-stamp-formats)
(apply 'encode-time ; DATE bound by calendar
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
(encode-time ; DATE bound by calendar
0 0 0 (nth 1 date) (car date) (nth 2 date)))
1 11))))
(org-agenda-search-headline-for-time nil)
marker hdmarker priority category level tags closedp type
@ -5869,10 +5872,8 @@ See also the user option `org-agenda-clock-consistency-checks'."
(throw 'next t))
(setq ts (match-string 1)
te (match-string 3)
ts (float-time
(apply #'encode-time (org-parse-time-string ts)))
te (float-time
(apply #'encode-time (org-parse-time-string te)))
ts (float-time (org-time-string-to-time ts))
te (float-time (org-time-string-to-time te))
dt (- te ts))))
(cond
((> dt (* 60 maxtime))
@ -5923,8 +5924,8 @@ See also the user option `org-agenda-clock-consistency-checks'."
(throw 'exit t))
;; We have a shorter gap.
;; Now we have to get the minute of the day when these times are
(let* ((t1dec (decode-time (seconds-to-time t1)))
(t2dec (decode-time (seconds-to-time t2)))
(let* ((t1dec (org-decode-time t1))
(t2dec (org-decode-time t2))
;; compute the minute on the day
(min1 (+ (nth 1 t1dec) (* 60 (nth 2 t1dec))))
(min2 (+ (nth 1 t2dec) (* 60 (nth 2 t2dec)))))
@ -9265,7 +9266,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
(goto-char (point-max))
(while (not (bobp))
(when (equal marker (org-get-at-bol 'org-marker))
(remove-text-properties (point-at-bol) (point-at-eol) '(display))
(remove-text-properties (point-at-bol) (point-at-eol) '(display nil))
(org-move-to-column (- (window-width) (length stamp)) t)
(add-text-properties
(1- (point)) (point-at-eol)

View File

@ -152,7 +152,7 @@ type The type of entry. Valid types are:
first plain list at the target
location.
checkitem a checkbox item. This differs from the
plain list item only is so far as it uses a
plain list item only in so far as it uses a
different default template.
table-line a new line in the first table at target location.
plain text to be inserted as it is.
@ -1011,9 +1011,9 @@ Store them in the capture property list."
(not (= (time-to-days prompt-time) (org-today))))
;; Use 00:00 when no time is given for another
;; date than today?
(apply #'encode-time
(append `(0 0 ,org-extend-today-until)
(cl-cdddr (decode-time prompt-time)))))
(apply #'encode-time 0 0
org-extend-today-until
(cl-cdddr (decode-time prompt-time))))
((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)"
org-read-date-final-answer)
;; Replace any time range by its start.
@ -1646,7 +1646,7 @@ The template may still contain \"%?\" for cursor positioning."
;; Mark %() embedded elisp for later evaluation.
(org-capture-expand-embedded-elisp 'mark)
;; Expand non-interactive templates.
(let ((regexp "%\\(:[-a-za-z]+\\|<\\([^>\n]+\\)>\\|[aAcfFikKlntTuUx]\\)"))
(let ((regexp "%\\(:[-A-Za-z]+\\|<\\([^>\n]+\\)>\\|[aAcfFikKlntTuUx]\\)"))
(save-excursion
(while (re-search-forward regexp nil t)
;; `org-capture-escaped-%' may modify buffer and cripple

View File

@ -729,8 +729,9 @@ menu\nmouse-2 will jump to task"))
The time returned includes the time spent on this task in
previous clocking intervals."
(let ((currently-clocked-time
(floor (- (float-time)
(float-time org-clock-start-time)) 60)))
(floor (org-time-convert-to-integer
(org-time-since org-clock-start-time))
60)))
(+ currently-clocked-time (or org-clock-total-time 0))))
(defun org-clock-modify-effort-estimate (&optional value)
@ -945,9 +946,7 @@ CLOCK is a cons cell of the form (MARKER START-TIME)."
(org-clock-clock-out clock fail-quietly))
((org-is-active-clock clock) nil)
(t (org-clock-clock-in clock t))))
((pred (time-less-p (current-time)))
;; ^ NOTE: Here and in other `time-less-p' calls, we use
;; (current-time) rather than nil for Emacs 24 compatibility.
((pred (org-time-less-p nil))
(error "RESOLVE-TO must refer to a time in the past"))
(_
(when restart (error "RESTART is not valid here"))
@ -1046,11 +1045,8 @@ to be CLOCKED OUT."))))
nil 45)))
(and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default
(floor (/ (float-time
;; NOTE: Here and in other `time-subtract'
;; calls, we use (current-time) rather than nil
;; for Emacs 24 compatibility.
(time-subtract (current-time) last-valid)) 60)))
(floor (org-time-convert-to-integer (org-time-since last-valid))
60))
(keep
(and (memq ch '(?k ?K))
(read-number "Keep how many minutes? " default)))
@ -1058,8 +1054,9 @@ to be CLOCKED OUT."))))
(and (memq ch '(?g ?G))
(read-number "Got back how many minutes ago? " default)))
(subtractp (memq ch '(?s ?S)))
(barely-started-p (< (- (float-time last-valid)
(float-time (cdr clock))) 45))
(barely-started-p (org-time-less-p
(org-time-subtract last-valid (cdr clock))
45))
(start-over (and subtractp barely-started-p)))
(cond
((memq ch '(?j ?J))
@ -1085,10 +1082,9 @@ to be CLOCKED OUT."))))
(and gotback (= gotback default)))
'now)
(keep
(time-add last-valid (seconds-to-time (* 60 keep))))
(org-time-add last-valid (* 60 keep)))
(gotback
(time-subtract (current-time)
(seconds-to-time (* 60 gotback))))
(org-time-since (* 60 gotback)))
(t
(error "Unexpected, please report this as a bug")))
(and gotback last-valid)
@ -1118,9 +1114,9 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
(lambda (clock)
(format
"Dangling clock started %d mins ago"
(floor (- (float-time)
(float-time (cdr clock)))
60)))))
(floor (org-time-convert-to-integer
(org-time-since (cdr clock)))
60)))))
(or last-valid
(cdr clock)))))))))))
@ -1170,7 +1166,7 @@ so long."
org-clock-marker (marker-buffer org-clock-marker))
(let* ((org-clock-user-idle-seconds (org-user-idle-seconds))
(org-clock-user-idle-start
(time-since (seconds-to-time org-clock-user-idle-seconds)))
(org-time-since org-clock-user-idle-seconds))
(org-clock-resolving-clocks-due-to-idleness t))
(if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time))
(org-clock-resolve
@ -1301,8 +1297,7 @@ the default behavior."
(setq ts (concat "[" (match-string 1) "]"))
(goto-char (match-end 1))
(setq org-clock-start-time
(apply 'encode-time
(org-parse-time-string (match-string 1))))
(org-time-string-to-time (match-string 1)))
(setq org-clock-effort (org-entry-get (point) org-effort-property))
(setq org-clock-total-time (org-clock-sum-current-item
(org-clock-get-sum-start))))
@ -1332,9 +1327,10 @@ the default behavior."
(y-or-n-p
(format
"You stopped another clock %d mins ago; start this one from then? "
(/ (- (float-time
(org-current-time org-clock-rounding-minutes t))
(float-time leftover))
(/ (org-time-convert-to-integer
(org-time-subtract
(org-current-time org-clock-rounding-minutes t)
leftover))
60)))
leftover)
start-time
@ -1439,7 +1435,7 @@ The time is always returned as UTC."
(day (nth 3 dt)))
(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
(setf (nth 2 dt) org-extend-today-until)
(apply #'encode-time (append (list 0 0) (nthcdr 2 dt)))))
(apply #'encode-time 0 0 (nthcdr 2 dt))))
((or (equal cmt "all")
(and (or (not cmt) (equal cmt "auto"))
(not lr)))
@ -1585,14 +1581,12 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
(delete-region (point) (point-at-eol))
(insert "--")
(setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive))
(setq s (- (float-time
(apply #'encode-time (org-parse-time-string te)))
(float-time
(apply #'encode-time (org-parse-time-string ts))))
h (floor (/ s 3600))
s (- s (* 3600 h))
m (floor (/ s 60))
s (- s (* 60 s)))
(setq s (org-time-convert-to-integer
(time-subtract
(org-time-string-to-time te)
(org-time-string-to-time ts)))
h (floor s 3600)
m (floor (mod s 3600) 60))
(insert " => " (format "%2d:%02d" h m))
(move-marker org-clock-marker nil)
(move-marker org-clock-hd-marker nil)
@ -1829,7 +1823,7 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
(org-parse-time-string (match-string 3)))))
(dt (- (if tend (min te tend) te)
(if tstart (max ts tstart) ts))))
(when (> dt 0) (cl-incf t1 (floor (/ dt 60))))))
(when (> dt 0) (cl-incf t1 (floor dt 60)))))
((match-end 4)
;; A naked time.
(setq t1 (+ t1 (string-to-number (match-string 5))
@ -1843,8 +1837,8 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
tend
(>= (float-time org-clock-start-time) tstart)
(<= (float-time org-clock-start-time) tend))
(let ((time (floor (- (float-time)
(float-time org-clock-start-time))
(let ((time (floor (org-time-convert-to-integer
(org-time-since org-clock-start-time))
60)))
(setq t1 (+ t1 time))))
(let* ((headline-forced
@ -2699,7 +2693,7 @@ LEVEL is an integer. Indent by two spaces per level above 1."
"Increment day in TS by N (defaulting to 1).
The TS argument has the same type as the return values of
`float-time' or `current-time'."
(let ((tsd (decode-time ts)))
(let ((tsd (org-decode-time ts)))
(cl-incf (nth 3 tsd) (or n 1))
(setf (nth 8 tsd) nil) ; no time zone: increasing day skips one whole day
(apply 'encode-time tsd)))
@ -2735,25 +2729,24 @@ The TS argument has the same type as the return values of
(te (setq te (org-matcher-time te))))
(setq tsb
(if (eq step0 'week)
(let ((dow (nth 6 (decode-time (seconds-to-time ts)))))
(let ((dow (nth 6 (org-decode-time ts))))
(if (<= dow ws) ts
(org-clocktable-increment-day ts ; decrement
(- ws dow))))
(float-time (org-clocktable-increment-day ts ; decrement
(- ws dow)))))
ts))
(while (< (float-time tsb) te)
(while (< tsb te)
(unless (bolp) (insert "\n"))
(let* ((start-time (seconds-to-time (max (float-time tsb) ts)))
(dow (nth 6 (decode-time (seconds-to-time tsb))))
(let* ((start-time (max tsb ts))
(dow (nth 6 (org-decode-time tsb)))
(days-to-skip (cond ((eq step0 'day) 1)
;; else 'week:
((= dow ws) 7)
(t (- ws dow)))))
(setq tsb (time-to-seconds (org-clocktable-increment-day tsb
days-to-skip)))
(setq tsb (float-time (org-clocktable-increment-day tsb days-to-skip)))
(insert "\n"
(if (eq step0 'day) "Daily report: "
"Weekly report starting on: ")
(format-time-string (org-time-stamp-format nil t) start-time)
(org-format-time-string (org-time-stamp-format nil t) start-time)
"\n")
(let ((table-begin (line-beginning-position 0))
(step-time
@ -2762,10 +2755,10 @@ The TS argument has the same type as the return values of
params
(list
:header "" :step nil :block nil
:tstart (format-time-string (org-time-stamp-format t t)
start-time)
:tend (format-time-string (org-time-stamp-format t t)
(seconds-to-time (min te tsb))))))))
:tstart (org-format-time-string (org-time-stamp-format t t)
start-time)
:tend (org-format-time-string (org-time-stamp-format t t)
(min te tsb)))))))
(re-search-forward "^[ \t]*#\\+END:")
(when (and stepskip0 (equal step-time 0))
;; Remove the empty table
@ -2910,8 +2903,7 @@ Otherwise, return nil."
(<= org-clock-marker (point-at-eol)))
;; The clock is running here
(setq org-clock-start-time
(apply 'encode-time
(org-parse-time-string (match-string 1))))
(org-time-string-to-time (match-string 1)))
(org-clock-update-mode-line)))
(t
(and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))

View File

@ -1117,7 +1117,7 @@ as a canonical duration, i.e., using units defined in
(cond
((string-match-p org-ts-regexp s)
(/ (- org-columns--time
(float-time (apply #'encode-time (org-parse-time-string s))))
(float-time (org-time-string-to-time s)))
60))
((org-duration-p s) (org-duration-to-minutes s t)) ;skip user units
(t (user-error "Invalid age: %S" s))))

View File

@ -70,16 +70,36 @@
;;; Emacs < 27.1 compatibility
(unless (fboundp 'proper-list-p)
;; `proper-list-p' was added in Emacs 27.1. The function below is
;; taken from Emacs subr.el 200195e824b^.
(defun proper-list-p (object)
"Return OBJECT's length if it is a proper list, nil otherwise.
A proper list is neither circular nor dotted (i.e., its last cdr
is nil)."
(and (listp object) (ignore-errors (length object)))))
(if (fboundp 'xor)
;; `xor' was added in Emacs 27.1.
(defalias 'org-xor #'xor)
(defsubst org-xor (a b)
"Exclusive `or'."
(if a (not b) b)))
(unless (fboundp 'pcomplete-uniquify-list)
;; The misspelled variant was made obsolete in Emacs 27.1
(defalias 'pcomplete-uniquify-list 'pcomplete-uniqify-list))
(defun org-current-time-as-list ()
"Compatibility wrapper for `current-time'.
As of Emacs 27.1, `current-time' callers should not assume a list
return value."
(or (ignore-errors (encode-time nil 'list))
(current-time)))
(if (fboundp 'time-convert)
(progn
(defsubst org-time-convert-to-integer (time)
(time-convert time 'integer))
(defsubst org-time-convert-to-list (time)
(time-convert time 'list)))
(defun org-time-convert-to-integer (time)
(floor (float-time time)))
(defun org-time-convert-to-list (time)
(seconds-to-time (float-time time))))
;;; Emacs < 26.1 compatibility
@ -137,6 +157,35 @@ This is a floating point number if the size is too large for an integer."
Case is significant."
(string< s1 s2)))
;; The time- functions below translate nil to `current-time` and
;; accept an integer as of Emacs 25. `decode-time` and
;; `format-time-string` accept nil on Emacs 24 but don't accept an
;; integer until Emacs 25.
(if (< emacs-major-version 25)
(let ((convert
(lambda (time)
(cond ((not time) (current-time))
((numberp time) (seconds-to-time time))
(t time)))))
(defun org-decode-time (&optional time)
(decode-time (funcall convert time)))
(defun org-format-time-string (format-string &optional time universal)
(format-time-string format-string (funcall convert time) universal))
(defun org-time-add (a b)
(time-add (funcall convert a) (funcall convert b)))
(defun org-time-subtract (a b)
(time-subtract (funcall convert a) (funcall convert b)))
(defun org-time-since (time)
(time-since (funcall convert time)))
(defun org-time-less-p (t1 t2)
(time-less-p (funcall convert t1) (funcall convert t2))))
(defalias 'org-decode-time 'decode-time)
(defalias 'org-format-time-string 'format-time-string)
(defalias 'org-time-add 'time-add)
(defalias 'org-time-subtract 'time-subtract)
(defalias 'org-time-since 'time-since)
(defalias 'org-time-less-p 'time-less-p))
;;; Obsolete aliases (remove them after the next major release).
@ -622,15 +671,6 @@ attention to case differences."
(eq t (compare-strings suffix nil nil
string start-pos nil ignore-case))))))
(unless (fboundp 'proper-list-p)
;; `proper-list-p' was added in Emacs 27.1. The function below is
;; taken from Emacs subr.el 200195e824b^.
(defun proper-list-p (object)
"Return OBJECT's length if it is a proper list, nil otherwise.
A proper list is neither circular nor dotted (i.e., its last cdr
is nil)."
(and (listp object) (ignore-errors (length object)))))
;;; Integration with and fixes for other packages

View File

@ -4819,13 +4819,13 @@ you want to help debugging the issue.")
(defvar org-element-cache-sync-idle-time 0.6
"Length, in seconds, of idle time before syncing cache.")
(defvar org-element-cache-sync-duration (seconds-to-time 0.04)
(defvar org-element-cache-sync-duration 0.04
"Maximum duration, as a time value, for a cache synchronization.
If the synchronization is not over after this delay, the process
pauses and resumes after `org-element-cache-sync-break'
seconds.")
(defvar org-element-cache-sync-break (seconds-to-time 0.3)
(defvar org-element-cache-sync-break 0.3
"Duration, as a time value, of the pause between synchronizations.
See `org-element-cache-sync-duration' for more information.")
@ -5107,7 +5107,7 @@ Assume ELEMENT belongs to cache and that a cache is active."
(setq org-element--cache-sync-timer
(run-with-idle-timer
(let ((idle (current-idle-time)))
(if idle (time-add idle org-element-cache-sync-break)
(if idle (org-time-add idle org-element-cache-sync-break)
org-element-cache-sync-idle-time))
nil
#'org-element--cache-sync
@ -5118,7 +5118,7 @@ Assume ELEMENT belongs to cache and that a cache is active."
TIME-LIMIT is a time value or nil."
(and time-limit
(or (input-pending-p)
(time-less-p time-limit (current-time)))))
(org-time-less-p time-limit nil))))
(defsubst org-element--cache-shift-positions (element offset &optional props)
"Shift ELEMENT properties relative to buffer positions by OFFSET.
@ -5172,11 +5172,8 @@ updated before current modification are actually submitted."
(and next (aref next 0))
threshold
(and (not threshold)
;; NOTE: Here and in other `time-add' calls, we use
;; (current-time) rather than nil for Emacs 24
;; compatibility.
(time-add (current-time)
org-element-cache-sync-duration))
(org-time-add nil
org-element-cache-sync-duration))
future-change)
;; Request processed. Merge current and next offsets and
;; transfer ending position.

View File

@ -243,7 +243,9 @@ If `org-store-link' was called with a prefix arg the meaning of
(let ((articles 1)
group-opened)
(while (and (not group-opened)
;; Stop on integer overflows.
;; Stop on integer overflows. Note: We
;; can drop this once we require at least
;; Emacs 27, which supports bignums.
(> articles 0))
(setq group-opened (gnus-group-read-group articles t group))
(setq articles (if (< articles 16)

View File

@ -406,8 +406,8 @@ current time."
"Insert consistency graph for any habitual tasks."
(let ((inhibit-read-only t)
(buffer-invisibility-spec '(org-link))
(moment (time-subtract (current-time)
(list 0 (* 3600 org-extend-today-until) 0))))
(moment (org-time-subtract nil
(* 3600 org-extend-today-until))))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
(while (not (eobp))

View File

@ -357,7 +357,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
"Return string with random (version 4) UUID."
(let ((rnd (md5 (format "%s%s%s%s%s%s%s"
(random)
(org-current-time-as-list)
(org-time-convert-to-list nil)
(user-uid)
(emacs-pid)
(user-full-name)
@ -413,18 +413,21 @@ The input I may be a character, or a single-letter string."
r))
(defun org-id-time-to-b36 (&optional time)
"Encode TIME as a 10-digit string.
"Encode TIME as a 12-digit string.
This string holds the time to micro-second accuracy, and can be decoded
using `org-id-decode'."
(setq time (or time (org-current-time-as-list)))
;; FIXME: If TIME represents N seconds after the epoch, then
;; this encoding assumes 0 <= N < 110075314176 = (* (expt 36 4) 65536),
;; i.e., that TIME is from 1970-01-01 00:00:00 to 5458-02-23 20:09:36 UTC.
(setq time (org-time-convert-to-list nil))
(concat (org-id-int-to-b36 (nth 0 time) 4)
(org-id-int-to-b36 (nth 1 time) 4)
(org-id-int-to-b36 (or (nth 2 time) 0) 4)))
(org-id-int-to-b36 (nth 2 time) 4)))
(defun org-id-decode (id)
"Split ID into the prefix and the time value that was used to create it.
The return value is (prefix . time) where PREFIX is nil or a string,
and time is the usual three-integer representation of time."
and TIME is a Lisp time value (HI LO USEC)."
(let (prefix time parts)
(setq parts (org-split-string id ":"))
(if (= 2 (length parts))

View File

@ -333,7 +333,7 @@ stopped."
(let* ((case-fold-search t)
(limited-re (org-get-limited-outline-regexp))
(level (or (org-current-level) 0))
(time-limit (and delay (time-add (current-time) delay))))
(time-limit (and delay (org-time-add nil delay))))
;; For each line, set `line-prefix' and `wrap-prefix'
;; properties depending on the type of line (headline, inline
;; task, item or other).
@ -346,7 +346,7 @@ stopped."
;; In asynchronous mode, take a break of
;; `org-indent-agent-resume-delay' every DELAY to avoid
;; blocking any other idle timer or process output.
((and delay (time-less-p time-limit (current-time)))
((and delay (org-time-less-p time-limit nil))
(setq org-indent-agent-resume-timer
(run-with-idle-timer
(time-add (current-idle-time) org-indent-agent-resume-delay)

View File

@ -1568,22 +1568,6 @@ STRUCT may be modified if `org-list-demote-modify-bullet' matches
bullets between START and END."
(let* (acc
(set-assoc (lambda (cell) (push cell acc) cell))
(change-bullet-maybe
(lambda (item)
(let ((new-bul
(cdr (assoc
;; Normalize ordered bullets.
(let ((bul (org-list-get-bullet item struct))
(case-fold-search nil))
(cond ((string-match "[A-Z]\\." bul) "A.")
((string-match "[A-Z])" bul) "A)")
((string-match "[a-z]\\." bul) "a.")
((string-match "[a-z])" bul) "a)")
((string-match "[0-9]\\." bul) "1.")
((string-match "[0-9])" bul) "1)")
(t (org-trim bul))))
org-list-demote-modify-bullet))))
(when new-bul (org-list-set-bullet item struct new-bul)))))
(ind
(lambda (cell)
(let* ((item (car cell))
@ -1599,7 +1583,20 @@ bullets between START and END."
;; Item is in zone...
(let ((prev (org-list-get-prev-item item struct prevs)))
;; Check if bullet needs to be changed.
(funcall change-bullet-maybe item)
(pcase (assoc (let ((b (org-list-get-bullet item struct))
(case-fold-search nil))
(cond ((string-match "[A-Z]\\." b) "A.")
((string-match "[A-Z])" b) "A)")
((string-match "[a-z]\\." b) "a.")
((string-match "[a-z])" b) "a)")
((string-match "[0-9]\\." b) "1.")
((string-match "[0-9])" b) "1)")
(t (org-trim b))))
org-list-demote-modify-bullet)
(`(,_ . ,bullet)
(org-list-set-bullet
item struct (org-list-bullet-string bullet)))
(_ nil))
(cond
;; First item indented but not parent: error
((and (not prev) (or (not parent) (< parent start)))
@ -2686,11 +2683,12 @@ Return t if successful."
(error "Cannot outdent an item without its children"))
;; Normal shifting
(t
(let* ((new-parents
(let* ((old-struct (copy-tree struct))
(new-parents
(if (< arg 0)
(org-list-struct-outdent beg end struct parents)
(org-list-struct-indent beg end struct parents prevs))))
(org-list-write-struct struct new-parents))
(org-list-write-struct struct new-parents old-struct))
(org-update-checkbox-count-maybe))))))
t)

View File

@ -596,15 +596,6 @@ Optional argument REGEXP selects variables to clone."
(or (null regexp) (string-match-p regexp (symbol-name name))))
(ignore-errors (set (make-local-variable name) value)))))))
;;; Logic
(defsubst org-xor (a b)
"Exclusive `or'."
(if a (not b) b))
;;; Miscellaneous
@ -1081,7 +1072,7 @@ nil, just return 0."
((numberp s) s)
((stringp s)
(condition-case nil
(float-time (apply #'encode-time (org-parse-time-string s)))
(float-time (org-time-string-to-time s))
(error 0)))
(t 0)))

View File

@ -486,7 +486,7 @@ agenda view showing the flagged items."
(concat (shell-quote-argument org-mobile-checksum-binary)
" "
(shell-quote-argument (expand-file-name file)))))
(when (string-match "[a-fA-F0-9]\\{30,40\\}" check)
(when (string-match "[[:xdigit:]]\\{30,40\\}" check)
(push (cons link-name (match-string 0 check))
org-mobile-checksum-files))))
@ -775,7 +775,7 @@ If nothing new has been added, return nil."
(buffer (find-file-noselect file)))
(when buffer
(with-current-buffer buffer
(when (re-search-forward (concat "\\([0-9a-fA-F]\\{30,\\}\\).*?"
(when (re-search-forward (concat "\\([[:xdigit:]]\\{30,\\}\\).*?"
(regexp-quote org-mobile-capture-file)
"[ \t]*$") nil t)
(goto-char (match-beginning 1))

View File

@ -155,7 +155,7 @@ table, obtained by prompting the user."
:type 'string)
(defcustom org-table-number-regexp
"^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$"
"^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$"
"Regular expression for recognizing numbers in table columns.
If a table column contains mostly numbers, it will be aligned to the
right. If not, it will be aligned to the left.
@ -180,9 +180,9 @@ Other options offered by the customize interface are more restrictive."
(const :tag "Exponential, Floating point, Integer"
"^[-+]?[0-9.]+\\([eEdD][-+0-9]+\\)?$")
(const :tag "Very General Number-Like, including hex and Calc radix"
"^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
"^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
(const :tag "Very General Number-Like, including hex and Calc radix, allows comma as decimal mark"
"^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
"^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
(string :tag "Regexp:")))
(defcustom org-table-number-fraction 0.5
@ -1081,6 +1081,7 @@ Before doing so, re-align the table if necessary."
(org-table-align))
(let ((col (org-table-current-column)))
(beginning-of-line 2)
(unless (bolp) (insert "\n")) ;missing newline at eob
(when (or (not (org-at-table-p))
(org-at-table-hline-p))
(beginning-of-line 0)
@ -3189,7 +3190,7 @@ ARGS are passed as arguments to the `message' function. Returns
current time if a message is printed, otherwise returns T1. If
T1 is nil, always messages."
(let ((curtime (current-time)))
(if (or (not t1) (< 0 (nth 1 (time-subtract curtime t1))))
(if (or (not t1) (org-time-less-p 1 (org-time-subtract curtime t1)))
(progn (apply 'message args)
curtime)
t1)))
@ -3355,8 +3356,7 @@ existing formula for column %s"
(user-error
"Missing columns in the table. Aborting"))))))
(org-table-eval-formula nil formula t t t t)))
;; Clean up markers and internal text property.
(remove-text-properties (point-min) (point-max) '(:org-untouchable t))
;; Clean up marker.
(set-marker end nil)))
(unless noalign
(when org-table-may-need-update (org-table-align))

View File

@ -139,9 +139,7 @@ the region 0:00:00."
(format "Restart timer with offset [%s]: " def)))
(unless (string-match "\\S-" s) (setq s def))
(setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s)))))
(setq org-timer-start-time
(seconds-to-time
(- (float-time) delta))))
(setq org-timer-start-time (org-time-since delta)))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(message "Timer start time set to %s, current value is %s"
@ -160,19 +158,14 @@ With prefix arg STOP, stop it entirely."
(org-timer-pause-time
(let ((start-secs (float-time org-timer-start-time))
(pause-secs (float-time org-timer-pause-time)))
;; Note: We pass the result of `current-time' to `time-add' and
;; `float-time' below so that we can easily override the value
;; in tests.
(if org-timer-countdown-timer
(let ((new-secs (- start-secs pause-secs)))
(setq org-timer-countdown-timer
(org-timer--run-countdown-timer
new-secs org-timer-countdown-timer-title))
(setq org-timer-start-time
(time-add (current-time) (seconds-to-time new-secs))))
(setq org-timer-start-time (org-time-add nil new-secs)))
(setq org-timer-start-time
(seconds-to-time (- (float-time)
(- pause-secs start-secs)))))
(org-time-since (- pause-secs start-secs))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(run-hooks 'org-timer-continue-hook)
@ -386,16 +379,15 @@ VALUE can be `on', `off', or `paused'."
(defun org-timer-show-remaining-time ()
"Display the remaining time before the timer ends."
(interactive)
(require 'time)
(if (not org-timer-countdown-timer)
(message "No timer set")
(let* ((rtime (decode-time
(time-subtract (timer--time org-timer-countdown-timer)
(current-time))))
(rsecs (nth 0 rtime))
(rmins (nth 1 rtime)))
(message "%d minute(s) %d seconds left before next time out"
rmins rsecs))))
(message
(if (not org-timer-countdown-timer)
"No timer set"
(format-seconds
"%m minute(s) %s seconds left before next time out"
;; Note: Once our minimal require is Emacs 27, we can drop this
;; org-time-convert-to-integer call.
(org-time-convert-to-integer
(org-time-subtract (timer--time org-timer-countdown-timer) nil))))))
;;;###autoload
(defun org-timer-set-timer (&optional opt)
@ -454,10 +446,7 @@ using three `C-u' prefix arguments."
(org-timer--run-countdown-timer
secs org-timer-countdown-timer-title))
(run-hooks 'org-timer-set-hook)
;; Pass `current-time' result to `time-add' (instead of nil)
;; for for Emacs 24 compatibility.
(setq org-timer-start-time
(time-add (current-time) (seconds-to-time secs)))
(setq org-timer-start-time (org-time-add nil secs))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on))))))

View File

@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: https://orgmode.org
;; Version: 9.2.3
;; Version: 9.2.6
;;
;; This file is part of GNU Emacs.
;;
@ -5636,22 +5636,20 @@ When ROUNDING-MINUTES is not an integer, fall back on the car of
the rounding returns a past time."
(let ((r (or (and (integerp rounding-minutes) rounding-minutes)
(car org-time-stamp-rounding-minutes)))
(time (decode-time)) res)
(now (current-time)))
(if (< r 1)
(current-time)
(setq res
(apply 'encode-time
(append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r)))))
(nthcdr 2 time))))
(if (and past (< (float-time (time-subtract (current-time) res)) 0))
(seconds-to-time (- (float-time res) (* r 60)))
res))))
now
(let* ((time (decode-time now))
(res (apply #'encode-time 0 (* r (round (nth 1 time) r))
(nthcdr 2 time))))
(if (or (not past) (org-time-less-p res now))
res
(org-time-subtract res (* r 60)))))))
(defun org-today ()
"Return today date, considering `org-extend-today-until'."
(time-to-days
(time-subtract (current-time)
(list 0 (* 3600 org-extend-today-until) 0))))
(org-time-since (* 3600 org-extend-today-until))))
;;;; Font-Lock stuff, including the activators
@ -9340,9 +9338,7 @@ non-nil."
(setq link
(format-time-string
(car org-time-stamp-formats)
(apply 'encode-time
(list 0 0 0 (nth 1 cd) (nth 0 cd) (nth 2 cd)
nil nil nil))))
(encode-time 0 0 0 (nth 1 cd) (nth 0 cd) (nth 2 cd))))
(org-store-link-props :type "calendar" :date cd)))
((eq major-mode 'help-mode)
@ -12871,7 +12867,7 @@ This function is run automatically after each state change to a DONE state."
(let ((nshiftmax 10)
(nshift 0))
(while (or (= nshift 0)
(not (time-less-p (current-time) time)))
(not (org-time-less-p nil time)))
(when (= nshiftmax (cl-incf nshift))
(or (y-or-n-p
(format "%d repeater intervals were not \
@ -13044,7 +13040,7 @@ for calling org-schedule with, or if there is no scheduling,
returns nil."
(let ((time (org-entry-get pom "SCHEDULED" inherit)))
(when time
(apply 'encode-time (org-parse-time-string time)))))
(org-time-string-to-time time))))
(defun org-get-deadline-time (pom &optional inherit)
"Get the deadline as a time tuple, of a format suitable for
@ -13052,7 +13048,7 @@ calling org-deadline with, or if there is no scheduling, returns
nil."
(let ((time (org-entry-get pom "DEADLINE" inherit)))
(when time
(apply 'encode-time (org-parse-time-string time)))))
(org-time-string-to-time time))))
(defun org-remove-timestamp-with-keyword (keyword)
"Remove all time stamps with KEYWORD in the current entry."
@ -13111,7 +13107,7 @@ WHAT entry will also be removed."
org-deadline-time-regexp)
end t)
(setq ts (match-string 1)
default-time (apply 'encode-time (org-parse-time-string ts))
default-time (org-time-string-to-time ts)
default-input (and ts (org-get-compact-tod ts)))))))
(when what
(setq time
@ -16048,8 +16044,7 @@ non-nil."
((org-at-timestamp-p 'lax) (match-string 0))))
;; Default time is either the timestamp at point or today.
;; When entering a range, only the range start is considered.
(default-time (and ts
(apply #'encode-time (org-parse-time-string ts))))
(default-time (and ts (org-time-string-to-time ts)))
(default-input (and ts (org-get-compact-tod ts)))
(repeater (and ts
(string-match "\\([.+-]+[0-9]+[hdwmy] ?\\)+" ts)
@ -16369,13 +16364,14 @@ user."
"range representable on this machine"))
(ding))
;; One round trip to get rid of 34th of August and stuff like that....
(setq final (decode-time (apply 'encode-time final)))
(setq final (apply #'encode-time final))
(setq org-read-date-final-answer ans)
(if to-time
(apply 'encode-time final)
final
;; This round-trip gets rid of 34th of August and stuff like that....
(setq final (decode-time final))
(if (and (boundp 'org-time-was-given) org-time-was-given)
(format "%04d-%02d-%02d %02d:%02d"
(nth 5 final) (nth 4 final) (nth 3 final)
@ -16405,7 +16401,7 @@ user."
(and (boundp 'org-time-was-given) org-time-was-given))
(cdr fmts)
(car fmts)))
(txt (format-time-string fmt (apply 'encode-time f)))
(txt (format-time-string fmt (apply #'encode-time f)))
(txt (if org-read-date-inactive (concat "[" (substring txt 1 -1) "]") txt))
(txt (concat "=> " txt)))
(when (and org-end-time-was-given
@ -17056,7 +17052,7 @@ signaled."
(daynr (org-closest-date s daynr prefer))
(t (time-to-days
(condition-case errdata
(apply #'encode-time (org-parse-time-string s))
(org-time-string-to-time s)
(error (error "Bad timestamp `%s'%s\nError was: %s"
s
(if (not (and buffer pos)) ""
@ -17154,12 +17150,12 @@ stamp stay unchanged. In any case, return value is an absolute
day number."
(if (not (string-match "\\+\\([0-9]+\\)\\([hdwmy]\\)" start))
;; No repeater. Do not shift time stamp.
(time-to-days (apply #'encode-time (org-parse-time-string start)))
(time-to-days (org-time-string-to-time start))
(let ((value (string-to-number (match-string 1 start)))
(type (match-string 2 start)))
(if (= 0 value)
;; Repeater with a 0-value is considered as void.
(time-to-days (apply #'encode-time (org-parse-time-string start)))
(time-to-days (org-time-string-to-time start))
(let* ((base (org-date-to-gregorian start))
(target (org-date-to-gregorian current))
(sday (calendar-absolute-from-gregorian base))
@ -22600,13 +22596,12 @@ return an active timestamp."
"Convert TIMESTAMP object into an Emacs internal time value.
Use end of date range or time range when END is non-nil.
Otherwise, use its start."
(apply #'encode-time
(cons 0
(mapcar
(lambda (prop) (or (org-element-property prop timestamp) 0))
(if end '(:minute-end :hour-end :day-end :month-end :year-end)
'(:minute-start :hour-start :day-start :month-start
:year-start))))))
(apply #'encode-time 0
(mapcar
(lambda (prop) (or (org-element-property prop timestamp) 0))
(if end '(:minute-end :hour-end :day-end :month-end :year-end)
'(:minute-start :hour-start :day-start :month-start
:year-start)))))
(defun org-timestamp-has-time-p (timestamp)
"Non-nil when TIMESTAMP has a time specified."

View File

@ -159,7 +159,6 @@
(defconst org-latex-babel-language-alist
'(("af" . "afrikaans")
("bg" . "bulgarian")
("bt-br" . "brazilian")
("ca" . "catalan")
("cs" . "czech")
("cy" . "welsh")
@ -195,6 +194,7 @@
("no" . "norsk")
("pl" . "polish")
("pt" . "portuguese")
("pt-br" . "brazilian")
("ro" . "romanian")
("ru" . "russian")
("sa" . "sanskrit")

View File

@ -2919,56 +2919,47 @@ returned by the function."
'(entity bold italic latex-environment latex-fragment strike-through
subscript superscript underline)
(lambda (datum)
(let ((new
(cl-case (org-element-type datum)
;; ... entities...
(entity
(and (not (plist-get info :with-entities))
(list (concat
(org-export-expand datum nil)
(make-string
(or (org-element-property :post-blank datum) 0)
?\s)))))
;; ... emphasis...
((bold italic strike-through underline)
(and (not (plist-get info :with-emphasize))
(let ((marker (cl-case (org-element-type datum)
(bold "*")
(italic "/")
(strike-through "+")
(underline "_"))))
(append
(list marker)
(org-element-contents datum)
(list (concat
marker
(make-string
(or (org-element-property :post-blank datum)
0)
?\s)))))))
;; ... LaTeX environments and fragments...
((latex-environment latex-fragment)
(and (eq (plist-get info :with-latex) 'verbatim)
(list (org-export-expand datum nil))))
;; ... sub/superscripts...
((subscript superscript)
(let ((sub/super-p (plist-get info :with-sub-superscript))
(bracketp (org-element-property :use-brackets-p datum)))
(and (or (not sub/super-p)
(and (eq sub/super-p '{}) (not bracketp)))
(append
(list (concat
(if (eq (org-element-type datum) 'subscript)
"_"
"^")
(and bracketp "{")))
(org-element-contents datum)
(list (concat
(and bracketp "}")
(and (org-element-property :post-blank datum)
(make-string
(org-element-property :post-blank datum)
?\s)))))))))))
(let* ((type (org-element-type datum))
(post-blank
(pcase (org-element-property :post-blank datum)
(`nil nil)
(n (make-string n (if (eq type 'latex-environment) ?\n ?\s)))))
(new
(cl-case type
;; ... entities...
(entity
(and (not (plist-get info :with-entities))
(list (concat (org-export-expand datum nil)
post-blank))))
;; ... emphasis...
((bold italic strike-through underline)
(and (not (plist-get info :with-emphasize))
(let ((marker (cl-case type
(bold "*")
(italic "/")
(strike-through "+")
(underline "_"))))
(append
(list marker)
(org-element-contents datum)
(list (concat marker post-blank))))))
;; ... LaTeX environments and fragments...
((latex-environment latex-fragment)
(and (eq (plist-get info :with-latex) 'verbatim)
(list (concat (org-export-expand datum nil)
post-blank))))
;; ... sub/superscripts...
((subscript superscript)
(let ((sub/super-p (plist-get info :with-sub-superscript))
(bracketp (org-element-property :use-brackets-p datum)))
(and (or (not sub/super-p)
(and (eq sub/super-p '{}) (not bracketp)))
(append
(list (concat (if (eq type 'subscript) "_" "^")
(and bracketp "{")))
(org-element-contents datum)
(list (concat (and bracketp "}")
post-blank)))))))))
(when new
;; Splice NEW at DATUM location in parse tree.
(dolist (e new (org-element-extract-element datum))
@ -4917,7 +4908,7 @@ same column as TABLE-CELL, or nil."
table)))
(width-vector (or (gethash table cache)
(puthash table (make-vector columns 'empty) cache))))
;; Table may not have the same number of rows. Extend
;; Table rows may not have the same number of cells. Extend
;; WIDTH-VECTOR appropriately if we encounter a row larger than
;; expected.
(when (>= column (length width-vector))
@ -4966,6 +4957,15 @@ Possible values are `left', `right' and `center'."
table)))
(align-vector (or (gethash table cache)
(puthash table (make-vector columns nil) cache))))
;; Table rows may not have the same number of cells. Extend
;; ALIGN-VECTOR appropriately if we encounter a row larger than
;; expected.
(when (>= column (length align-vector))
(setq align-vector
(vconcat align-vector
(make-list (- (1+ column) (length align-vector))
nil)))
(puthash table align-vector cache))
(or (aref align-vector column)
(let ((number-cells 0)
(total-cells 0)

View File

@ -847,6 +847,15 @@ Paragraph <2012-03-29 Thu>[2012-03-29 Thu]"
(paragraph . (lambda (p c i) c))
(section . (lambda (s c i) c))))
nil nil nil '(:with-latex verbatim)))))
(should
(equal "$1$ \n"
(org-test-with-temp-text "$1$ "
(org-export-as
(org-export-create-backend
:transcoders '((latex-fragment . (lambda (l c i) "dummy"))
(paragraph . (lambda (p c i) c))
(section . (lambda (s c i) c))))
nil nil nil '(:with-latex verbatim)))))
;; Sub/superscript.
(should
(equal "adummy\n"