emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] make `org-export-as-org' respect the to-buffer 'string option
@ 2010-04-09  0:34 Eric Schulte
  2010-04-09 11:31 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Schulte @ 2010-04-09  0:34 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 19 bytes --]

see below -- Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-export-as-org-respects-to-buffer-string.patch --]
[-- Type: text/x-diff, Size: 895 bytes --]

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 ()

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] make `org-export-as-org' respect the to-buffer 'string option
  2010-04-09  0:34 [PATCH] make `org-export-as-org' respect the to-buffer 'string option Eric Schulte
@ 2010-04-09 11:31 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2010-04-09 11:31 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Again, please go ahead.

- Carsten

On Apr 9, 2010, at 2:34 AM, Eric Schulte wrote:

> see below -- Eric
>
> 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 ()
> _______________________________________________
> 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

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-09 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09  0:34 [PATCH] make `org-export-as-org' respect the to-buffer 'string option Eric Schulte
2010-04-09 11:31 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).