mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 21:32:53 +00:00
oc-basic: Display ?? in place of missing citations on export
* lisp/oc-basic.el (org-cite-basic--format-author-year): (org-cite-basic-export-citation): Display "????" for missing year and "??" for missing other fields. Reported-by: Ihor Radchenko <yantar92@posteo.net> Link: https://orgmode.org/list/871qr6kiuv.fsf@localhost
This commit is contained in:
parent
b2adb68afa
commit
fbd08a0d9b
|
@ -580,8 +580,8 @@ INFO is the export state, as a property list."
|
||||||
(suffix (org-element-property :suffix ref)))
|
(suffix (org-element-property :suffix ref)))
|
||||||
(funcall format-ref
|
(funcall format-ref
|
||||||
prefix
|
prefix
|
||||||
(org-cite-basic--get-author k info)
|
(or (org-cite-basic--get-author k info) "??")
|
||||||
(org-cite-basic--get-year k info)
|
(or (org-cite-basic--get-year k info) "????")
|
||||||
suffix)))
|
suffix)))
|
||||||
(org-cite-get-references citation)
|
(org-cite-get-references citation)
|
||||||
org-cite-basic-author-year-separator)
|
org-cite-basic-author-year-separator)
|
||||||
|
@ -652,15 +652,17 @@ export communication channel, as a property list."
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(mapconcat
|
(mapconcat
|
||||||
(lambda (key)
|
(lambda (key)
|
||||||
(let ((author (org-cite-basic--get-author key info)))
|
(or
|
||||||
(if caps (capitalize author) author)))
|
(let ((author (org-cite-basic--get-author key info)))
|
||||||
|
(if caps (capitalize author) author))
|
||||||
|
"??"))
|
||||||
(org-cite-get-references citation t)
|
(org-cite-get-references citation t)
|
||||||
org-cite-basic-author-year-separator)
|
org-cite-basic-author-year-separator)
|
||||||
info)))
|
info)))
|
||||||
;; "noauthor" style.
|
;; "noauthor" style.
|
||||||
(`(,(or "noauthor" "na") . ,variant)
|
(`(,(or "noauthor" "na") . ,variant)
|
||||||
(format (if (funcall has-variant-p variant 'bare) "%s" "(%s)")
|
(format (if (funcall has-variant-p variant 'bare) "%s" "(%s)")
|
||||||
(mapconcat (lambda (key) (org-cite-basic--get-year key info))
|
(mapconcat (lambda (key) (or (org-cite-basic--get-year key info) "????"))
|
||||||
(org-cite-get-references citation t)
|
(org-cite-get-references citation t)
|
||||||
org-cite-basic-author-year-separator)))
|
org-cite-basic-author-year-separator)))
|
||||||
;; "nocite" style.
|
;; "nocite" style.
|
||||||
|
|
Loading…
Reference in a new issue