* export to txt files
@ 2008-03-17 15:56 Dimitris Kapetanakis
2008-03-17 16:23 ` Sebastian
2008-03-17 17:40 ` Phil Jackson
0 siblings, 2 replies; 7+ messages in thread
From: Dimitris Kapetanakis @ 2008-03-17 15:56 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]
Hello All,
I wanted to ask if there is a way to export an org file as individual txt
files depending on level 1 hierarchy. For example if you have a file like
* Projects
bla bla text etcetc
* Procedures
bla bla text etcetc
to output two files projects.txt which contains bla bla text etcetc and
another procedures.txt with its text.
I think it would be useful for blogs and other applications, and looking at
export functions like ascii or latex, it could certainly be done but I am
not so fluent in emacs lisp to do it myself. Any help welcome.
Dimitris
[-- Attachment #1.2: Type: text/html, Size: 636 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
2008-03-17 15:56 export to txt files Dimitris Kapetanakis
@ 2008-03-17 16:23 ` Sebastian
2008-03-17 17:40 ` Phil Jackson
1 sibling, 0 replies; 7+ messages in thread
From: Sebastian @ 2008-03-17 16:23 UTC (permalink / raw)
To: Dimitris Kapetanakis; +Cc: emacs-orgmode
Dimitris Kapetanakis schrieb:
> Hello All,
> I wanted to ask if there is a way to export an org file as individual
> txt files depending on level 1 hierarchy. For example if you have a
> file like
>
> * Projects
> bla bla text etcetc
>
> * Procedures
> bla bla text etcetc
>
> to output two files projects.txt which contains bla bla text etcetc
> and another procedures.txt with its text.
>
> I think it would be useful for blogs and other applications, and
> looking at export functions like ascii or latex, it could certainly be
> done but I am not so fluent in emacs lisp to do it myself. Any help
> welcome.
> Dimitris
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
>
Just mark a region and press
C-c C-e RET a RET
will export the region as ascii (I use the git head).
Regards,
Sebastian
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sebastian Rose Fachinformatiker/Anwendendungsentwickler
Viktoriastaße 22
30451 Hannover Entwicklung von Internetanwendungen und
Programmen mit freien Werkzeugen und
Bibliotheken.
sebastian_rose@gmx.de PHP, Java, C/C++, Bash, Perl, Apache,
MySQL, PostgreSQL, xt::commerce, Typo3,
+49 173 / 83 93 417 Server, Netzwerk, Desktop, Datenbank.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
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
1 sibling, 1 reply; 7+ messages in thread
From: Phil Jackson @ 2008-03-17 17:40 UTC (permalink / raw)
To: Dimitris Kapetanakis; +Cc: emacs-orgmode
"Dimitris Kapetanakis" <katepano@gmail.com> writes:
> Hello All,
> I wanted to ask if there is a way to export an org file as individual txt
> files depending on level 1 hierarchy. For example if you have a file like
>
> * Projects
> bla bla text etcetc
>
> * Procedures
> bla bla text etcetc
>
> to output two files projects.txt which contains bla bla text etcetc and
> another procedures.txt with its text.
10 points to someone who can do this with just a keyboard macro. 15 if
you can make sure the heading is filesystem safe :)
Cheers,
Phil
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
2008-03-17 17:40 ` Phil Jackson
@ 2008-03-17 19:43 ` Daniel Clemente
2008-03-17 19:50 ` Hugo Schmitt
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Clemente @ 2008-03-17 19:43 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode, Dimitris Kapetanakis
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 :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
2008-03-17 19:43 ` Daniel Clemente
@ 2008-03-17 19:50 ` Hugo Schmitt
2008-03-18 5:02 ` Dimitris Kapetanakis
0 siblings, 1 reply; 7+ messages in thread
From: Hugo Schmitt @ 2008-03-17 19:50 UTC (permalink / raw)
To: Daniel Clemente; +Cc: emacs-orgmode, Dimitris Kapetanakis
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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
2008-03-17 19:50 ` Hugo Schmitt
@ 2008-03-18 5:02 ` Dimitris Kapetanakis
2008-03-18 7:28 ` Dimitris Kapetanakis
0 siblings, 1 reply; 7+ messages in thread
From: Dimitris Kapetanakis @ 2008-03-18 5:02 UTC (permalink / raw)
To: Hugo Schmitt; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]
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: 2282 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: export to txt files
2008-03-18 5:02 ` Dimitris Kapetanakis
@ 2008-03-18 7:28 ` Dimitris Kapetanakis
0 siblings, 0 replies; 7+ messages in thread
From: Dimitris Kapetanakis @ 2008-03-18 7:28 UTC (permalink / raw)
To: Hugo Schmitt; +Cc: emacs-orgmode
[-- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-18 7:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).