Merge branch 'maint'

This commit is contained in:
Kyle Meyer 2021-03-21 13:41:39 -04:00
commit c1fa5ea76f
3 changed files with 28 additions and 3 deletions

View File

@ -216,8 +216,11 @@ this template."
(delete-region begin end)
(insert replacement)))))
((or `babel-call `inline-babel-call)
(org-babel-exp-do-export (org-babel-lob-get-info element)
'lob)
(org-babel-exp-do-export
(or (org-babel-lob-get-info element)
(user-error "Unknown Babel reference: %s"
(org-element-property :call element)))
'lob)
(let ((rep
(org-fill-template
org-babel-exp-call-line-template

View File

@ -8768,7 +8768,21 @@ If the file does not exist, throw an error."
(save-window-excursion
(message "Running %s...done" cmd)
(start-process-shell-command cmd nil cmd)
;; Handlers such as "gio open" and kde-open5 start viewer in background
;; and exit immediately. Avoid `start-process' since it assumes
;; :connection-type 'pty and kills children processes with SIGHUP
;; when temporary terminal session is finished.
(make-process
:name "org-open-file" :connection-type 'pipe :noquery t
:buffer nil ; use "*Messages*" for debugging
:sentinel (lambda (proc event)
(when (and (memq (process-status proc) '(exit signal))
(/= (process-exit-status proc) 0))
(message
"Command %s: %s."
(mapconcat #'identity (process-command proc) " ")
(substring event 0 -1))))
:command (list shell-file-name shell-command-switch cmd))
(and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))))
((or (stringp cmd)
(eq cmd 'emacs))

View File

@ -585,6 +585,14 @@ src_emacs-lisp{(+ 1 1)}"
(org-babel-exp-process-buffer))
(buffer-string)))))
(ert-deftest ob-exp/unknown-call-reference ()
"Test exporting with a call that references an unknown name."
(should-error
(org-test-with-temp-text
"call_foo()"
(let ((org-export-use-babel t))
(org-babel-exp-process-buffer)))
:type 'user-error))
(provide 'test-ob-exp)