Skip to content

Commit

Permalink
tweak(org): print the right file name when exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 9, 2023
1 parent e71564a commit e55d3d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/extras/me-org-extras.el
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,18 @@ Example: \"#+TITLE\" -> \"#+title\"
(advice-add
'org-latex-export-to-pdf :around
(defun +org--latex-export-to-pdf-main-file-a (orig-fn &rest orig-args)
(let* ((main-file (or (bound-and-true-p +org-export-to-pdf-main-file) "main.org"))
(let* ((main-file (or +org-export-to-pdf-main-file "main.org"))
(main-file-exists-p (file-exists-p (expand-file-name main-file)))
(out-file
(if (file-exists-p (expand-file-name main-file))
(if main-file-exists-p
(with-current-buffer (find-file-noselect main-file)
(apply orig-fn orig-args))
(apply orig-fn orig-args))))
(if org-export-in-background
(progn
(message "Started exporting \"%s\" asynchronously."
(abbreviate-file-name
(file-name-nondirectory main-file)))
(file-name-nondirectory (if main-file-exists-p main-file (buffer-file-name)))))
(when-let ((org-export-process (get-process "org-export-process")))
(set-process-sentinel
org-export-process
Expand Down

0 comments on commit e55d3d6

Please sign in to comment.