emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Dimitris Kapetanakis" <katepano@gmail.com>
To: Hugo Schmitt <hugows@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: export to txt files
Date: Tue, 18 Mar 2008 09:28:44 +0200	[thread overview]
Message-ID: <2a6300ea0803180028v3bf5ec50if889185fd7baa782@mail.gmail.com> (raw)
In-Reply-To: <2a6300ea0803172202h2d43dc90t671c6013778da22b@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1913 bytes --]

I think I did it!!!

just make a backward search

Check the following

(defun org-export-top-levels ()
 (interactive)
 (goto-char (point-max))
 (let (start (point))
       (while (re-search-backward "^* " nil t)
         (write-region start (point-at-bol) (concat (org-get-heading)
".txt"))
         (setq start (point-at-bol)))))



2008/3/18, Dimitris Kapetanakis <katepano@gmail.com>:
>
> THANKS EVERYBODY
>
> I was looking at something like Hugo's response. It is a click away since
> it saves under a "heading.txt" the next heading's text. I am trying to
> take a look at it with my poor knowledge of Lisp.
>
> 2008/3/17, Hugo Schmitt <hugows@gmail.com>:
> >
> > Hm, I guess I sent this only to Dimitri... I'm resending it to the
> > list..
> >
> > This seems to do what you want.
> >
> >
> > (defun org-export-top-levels ()
> >   (interactive)
> >   (goto-char (point-min))
> >   (let (start (point))
> >        (while (re-search-forward "^* " nil t)
> >          (write-region start (point-at-bol) (concat (org-get-heading)
> > ".txt"))
> >          (setq start (point-at-bol)))))
> >
> > Regards,
> > Hugo
> >
> >
> > On Mon, Mar 17, 2008 at 4:43 PM, Daniel Clemente <n142857@gmail.com>
> > wrote:
> > >
> > >   Mmmm... I wrote a program which can do this:
> > >   http://www.danielclemente.com/dislines/index.en.html
> > >
> > >   however it's not LISP.
> > >   I have written multilingual org files this way, but it's not
> > comfortable since it requires several programs and processing phases. I am
> > still looking for a solution in Emacs LISP, and if possible, one which
> > integrates nicely with org-mode :-)
> > >
> > >
> > >
> > >
> > >
> >
> > >  _______________________________________________
> > >  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
> > >
> >
>
>

[-- Attachment #1.2: Type: text/html, Size: 3525 bytes --]

[-- Attachment #2: 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-03-18  7:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 15:56 export to txt files Dimitris Kapetanakis
2008-03-17 16:23 ` Sebastian
2008-03-17 17:40 ` Phil Jackson
2008-03-17 19:43   ` Daniel Clemente
2008-03-17 19:50     ` Hugo Schmitt
2008-03-18  5:02       ` Dimitris Kapetanakis
2008-03-18  7:28         ` Dimitris Kapetanakis [this message]

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=2a6300ea0803180028v3bf5ec50if889185fd7baa782@mail.gmail.com \
    --to=katepano@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hugows@gmail.com \
    /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).