From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: [PATCH] make `org-export-as-org' respect the to-buffer 'string option Date: Thu, 08 Apr 2010 18:34:36 -0600 Message-ID: <87eiipqx9f.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O02BT-00025J-VW for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 20:34:56 -0400 Received: from [140.186.70.92] (port=40058 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O02BS-000253-Ry for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 20:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O02BR-0007Xv-IN for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 20:34:54 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:57364) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O02BR-0007Xo-Cc for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 20:34:53 -0400 Received: by pwi2 with SMTP id 2so3089002pwi.0 for ; Thu, 08 Apr 2010 17:34:51 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= see below -- Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-export-as-org-respects-to-buffer-string.patch diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 6d576dc..5a0b22b 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2490,7 +2490,8 @@ directory." filename))) (backup-inhibited t) (buffer (find-file-noselect filename)) - (region (buffer-string))) + (region (buffer-string)) + str-ret) (save-excursion (switch-to-buffer buffer) (erase-buffer) @@ -2536,7 +2537,11 @@ directory." (write-file (concat filename ".html"))) (kill-buffer newbuf))) (set-buffer-modified-p nil) - (kill-buffer (current-buffer))))) + (if (equal to-buffer 'string) + (progn (setq str-ret (buffer-string)) + (kill-buffer (current-buffer)) + str-ret) + (kill-buffer (current-buffer)))))) (defvar org-archive-location) ;; gets loaded with the org-archive require. (defun org-get-current-options () --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--