mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-25 19:11:56 +00:00
Update to Org 9.5-57-g9bc3a2
This commit is contained in:
parent
1dfe9d6285
commit
ac6ac76e3a
@ -98,6 +98,15 @@ latest stable version of Org should be compatible with Emacs 28.x,
|
|||||||
|
|
||||||
See [[https://orgmode.org/worg/org-maintenance.html#emacs-compatibility][this note on Worg]] and [[git::519947e508e081e71bf67db99e27b1c171ba4dfe][this commit]].
|
See [[https://orgmode.org/worg/org-maintenance.html#emacs-compatibility][this note on Worg]] and [[git::519947e508e081e71bf67db99e27b1c171ba4dfe][this commit]].
|
||||||
|
|
||||||
|
*** The keybinding for ~org-table-blank-field~ has been removed
|
||||||
|
|
||||||
|
If you prefer to keep the keybinding, you can add it back to
|
||||||
|
~org-mode-map~ like so:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(define-key org-mode-map (kbd "C-c SPC") #'org-table-blank-field)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** New features
|
** New features
|
||||||
|
|
||||||
*** New citation engine
|
*** New citation engine
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
(require 'bibtex)
|
(require 'bibtex)
|
||||||
(require 'json)
|
(require 'json)
|
||||||
(require 'oc)
|
(require 'oc)
|
||||||
(require 'org)
|
|
||||||
(require 'seq)
|
(require 'seq)
|
||||||
|
|
||||||
(declare-function org-open-at-point "org" (&optional arg))
|
(declare-function org-open-at-point "org" (&optional arg))
|
||||||
|
@ -213,8 +213,8 @@ PROPS is the local properties of the bibliography, as a property list."
|
|||||||
|
|
||||||
(defun org-cite-biblatex-export-citation (citation style _ info)
|
(defun org-cite-biblatex-export-citation (citation style _ info)
|
||||||
"Export CITATION object.
|
"Export CITATION object.
|
||||||
STYLE is the citation style, as a string or nil. INFO is the export state, as
|
STYLE is the citation style, as a pair of either strings or nil.
|
||||||
a property list."
|
INFO is the export state, as a property list."
|
||||||
(apply
|
(apply
|
||||||
#'org-cite-biblatex--command citation info
|
#'org-cite-biblatex--command citation info
|
||||||
(pcase style
|
(pcase style
|
||||||
|
@ -248,11 +248,11 @@ If nil then the Chicago author-date style is used as a fallback.")
|
|||||||
("paras." . "paragraph")
|
("paras." . "paragraph")
|
||||||
("¶" . "paragraph")
|
("¶" . "paragraph")
|
||||||
("¶¶" . "paragraph")
|
("¶¶" . "paragraph")
|
||||||
("§" . "paragraph")
|
|
||||||
("§§" . "paragraph")
|
|
||||||
("part" . "part")
|
("part" . "part")
|
||||||
("pt." . "part")
|
("pt." . "part")
|
||||||
("pts." . "part")
|
("pts." . "part")
|
||||||
|
("§" . "section")
|
||||||
|
("§§" . "section")
|
||||||
("section" . "section")
|
("section" . "section")
|
||||||
("sec." . "section")
|
("sec." . "section")
|
||||||
("secs." . "section")
|
("secs." . "section")
|
||||||
@ -270,11 +270,12 @@ If nil then the Chicago author-date style is used as a fallback.")
|
|||||||
(defconst org-cite-csl--label-regexp
|
(defconst org-cite-csl--label-regexp
|
||||||
;; Prior to Emacs-27.1 argument of `regexp' form must be a string literal.
|
;; Prior to Emacs-27.1 argument of `regexp' form must be a string literal.
|
||||||
;; It is the reason why `rx' is avoided here.
|
;; It is the reason why `rx' is avoided here.
|
||||||
(rx-to-string `(seq word-start
|
(rx-to-string
|
||||||
(regexp ,(regexp-opt (mapcar #'car org-cite-csl--label-alist) t))
|
`(seq (or line-start space)
|
||||||
(0+ digit)
|
(regexp ,(regexp-opt (mapcar #'car org-cite-csl--label-alist) t))
|
||||||
(or word-start line-end (any ?\s ?\t)))
|
(0+ digit)
|
||||||
t)
|
(or word-end line-end space " "))
|
||||||
|
t)
|
||||||
"Regexp matching a label in a citation reference suffix.
|
"Regexp matching a label in a citation reference suffix.
|
||||||
Label is in match group 1.")
|
Label is in match group 1.")
|
||||||
|
|
||||||
@ -371,7 +372,7 @@ or raise an error if the variable is unset."
|
|||||||
((and (guard org-cite-csl-styles-dir) file)
|
((and (guard org-cite-csl-styles-dir) file)
|
||||||
(expand-file-name file org-cite-csl-styles-dir))
|
(expand-file-name file org-cite-csl-styles-dir))
|
||||||
(other
|
(other
|
||||||
(user-error "Cannot handle relative style file name" other))))
|
(user-error "Cannot handle relative style file name: %S" other))))
|
||||||
|
|
||||||
(defun org-cite-csl--locale-getter ()
|
(defun org-cite-csl--locale-getter ()
|
||||||
"Return a locale getter.
|
"Return a locale getter.
|
||||||
@ -425,7 +426,9 @@ The result is a association list. Keys are: `id', `prefix',`suffix',
|
|||||||
((re-search-forward org-cite-csl--label-regexp nil t)
|
((re-search-forward org-cite-csl--label-regexp nil t)
|
||||||
(setq location-start (match-beginning 0))
|
(setq location-start (match-beginning 0))
|
||||||
(setq label (cdr (assoc (match-string 1) org-cite-csl--label-alist)))
|
(setq label (cdr (assoc (match-string 1) org-cite-csl--label-alist)))
|
||||||
(setq locator-start (match-end 1)))
|
(goto-char (match-end 1))
|
||||||
|
(skip-chars-forward "[:space:] ")
|
||||||
|
(setq locator-start (point)))
|
||||||
((re-search-forward (rx digit) nil t)
|
((re-search-forward (rx digit) nil t)
|
||||||
(setq location-start (match-beginning 0))
|
(setq location-start (match-beginning 0))
|
||||||
(setq label "page")
|
(setq label "page")
|
||||||
|
@ -789,6 +789,20 @@ Citations are ordered by appearance in the document, when following footnotes.
|
|||||||
INFO is the export communication channel, as a property list."
|
INFO is the export communication channel, as a property list."
|
||||||
(or (plist-get info :citations)
|
(or (plist-get info :citations)
|
||||||
(letrec ((cites nil)
|
(letrec ((cites nil)
|
||||||
|
(tree (plist-get info :parse-tree))
|
||||||
|
(find-definition
|
||||||
|
;; Find definition for standard reference LABEL. At
|
||||||
|
;; this point, it is impossible to rely on
|
||||||
|
;; `org-export-get-footnote-definition' because the
|
||||||
|
;; function caches results that could contain
|
||||||
|
;; un-processed citation objects. So we use
|
||||||
|
;; a simplified version of the function above.
|
||||||
|
(lambda (label)
|
||||||
|
(org-element-map tree 'footnote-definition
|
||||||
|
(lambda (d)
|
||||||
|
(and (equal label (org-element-property :label d))
|
||||||
|
(or (org-element-contents d) "")))
|
||||||
|
info t)))
|
||||||
(search-cites
|
(search-cites
|
||||||
(lambda (data)
|
(lambda (data)
|
||||||
(org-element-map data '(citation footnote-reference)
|
(org-element-map data '(citation footnote-reference)
|
||||||
@ -798,22 +812,13 @@ INFO is the export communication channel, as a property list."
|
|||||||
;; Do not force entering inline definitions, since
|
;; Do not force entering inline definitions, since
|
||||||
;; `org-element-map' is going to enter it anyway.
|
;; `org-element-map' is going to enter it anyway.
|
||||||
((guard (eq 'inline (org-element-property :type datum))))
|
((guard (eq 'inline (org-element-property :type datum))))
|
||||||
;; Find definition for current standard
|
;; Walk footnote definition.
|
||||||
;; footnote reference. Unlike to
|
|
||||||
;; `org-export-get-footnote-definition', do
|
|
||||||
;; not cache results as they would contain
|
|
||||||
;; un-processed citation objects.
|
|
||||||
(_
|
(_
|
||||||
(let ((label (org-element-property :label datum)))
|
(let ((label (org-element-property :label datum)))
|
||||||
(funcall
|
(funcall search-cites
|
||||||
search-cites
|
(funcall find-definition label))))))
|
||||||
(org-element-map data 'footnote-definition
|
|
||||||
(lambda (d)
|
|
||||||
(and
|
|
||||||
(equal label (org-element-property :label d))
|
|
||||||
(or (org-element-contents d) "")))))))))
|
|
||||||
info nil 'footnote-definition t))))
|
info nil 'footnote-definition t))))
|
||||||
(funcall search-cites (plist-get info :parse-tree))
|
(funcall search-cites tree)
|
||||||
(let ((result (nreverse cites)))
|
(let ((result (nreverse cites)))
|
||||||
(plist-put info :citations result)
|
(plist-put info :citations result)
|
||||||
result))))
|
result))))
|
||||||
@ -1593,8 +1598,9 @@ The generated function inserts or edit a citation at point. More specifically,
|
|||||||
(concat "/" style)
|
(concat "/" style)
|
||||||
""))
|
""))
|
||||||
"")
|
"")
|
||||||
(mapconcat (lambda (k) (concat "@" k)) keys ";"))))))))
|
(mapconcat (lambda (k) (concat "@" k)) keys "; "))))))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun org-cite-insert (arg)
|
(defun org-cite-insert (arg)
|
||||||
"Insert a citation at point.
|
"Insert a citation at point.
|
||||||
Insertion is done according to the processor set in `org-cite-insert-processor'.
|
Insertion is done according to the processor set in `org-cite-insert-processor'.
|
||||||
@ -1603,7 +1609,7 @@ ARG is the prefix argument received when calling interactively the function."
|
|||||||
(let ((name org-cite-insert-processor))
|
(let ((name org-cite-insert-processor))
|
||||||
(cond
|
(cond
|
||||||
((null name)
|
((null name)
|
||||||
(user-error "No processor set to follow citations"))
|
(user-error "No processor set to insert citations"))
|
||||||
((not (org-cite--get-processor name))
|
((not (org-cite--get-processor name))
|
||||||
(user-error "Unknown processor %S" name))
|
(user-error "Unknown processor %S" name))
|
||||||
((not (org-cite-processor-has-capability-p name 'insert))
|
((not (org-cite-processor-has-capability-p name 'insert))
|
||||||
|
@ -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.5-46-gb71474"))
|
(let ((org-git-version "release_9.5-57-g9bc3a2"))
|
||||||
org-git-version))
|
org-git-version))
|
||||||
|
|
||||||
(provide 'org-version)
|
(provide 'org-version)
|
||||||
|
@ -95,6 +95,7 @@
|
|||||||
(require 'org-keys)
|
(require 'org-keys)
|
||||||
(require 'ol)
|
(require 'ol)
|
||||||
(require 'oc)
|
(require 'oc)
|
||||||
|
(require 'oc-basic)
|
||||||
(require 'org-table)
|
(require 'org-table)
|
||||||
|
|
||||||
;; `org-outline-regexp' ought to be a defconst but is let-bound in
|
;; `org-outline-regexp' ought to be a defconst but is let-bound in
|
||||||
|
Loading…
Reference in New Issue
Block a user