emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thomas Fuchs <tfox@gmx.de>
To: emacs-orgmode@gnu.org
Subject: Patch for Plain Text Export
Date: Sun, 24 Aug 2008 20:01:22 +0200	[thread overview]
Message-ID: <18609.41458.945143.398656@gargle.gargle.HOWL> (raw)

[-- 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

             reply	other threads:[~2008-08-24 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-24 18:01 Thomas Fuchs [this message]
2008-09-02 11:46 ` Patch for Plain Text Export Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18609.41458.945143.398656@gargle.gargle.HOWL \
    --to=tfox@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).