1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

org-bibtex: Fix type error in non-file buffers

* lisp/org-bibtex.el (org-bibtex): Fix type error in cases where the
  buffer is not visiting a file.  In an indirect buffer, use the file
  name for the base buffer.
This commit is contained in:
Kyle Meyer 2016-01-13 00:18:42 -05:00
parent abb9a0f88a
commit 4eccbce9dc

View File

@ -555,8 +555,10 @@ Headlines are exported using `org-bibtex-headline'."
(interactive
(list (read-file-name
"Bibtex file: " nil nil nil
(file-name-nondirectory
(concat (file-name-sans-extension (buffer-file-name)) ".bib")))))
(let ((file (buffer-file-name (buffer-base-buffer))))
(and file
(file-name-nondirectory
(concat (file-name-sans-extension file) ".bib")))))))
(let ((error-point
(catch 'bib
(let ((bibtex-entries