From 66c72c809b636085ee77a1af7bc7a7112b9202c3 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 25 Mar 2010 08:36:37 +0100 Subject: [PATCH] ASCII export: Allow to export buffers without a file name --- lisp/ChangeLog | 3 +++ lisp/org-ascii.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2fc3488a..4c76cc0c1 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-03-25 Carsten Dominik + * org-ascii.el (org-export-as-ascii): Catch the case of exporting + a buffer with no file name attached. + * org.el (org-log-refile): New option. (org-log-note-headings): Add a heading for refiling. (org-startup-options): Add keywords for logging of the refile diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index 6c395b378..c8f3e2c43 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -227,8 +227,10 @@ publishing directory." (and (not (plist-get opt-plist :skip-before-1st-heading)) (org-export-grab-title-from-buffer)) - (file-name-sans-extension - (file-name-nondirectory bfname)))) + (and (buffer-file-name) + (file-name-sans-extension + (file-name-nondirectory bfname))) + "UNTITLED")) (email (plist-get opt-plist :email)) (language (plist-get opt-plist :language)) (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) -- 2.11.4.GIT