all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Patch for Plain Text Export
@ 2008-08-24 18:01 Thomas Fuchs
  2008-09-02 11:46 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Fuchs @ 2008-08-24 18:01 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 353 bytes --]


Hi,

I detected, that using org-store-agenda-views to export my views
to *.txt in plain text results in files growing and growing because
the new views are appended.

In my understanding this is not the intended behavior. Every new
export should replace the previous one.

I attached a very simple patch to correct this.


Yours sincerly
Thomas Fuchs


[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 348 bytes --]

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 33c2a39..1654498 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1879,6 +1879,7 @@ higher priority settings."
 	  (t
 	   (let ((bs (buffer-string)))
 	     (find-file file)
+	     (erase-buffer)
 	     (insert bs)
 	     (save-buffer 0)
 	     (kill-buffer (current-buffer))

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

_______________________________________________
Emacs-orgmode mailing list
Remember: 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

end of thread, other threads:[~2008-09-02 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24 18:01 Patch for Plain Text Export Thomas Fuchs
2008-09-02 11:46 ` Carsten Dominik

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.