diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-11-03 00:25:13 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-11-03 00:25:13 +0100 |
commit | 3d1ae7b7f2592fac95072882be08aa1ffd798531 (patch) | |
tree | 6d2c9597d52a5e7799919689649e94683b3086f1 | |
parent | 5d4243bcccd8a3193099129c76985d7b867112e5 (diff) | |
download | org-mode-3d1ae7b7f2592fac95072882be08aa1ffd798531.tar.gz |
org-export: Do not push empty strings to kill ring
* contrib/lisp/org-export.el (org-export-as): Do not push empty
strings to kill ring.
-rw-r--r-- | contrib/lisp/org-export.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index f1965e7..210cdd9 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -2651,7 +2651,8 @@ Return code as a string." info (org-export-collect-tree-properties tree info))) ;; Eventually transcode TREE. Wrap the resulting string into ;; a template, if required. Finally call final-output filter. - (let* ((body (org-element-normalize-string (org-export-data tree info))) + (let* ((body (org-element-normalize-string + (or (org-export-data tree info) ""))) (template (cdr (assq 'template (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions @@ -2660,7 +2661,8 @@ Return code as a string." (funcall template body info)) info))) ;; Maybe add final OUTPUT to kill ring, then return it. - (when org-export-copy-to-kill-ring (org-kill-new output)) + (when (and org-export-copy-to-kill-ring (org-string-nw-p output)) + (org-kill-new output)) output))))) (defun org-export-to-buffer |