Update to Org 9.6-31-g954a95
This commit is contained in:
parent
26a8644a58
commit
0115416605
14 changed files with 141 additions and 88 deletions
|
@ -1401,7 +1401,7 @@ you, configure the option ~org-table-auto-blank-field~.
|
||||||
- {{{kbd(M-x org-table-blank-field)}}} ::
|
- {{{kbd(M-x org-table-blank-field)}}} ::
|
||||||
|
|
||||||
#+findex: org-table-blank-field
|
#+findex: org-table-blank-field
|
||||||
Blank the field at point.
|
Blank the current table field or active region.
|
||||||
|
|
||||||
- {{{kbd(S-TAB)}}} (~org-table-previous-field~) ::
|
- {{{kbd(S-TAB)}}} (~org-table-previous-field~) ::
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,14 @@ or user `keyboard-quit' during execution of body."
|
||||||
(goto-char (process-mark (get-buffer-process (current-buffer))))
|
(goto-char (process-mark (get-buffer-process (current-buffer))))
|
||||||
(insert dangling-text)
|
(insert dangling-text)
|
||||||
|
|
||||||
|
;; Replace partially supplied input lines.
|
||||||
|
;; This is needed when output filter spits partial lines that
|
||||||
|
;; do not include a full prompt at a time.
|
||||||
|
(setq string-buffer
|
||||||
|
(replace-regexp-in-string
|
||||||
|
comint-prompt-regexp
|
||||||
|
,org-babel-comint-prompt-separator
|
||||||
|
string-buffer))
|
||||||
;; remove echo'd FULL-BODY from input
|
;; remove echo'd FULL-BODY from input
|
||||||
(when (and ,remove-echo ,full-body
|
(when (and ,remove-echo ,full-body
|
||||||
(string-match
|
(string-match
|
||||||
|
|
|
@ -2709,7 +2709,9 @@ specified as an an \"attachment:\" style link."
|
||||||
((and 'attachment (guard in-attach-dir)) "attachment")
|
((and 'attachment (guard in-attach-dir)) "attachment")
|
||||||
(_ "file"))
|
(_ "file"))
|
||||||
(if (and request-attachment in-attach-dir)
|
(if (and request-attachment in-attach-dir)
|
||||||
(file-relative-name result-file-name)
|
(file-relative-name
|
||||||
|
result-file-name
|
||||||
|
(file-name-as-directory attach-dir))
|
||||||
(if (and default-directory
|
(if (and default-directory
|
||||||
base-file-name same-directory?)
|
base-file-name same-directory?)
|
||||||
(if (eq org-link-file-path-type 'adaptive)
|
(if (eq org-link-file-path-type 'adaptive)
|
||||||
|
|
|
@ -1488,9 +1488,9 @@ If the link is in hidden text, expose it."
|
||||||
|
|
||||||
(defun org-link-descriptive-ensure ()
|
(defun org-link-descriptive-ensure ()
|
||||||
"Toggle the literal or descriptive display of links in current buffer if needed."
|
"Toggle the literal or descriptive display of links in current buffer if needed."
|
||||||
(if org-link-descriptive
|
(org-fold-core-set-folding-spec-property
|
||||||
(org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil)
|
(car org-link--link-folding-spec)
|
||||||
(org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)))
|
:visible (not org-link-descriptive)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-toggle-link-display ()
|
(defun org-toggle-link-display ()
|
||||||
|
|
|
@ -3049,6 +3049,7 @@ PROPERTIES: The list properties specified in the `:properties' parameter
|
||||||
"If this is a CLOCK line, update it and return t.
|
"If this is a CLOCK line, update it and return t.
|
||||||
Otherwise, return nil."
|
Otherwise, return nil."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(let ((origin (point))) ;; `save-excursion' may not work when deleting.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line 1)
|
(beginning-of-line 1)
|
||||||
(skip-chars-forward " \t")
|
(skip-chars-forward " \t")
|
||||||
|
@ -3095,7 +3096,11 @@ Otherwise, return nil."
|
||||||
m (floor (/ s 60))
|
m (floor (/ s 60))
|
||||||
s (- s (* 60 s)))
|
s (- s (* 60 s)))
|
||||||
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
|
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
|
||||||
t))))))
|
t)))))
|
||||||
|
;; Move back to initial position, but never beyond updated
|
||||||
|
;; clock.
|
||||||
|
(unless (< (point) origin)
|
||||||
|
(goto-char origin))))
|
||||||
|
|
||||||
(defun org-clock-save ()
|
(defun org-clock-save ()
|
||||||
"Persist various clock-related data to disk.
|
"Persist various clock-related data to disk.
|
||||||
|
|
|
@ -5717,7 +5717,11 @@ This function assumes `org-element--headline-cache' is a valid AVL tree."
|
||||||
;; `combine-change-calls' because the buffer is potentially
|
;; `combine-change-calls' because the buffer is potentially
|
||||||
;; changed without notice (the change will be registered
|
;; changed without notice (the change will be registered
|
||||||
;; after exiting the `combine-change-calls' body though).
|
;; after exiting the `combine-change-calls' body though).
|
||||||
(memq #'org-element--cache-after-change after-change-functions))))))
|
(catch :inhibited
|
||||||
|
(org-fold-core-cycle-over-indirect-buffers
|
||||||
|
(unless (memq #'org-element--cache-after-change after-change-functions)
|
||||||
|
(throw :inhibited nil)))
|
||||||
|
t))))))
|
||||||
|
|
||||||
;; FIXME: Remove after we establish that hashing is effective.
|
;; FIXME: Remove after we establish that hashing is effective.
|
||||||
(defun org-element-cache-hash-show-statistics ()
|
(defun org-element-cache-hash-show-statistics ()
|
||||||
|
|
|
@ -497,7 +497,7 @@ hanging around."
|
||||||
(declare (debug (form body)) (indent 0))
|
(declare (debug (form body)) (indent 0))
|
||||||
`(let (buffers dead-properties)
|
`(let (buffers dead-properties)
|
||||||
(if (and (not (buffer-base-buffer))
|
(if (and (not (buffer-base-buffer))
|
||||||
(not (eq (current-buffer) (car org-fold-core--indirect-buffers))))
|
(not (memq (current-buffer) org-fold-core--indirect-buffers)))
|
||||||
;; We are in base buffer with `org-fold-core--indirect-buffers' value from
|
;; We are in base buffer with `org-fold-core--indirect-buffers' value from
|
||||||
;; different buffer. This can happen, for example, when
|
;; different buffer. This can happen, for example, when
|
||||||
;; org-capture copies local variables into *Capture* buffer.
|
;; org-capture copies local variables into *Capture* buffer.
|
||||||
|
@ -930,6 +930,8 @@ are provided.
|
||||||
|
|
||||||
If FROM is non-nil and TO is nil, search the folded regions at FROM.
|
If FROM is non-nil and TO is nil, search the folded regions at FROM.
|
||||||
|
|
||||||
|
When both FROM and TO are nil, search folded regions in the whole buffer.
|
||||||
|
|
||||||
When SPECS is non-nil it should be a list of folding specs or a symbol.
|
When SPECS is non-nil it should be a list of folding specs or a symbol.
|
||||||
Only return the matching fold types.
|
Only return the matching fold types.
|
||||||
|
|
||||||
|
@ -946,6 +948,9 @@ WITH-MARKERS must be nil when RELATIVE is non-nil."
|
||||||
(unless (listp specs) (setq specs (list specs)))
|
(unless (listp specs) (setq specs (list specs)))
|
||||||
(let (regions region mk-region)
|
(let (regions region mk-region)
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
|
(when (and (not from) (not to))
|
||||||
|
(setq from (point-min)
|
||||||
|
to (point-max)))
|
||||||
(when (and from (not to)) (setq to (point-max)))
|
(when (and from (not to)) (setq to (point-max)))
|
||||||
(when (and from (< from (point-min))) (setq from (point-min)))
|
(when (and from (< from (point-min))) (setq from (point-min)))
|
||||||
(when (and to (> to (point-max))) (setq to (point-max)))
|
(when (and to (> to (point-max))) (setq to (point-max)))
|
||||||
|
@ -1058,7 +1063,7 @@ means that the buffer should stay alive during the operation,
|
||||||
because otherwise all these markers will point to nowhere."
|
because otherwise all these markers will point to nowhere."
|
||||||
(declare (debug (form body)) (indent 1))
|
(declare (debug (form body)) (indent 1))
|
||||||
(org-with-gensyms (regions)
|
(org-with-gensyms (regions)
|
||||||
`(let* ((,regions ,(org-fold-core-get-regions :with-markers use-markers)))
|
`(let* ((,regions (org-fold-core-get-regions :with-markers ,use-markers)))
|
||||||
(unwind-protect (progn ,@body)
|
(unwind-protect (progn ,@body)
|
||||||
(org-fold-core-regions ,regions :override t :clean-markers t)))))
|
(org-fold-core-regions ,regions :override t :clean-markers t)))))
|
||||||
|
|
||||||
|
|
|
@ -851,9 +851,12 @@ to `org-footnote-section'. Inline definitions are ignored."
|
||||||
(format "[fn:%s] DEFINITION NOT FOUND." label))
|
(format "[fn:%s] DEFINITION NOT FOUND." label))
|
||||||
"\n"))))
|
"\n"))))
|
||||||
;; Insert un-referenced footnote definitions at the end.
|
;; Insert un-referenced footnote definitions at the end.
|
||||||
|
;; Combine all insertions into one to create a single cache
|
||||||
|
;; update call.
|
||||||
|
(combine-change-calls (point) (point)
|
||||||
(pcase-dolist (`(,label . ,definition) definitions)
|
(pcase-dolist (`(,label . ,definition) definitions)
|
||||||
(unless (member label inserted)
|
(unless (member label inserted)
|
||||||
(insert "\n" definition "\n")))))))))
|
(insert "\n" definition "\n"))))))))))
|
||||||
|
|
||||||
(defun org-footnote-normalize ()
|
(defun org-footnote-normalize ()
|
||||||
"Turn every footnote in buffer into a numbered one."
|
"Turn every footnote in buffer into a numbered one."
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
||||||
|
|
||||||
|
|
||||||
(defconst org-persist--storage-version "2.5"
|
(defconst org-persist--storage-version "2.7"
|
||||||
"Persistent storage layout version.")
|
"Persistent storage layout version.")
|
||||||
|
|
||||||
(defgroup org-persist nil
|
(defgroup org-persist nil
|
||||||
|
@ -856,9 +856,16 @@ When IGNORE-RETURN is non-nil, just return t on success without calling
|
||||||
(setq associated (org-persist--normalize-associated (get-file-buffer (plist-get associated :file)))))
|
(setq associated (org-persist--normalize-associated (get-file-buffer (plist-get associated :file)))))
|
||||||
(let ((collection (org-persist--get-collection container associated)))
|
(let ((collection (org-persist--get-collection container associated)))
|
||||||
(setf collection (plist-put collection :associated associated))
|
(setf collection (plist-put collection :associated associated))
|
||||||
(unless (seq-find (lambda (v)
|
(unless (or
|
||||||
|
;; Prevent data leakage from encrypted files.
|
||||||
|
;; We do it in somewhat paranoid manner and do not
|
||||||
|
;; allow anything related to encrypted files to be
|
||||||
|
;; written.
|
||||||
|
(and (plist-get associated :file)
|
||||||
|
(string-match-p epa-file-name-regexp (plist-get associated :file)))
|
||||||
|
(seq-find (lambda (v)
|
||||||
(run-hook-with-args-until-success 'org-persist-before-write-hook v associated))
|
(run-hook-with-args-until-success 'org-persist-before-write-hook v associated))
|
||||||
(plist-get collection :container))
|
(plist-get collection :container)))
|
||||||
(when (or (file-exists-p org-persist-directory) (org-persist--save-index))
|
(when (or (file-exists-p org-persist-directory) (org-persist--save-index))
|
||||||
(let ((file (org-file-name-concat org-persist-directory (plist-get collection :persist-file)))
|
(let ((file (org-file-name-concat org-persist-directory (plist-get collection :persist-file)))
|
||||||
(data (mapcar (lambda (c) (cons c (org-persist-write:generic c collection)))
|
(data (mapcar (lambda (c) (cons c (org-persist-write:generic c collection)))
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
(require 'org-macs)
|
(require 'org-macs)
|
||||||
(require 'org-compat)
|
(require 'org-compat)
|
||||||
(require 'org-keys)
|
(require 'org-keys)
|
||||||
|
(require 'org-fold-core)
|
||||||
|
|
||||||
(declare-function calc-eval "calc" (str &optional separator &rest args))
|
(declare-function calc-eval "calc" (str &optional separator &rest args))
|
||||||
(declare-function face-remap-remove-relative "face-remap" (cookie))
|
(declare-function face-remap-remove-relative "face-remap" (cookie))
|
||||||
|
@ -4448,6 +4449,13 @@ FIELD is a string. WIDTH is a number. ALIGN is either \"c\",
|
||||||
(defun org-table-justify-field-maybe (&optional new)
|
(defun org-table-justify-field-maybe (&optional new)
|
||||||
"Justify the current field, text to left, number to right.
|
"Justify the current field, text to left, number to right.
|
||||||
Optional argument NEW may specify text to replace the current field content."
|
Optional argument NEW may specify text to replace the current field content."
|
||||||
|
;; FIXME: Prevent newlines inside field. They are currently not
|
||||||
|
;; supported.
|
||||||
|
(when (and (stringp new) (string-match-p "\n" new))
|
||||||
|
(message "Removing newlines from formula result: %S" new)
|
||||||
|
(setq new (replace-regexp-in-string
|
||||||
|
"\n" " "
|
||||||
|
(replace-regexp-in-string "\\(^\n+\\)\\|\\(\n+$\\)" "" new))))
|
||||||
(cond
|
(cond
|
||||||
((and (not new) org-table-may-need-update)) ; Realignment will happen anyway
|
((and (not new) org-table-may-need-update)) ; Realignment will happen anyway
|
||||||
((org-at-table-hline-p))
|
((org-at-table-hline-p))
|
||||||
|
@ -5721,6 +5729,7 @@ This may be either a string or a function of two arguments:
|
||||||
;; Initialize communication channel in INFO.
|
;; Initialize communication channel in INFO.
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let ((org-inhibit-startup t)) (org-mode))
|
(let ((org-inhibit-startup t)) (org-mode))
|
||||||
|
(org-fold-core-ignore-modifications
|
||||||
(let ((standard-output (current-buffer))
|
(let ((standard-output (current-buffer))
|
||||||
(org-element-use-cache nil))
|
(org-element-use-cache nil))
|
||||||
(dolist (e table)
|
(dolist (e table)
|
||||||
|
@ -5743,9 +5752,9 @@ This may be either a string or a function of two arguments:
|
||||||
(plist-get info :filter-parse-tree)
|
(plist-get info :filter-parse-tree)
|
||||||
(org-element-map (org-element-parse-buffer) 'table
|
(org-element-map (org-element-parse-buffer) 'table
|
||||||
#'identity nil t)
|
#'identity nil t)
|
||||||
info)))
|
info))
|
||||||
(when (and backend (symbolp backend) (not (org-export-get-backend backend)))
|
(when (and backend (symbolp backend) (not (org-export-get-backend backend)))
|
||||||
(user-error "Unknown :backend value"))
|
(user-error "Unknown :backend value"))))
|
||||||
(when (or (not backend) (plist-get info :raw)) (require 'ox-org))
|
(when (or (not backend) (plist-get info :raw)) (require 'ox-org))
|
||||||
;; Handle :skip parameter.
|
;; Handle :skip parameter.
|
||||||
(let ((skip (plist-get info :skip)))
|
(let ((skip (plist-get info :skip)))
|
||||||
|
|
|
@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
|
||||||
(defun org-git-version ()
|
(defun org-git-version ()
|
||||||
"The Git version of Org mode.
|
"The Git version of Org mode.
|
||||||
Inserted by installing Org or when a release is made."
|
Inserted by installing Org or when a release is made."
|
||||||
(let ((org-git-version "release_9.6-3-ga4d38e"))
|
(let ((org-git-version "release_9.6-31-g954a95"))
|
||||||
org-git-version))
|
org-git-version))
|
||||||
|
|
||||||
(provide 'org-version)
|
(provide 'org-version)
|
||||||
|
|
|
@ -11380,7 +11380,7 @@ See also `org-scan-tags'."
|
||||||
(pv (match-string 7 term))
|
(pv (match-string 7 term))
|
||||||
(regexp (eq (string-to-char pv) ?{))
|
(regexp (eq (string-to-char pv) ?{))
|
||||||
(strp (eq (string-to-char pv) ?\"))
|
(strp (eq (string-to-char pv) ?\"))
|
||||||
(timep (string-match-p "^\"[[<][0-9]+.*[]>]\"$" pv))
|
(timep (string-match-p "^\"[[<]\\(?:[0-9]+\\|now\\|today\\|tomorrow\\|[+-][0-9]+[dmwy]\\).*[]>]\"$" pv))
|
||||||
(po (org-op-to-function (match-string 6 term)
|
(po (org-op-to-function (match-string 6 term)
|
||||||
(if timep 'time strp))))
|
(if timep 'time strp))))
|
||||||
(setq pv (if (or regexp strp) (substring pv 1 -1) pv))
|
(setq pv (if (or regexp strp) (substring pv 1 -1) pv))
|
||||||
|
@ -16322,6 +16322,10 @@ buffer boundaries with possible narrowing."
|
||||||
(org-element-property :end link))
|
(org-element-property :end link))
|
||||||
(skip-chars-backward " \t")
|
(skip-chars-backward " \t")
|
||||||
(point)))))
|
(point)))))
|
||||||
|
;; FIXME: See bug#59902. We cannot rely
|
||||||
|
;; on Emacs to update image if the file
|
||||||
|
;; has changed.
|
||||||
|
(image-flush image)
|
||||||
(overlay-put ov 'display image)
|
(overlay-put ov 'display image)
|
||||||
(overlay-put ov 'face 'default)
|
(overlay-put ov 'face 'default)
|
||||||
(overlay-put ov 'org-image-overlay t)
|
(overlay-put ov 'org-image-overlay t)
|
||||||
|
|
|
@ -87,7 +87,8 @@ included into another document or application that reserves top-level
|
||||||
headings for its own use."
|
headings for its own use."
|
||||||
:group 'org-export-md
|
:group 'org-export-md
|
||||||
:package-version '(Org . "9.6")
|
:package-version '(Org . "9.6")
|
||||||
:type 'natnum)
|
;; Avoid `natnum' because that's not available until Emacs 28.1.
|
||||||
|
:type 'integer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3036,6 +3036,11 @@ Return code as a string."
|
||||||
(org-narrow-to-subtree)
|
(org-narrow-to-subtree)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(org-end-of-meta-data)
|
(org-end-of-meta-data)
|
||||||
|
;; Make the region include top heading in the subtree.
|
||||||
|
;; This way, we will be able to retrieve its export
|
||||||
|
;; options when calling
|
||||||
|
;; `org-export--get-subtree-options'.
|
||||||
|
(backward-char)
|
||||||
(narrow-to-region (point) (point-max))))
|
(narrow-to-region (point) (point-max))))
|
||||||
;; Initialize communication channel with original buffer
|
;; Initialize communication channel with original buffer
|
||||||
;; attributes, unavailable in its copy.
|
;; attributes, unavailable in its copy.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue