1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Update to Org 9.6-61-g63e073f

This commit is contained in:
Kyle Meyer 2022-12-25 11:36:36 -05:00
parent dad73e4de1
commit b1e68a33d8
8 changed files with 72 additions and 30 deletions

View File

@ -2464,7 +2464,11 @@ INFO may provide the values of these header arguments (in the
(cons 'unordered
(mapcar
(lambda (e)
(list (if (stringp e) e (format "%S" e))))
(cond
((stringp e) (list e))
((listp e)
(mapcar (lambda (x) (format "%S" x)) e))
(t (list (format "%S" e)))))
(if (listp result) result
(split-string result "\n" t))))
'(:splicep nil :istart "- " :iend "\n")))
@ -3183,8 +3187,8 @@ situations in which is it not appropriate."
(if (and (memq (string-to-char cell) '(?\( ?`))
(not (org-babel-confirm-evaluate
;; See `org-babel-get-src-block-info'.
(list "emacs-lisp" (format "%S" cell)
'((:eval . yes)) nil (format "%S" cell)
(list "emacs-lisp" cell
'((:eval . yes)) nil (format "%s" cell)
nil nil))))
;; Not allowed.
(user-error "Evaluation of elisp code %S aborted." cell)

View File

@ -500,7 +500,8 @@ The PARAMS are the 3rd element of the info for the same src block."
(cl-letf (((symbol-function 'org-store-link-functions)
(lambda () nil)))
(org-store-link nil))))
(bare (and (string-match org-link-bracket-re l)
(bare (and l
(string-match org-link-bracket-re l)
(match-string 1 l))))
(when bare
(if (and org-babel-tangle-use-relative-file-links

View File

@ -162,17 +162,17 @@ Return a hash table with citation references as keys and fields alist as values.
(puthash (cdr (assq 'id item))
(mapcar (pcase-lambda (`(,field . ,value))
(pcase field
('author
;; Author is an array of objects, each
;; of them designing a person. These
;; objects may contain multiple
;; properties, but for this basic
;; processor, we'll focus on `given' and
;; `family'.
((or 'author 'editors)
;; Author and editors are arrays of
;; objects, each of them designing a
;; person. These objects may contain
;; multiple properties, but for this
;; basic processor, we'll focus on
;; `given' and `family'.
;;
;; For compatibility with BibTeX, add
;; "and" between authors.
(cons 'author
;; "and" between authors and editors.
(cons field
(mapconcat
(lambda (alist)
(concat (alist-get 'family alist)

View File

@ -1365,7 +1365,16 @@ Assume point is at beginning of the inline task."
(priority (and (looking-at "\\[#.\\][ \t]*")
(progn (goto-char (match-end 0))
(aref (match-string 0) 2))))
(title-start (point))
(commentedp
(and (let ((case-fold-search nil))
(looking-at org-element-comment-string))
(goto-char (match-end 0))
(when (looking-at-p "\\(?:[ \t]\\|$\\)")
(point))))
(title-start (prog1 (point)
(unless (or todo priority commentedp)
;; Headline like "* :tag:"
(skip-chars-backward " \t"))))
(tags (when (re-search-forward
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position)
@ -1375,6 +1384,7 @@ Assume point is at beginning of the inline task."
(title-end (point))
(raw-value (org-trim
(buffer-substring-no-properties title-start title-end)))
(archivedp (member org-element-archive-tag tags))
(task-end (save-excursion
(end-of-line)
(and (re-search-forward org-element-headline-re limit t)
@ -1410,7 +1420,9 @@ Assume point is at beginning of the inline task."
:todo-keyword todo
:todo-type todo-type
:post-blank (1- (count-lines (or task-end begin) end))
:post-affiliated begin)
:post-affiliated begin
:archivedp archivedp
:commentedp commentedp)
time-props
standard-props))))
(org-element-put-property

View File

@ -874,15 +874,21 @@ When IGNORE-RETURN is non-nil, just return t on success without calling
When ASSOCIATED is non-nil, only save the matching data."
(unless org-persist--index (org-persist--load-index))
(setq associated (org-persist--normalize-associated associated))
(unless
(if
(and (equal 1 (length org-persist--index))
;; The single collection only contains a single container
;; in the container list.
(equal 1 (length (plist-get (car org-persist--index) :container)))
;; The container is an `index' container.
(eq 'index (caar (plist-get (car org-persist--index) :container)))
;; No `org-persist-directory' exists yet.
(not (file-exists-p org-persist-directory)))
(or (not (file-exists-p org-persist-directory))
(org-directory-empty-p org-persist-directory)))
;; Do not write anything, and clear up `org-persist-directory' to reduce
;; clutter.
(when (and (file-exists-p org-persist-directory)
(org-directory-empty-p org-persist-directory))
(delete-directory org-persist-directory))
;; Write the data.
(let (all-containers)
(dolist (collection org-persist--index)
(if associated
@ -963,6 +969,30 @@ Also, remove containers associated with non-existing files."
(push collection new-index)))))
(setq org-persist--index (nreverse new-index))))
(defun org-persist-clear-storage-maybe ()
"Clear `org-persist-directory' according to `org-persist--disable-when-emacs-Q'.
When `org-persist--disable-when-emacs-Q' is non-nil and Emacs is called with -Q
command line argument, `org-persist-directory' is created in potentially public
system temporary directory. Remove everything upon existing Emacs in
such scenario."
(when (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file)
(file-exists-p org-persist-directory))
(delete-directory org-persist-directory 'recursive)))
;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
(when (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(setq org-persist-directory
(make-temp-file "org-persist-" 'dir)))
;; Automatically write the data, but only when we have write access.
(let ((dir (directory-file-name
(file-name-as-directory org-persist-directory))))
@ -972,20 +1002,12 @@ Also, remove containers associated with non-existing files."
(if (not (file-writable-p dir))
(message "Missing write access rights to org-persist-directory: %S"
org-persist-directory)
(add-hook 'kill-emacs-hook #'org-persist-clear-storage-maybe) ; Run last.
(add-hook 'kill-emacs-hook #'org-persist-write-all)
;; `org-persist-gc' should run before `org-persist-write-all'.
;; So we are adding the hook after `org-persist-write-all'.
(add-hook 'kill-emacs-hook #'org-persist-gc)))
;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
(if (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(setq org-persist-directory
(make-temp-file "org-persist-" 'dir)))
(add-hook 'after-init-hook #'org-persist-load-all)
(provide 'org-persist)

View File

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.6-49-g47d129"))
(let ((org-git-version "release_9.6-61-g63e073f"))
org-git-version))
(provide 'org-version)

View File

@ -20213,7 +20213,10 @@ interactive command with similar behavior."
(defun org-back-to-heading (&optional invisible-ok)
"Go back to beginning of heading."
(beginning-of-line)
(or (org-at-heading-p (not invisible-ok))
(or (and (org-at-heading-p (not invisible-ok))
(not (and (featurep 'org-inlinetask)
(fboundp 'org-inlinetask-end-p)
(org-inlinetask-end-p))))
(if (org-element--cache-active-p)
(let ((heading (org-element-lineage (org-element-at-point)
'(headline inlinetask)

View File

@ -3337,7 +3337,7 @@ INFO is a plist holding contextual information. See
((org-html-standalone-image-p destination info)
(org-export-get-ordinal
(org-element-map destination 'link #'identity info t)
info 'link 'org-html-standalone-image-p))
info '(link) 'org-html-standalone-image-p))
(t (org-export-get-ordinal
destination info nil counter-predicate))))
(desc