* A Babel block to #+INCLUDE all .org files of a directory
@ 2014-08-30 15:50 Andrea Rossetti
2014-08-30 16:14 ` Grant Rettke
2014-09-01 21:09 ` Andrea Rossetti
0 siblings, 2 replies; 5+ messages in thread
From: Andrea Rossetti @ 2014-08-30 15:50 UTC (permalink / raw)
To: emacs-orgmode; +Cc: mehul.sanghvi
Hi Org users,
I wrote a Babel block to generate the #+INCLUDE statements
for all Org files of a directory.
Nothing spectacular: not recursive through directories,
only .org files ... but I wanted to share it, just in case
someone finds it helpful. Source code and usage example
are available here:
https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-all-org-files
(GitHub renders Org files as html, so be sure to click the "Raw" button
in order to see #+BEGIN_SRC, #+END_SRC and #+COMMENTS)
Opinions, corrections and enhancements are of course
more than welcome. Kindest regards,
Andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A Babel block to #+INCLUDE all .org files of a directory
2014-08-30 15:50 A Babel block to #+INCLUDE all .org files of a directory Andrea Rossetti
@ 2014-08-30 16:14 ` Grant Rettke
2014-08-30 20:39 ` Andrea Rossetti
2014-09-01 21:09 ` Andrea Rossetti
1 sibling, 1 reply; 5+ messages in thread
From: Grant Rettke @ 2014-08-30 16:14 UTC (permalink / raw)
To: Andrea Rossetti; +Cc: emacs-orgmode@gnu.org, mehul.sanghvi
May you please discuss your use case that motivated this code?
Grant Rettke | ACM, ASA, FSF
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Sat, Aug 30, 2014 at 10:50 AM, Andrea Rossetti
<andrea.rossetti@gmail.com> wrote:
> Hi Org users,
>
> I wrote a Babel block to generate the #+INCLUDE statements
> for all Org files of a directory.
>
> Nothing spectacular: not recursive through directories,
> only .org files ... but I wanted to share it, just in case
> someone finds it helpful. Source code and usage example
> are available here:
>
> https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-all-org-files
>
> (GitHub renders Org files as html, so be sure to click the "Raw" button
> in order to see #+BEGIN_SRC, #+END_SRC and #+COMMENTS)
>
> Opinions, corrections and enhancements are of course
> more than welcome. Kindest regards,
>
> Andrea
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A Babel block to #+INCLUDE all .org files of a directory
2014-08-30 16:14 ` Grant Rettke
@ 2014-08-30 20:39 ` Andrea Rossetti
2014-08-30 21:31 ` Andrea Rossetti
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Rossetti @ 2014-08-30 20:39 UTC (permalink / raw)
To: Grant Rettke; +Cc: emacs-orgmode@gnu.org
Hello,
Grant Rettke <gcr@wisdomandwonder.com> writes:
> May you please discuss your use case that motivated this code?
typical usage scenarios could be:
1) write a book of many chapters, one main.org file
and many second-level .org files, one file per chapter,
and you don't want to manually write all the #INCLUDEs:
main.org
chapter01-the-intro.org
chapter02-another-day-another-story.org
chapter03-bad-day-emacs-froze-again.org
...
chapter47-end.org
2) write some reference manual (example: my_c_manual.org)
that includes many .org files, every one of them shows usage
and examples of a language keyword or library function:
my_reference_manual.org
abs.org
...
printf.org
strcpy.org
Thanks to everyone for whatever feedback, kindest regards.
Andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A Babel block to #+INCLUDE all .org files of a directory
2014-08-30 20:39 ` Andrea Rossetti
@ 2014-08-30 21:31 ` Andrea Rossetti
0 siblings, 0 replies; 5+ messages in thread
From: Andrea Rossetti @ 2014-08-30 21:31 UTC (permalink / raw)
To: Grant Rettke; +Cc: emacs-orgmode@gnu.org
Andrea Rossetti <andrea.rossetti@gmail.com> writes:
> my_reference_manual.org
> abs.org
> ...
> printf.org
> strcpy.org
sorry for the typo, I meant:
my_c_manual.org
abs.org
...
printf.org
strcpy.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A Babel block to #+INCLUDE all .org files of a directory
2014-08-30 15:50 A Babel block to #+INCLUDE all .org files of a directory Andrea Rossetti
2014-08-30 16:14 ` Grant Rettke
@ 2014-09-01 21:09 ` Andrea Rossetti
1 sibling, 0 replies; 5+ messages in thread
From: Andrea Rossetti @ 2014-09-01 21:09 UTC (permalink / raw)
To: emacs-orgmode
Andrea Rossetti <andrea.rossetti@gmail.com> writes:
> I wrote a Babel block to generate the #+INCLUDE statements
> for all Org files of a directory.
>
> https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-all-org-files
Hello Org users,
just in case you try to visit the link of that script
for multiple #+INCLUDE files: I renamed it into
https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-many-files
because now the user can specify inclusion of files
with any extension (see example/main.org).
Kindest regards,
Andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-01 21:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-30 15:50 A Babel block to #+INCLUDE all .org files of a directory Andrea Rossetti
2014-08-30 16:14 ` Grant Rettke
2014-08-30 20:39 ` Andrea Rossetti
2014-08-30 21:31 ` Andrea Rossetti
2014-09-01 21:09 ` Andrea Rossetti
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).