From: "Pere Quintana Seguí" <pquintana@obsebre.es>
To: Matt Lundin <mdl@imapmail.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Merging .org files
Date: Mon, 31 Jan 2011 16:18:06 +0100 [thread overview]
Message-ID: <4D46D2AE.1000900@obsebre.es> (raw)
In-Reply-To: <8739oadprt.fsf@fastmail.fm>
[-- Attachment #1.1: Type: text/plain, Size: 2151 bytes --]
Al 30/01/11 22:51, En/na Matt Lundin ha escrit:
> Pere Quintana Seguí <pquintana@obsebre.es> writes:
>
>> In my current system, I have about 200 .org files. With this number of
>> files, building the agenda is very slow in my home computer and, also,
>> makes the performance of MobileOrg quite poor.
>>
>> So, I would like to join files, to increase the system's performance.
>
> FWIW, I've found the opposite to be true. Splitting up larger files and
> reducing the depth of the hierarchy marginally improves agenda
> performance (~ 0.2 seconds acc. to elp). But in my case, I split 10
> files into 40, so I have no idea what 200 files would do. Perhaps
> there's a sweet spot somewhere? I also haven't used mobile org.
So, maybe my initial assumption is wrong.
Has anybody run some experiments to check if it is better to have a
small number of big files or many small files?
> In my experience, archiving old items and reducing the number of active
> todos is the best way to keep the agenda snappy.
>
>> Is there any script to cleanly join files, by transforming the title of
>> the file in a first level heading (*) and adding an star to all other
>> headings of the file?
>
> Perl is always handy for this type of thing:
>
> --8<---------------cut here---------------start------------->8---
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my $mergefile = "/tmp/merged.org";
>
> open NEWFILE, ">", $mergefile
> or die "Can't open $mergefile: $!";
>
> while (<>) {
> s/^(\*+)/*$1/;
> s/^#\+TITLE:\s+(.*)$/* $1/;
> s/^(#\+\w+:.*)$/: $1/;
> print NEWFILE "$_";
> }
>
> close NEWFILE;
> --8<---------------cut here---------------end--------------->8---
>
> Note: This is a quick proof of concept. Use at your own risk. ;)
Great, thank you!
Pere
--
Dr. Pere Quintana Seguí
Observatori de l'Ebre (Universitat Ramon Llull - CSIC)
Horta Alta, 38. 43520 Roquetes (Tarragona), Spain.
T. (+34) 977 500 511 - F. (+34) 977 504 660
http://www.obsebre.es - http://pere.quintanasegui.com
GnuPG:2CAB4330
http://pere.quintanasegui.com/coses/key-transition.txt
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2011-01-31 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-30 11:39 Merging .org files Pere Quintana Seguí
2011-01-30 17:39 ` Juan Pechiar
2011-01-30 22:09 ` Pere Quintana Seguí
2011-01-30 19:22 ` Michael Welle
2011-01-30 22:20 ` Pere Quintana Seguí
2011-01-30 21:51 ` Matt Lundin
2011-01-31 15:18 ` Pere Quintana Seguí [this message]
2011-01-31 20:45 ` Michael Welle
2011-02-07 8:28 ` Pere Quintana Seguí
2011-03-18 20:38 ` Matt Lundin
2011-03-19 8:51 ` Aankhen
2011-03-19 12:53 ` Matt Lundin
2011-03-19 17:42 ` Aankhen
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=4D46D2AE.1000900@obsebre.es \
--to=pquintana@obsebre.es \
--cc=emacs-orgmode@gnu.org \
--cc=mdl@imapmail.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).