From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?UGVyZSBRdWludGFuYSBTZWd1w60=?= Subject: Re: Merging .org files Date: Mon, 31 Jan 2011 16:18:06 +0100 Message-ID: <4D46D2AE.1000900@obsebre.es> References: <4D454DF7.8020907@obsebre.es> <8739oadprt.fsf@fastmail.fm> Reply-To: pquintana@obsebre.es Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0234667090==" Return-path: Received: from [140.186.70.92] (port=46903 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjvWK-0005Ua-2D for emacs-orgmode@gnu.org; Mon, 31 Jan 2011 10:18:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjvWD-0000po-Ip for emacs-orgmode@gnu.org; Mon, 31 Jan 2011 10:18:23 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:53637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjvWD-0000p3-BU for emacs-orgmode@gnu.org; Mon, 31 Jan 2011 10:18:17 -0500 Received: by wwb17 with SMTP id 17so6039114wwb.30 for ; Mon, 31 Jan 2011 07:18:15 -0800 (PST) In-Reply-To: <8739oadprt.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: Org Mode This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0234667090== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigE610EA2A3CB5E64DE1C68193" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE610EA2A3CB5E64DE1C68193 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Al 30/01/11 22:51, En/na Matt Lundin ha escrit: > Pere Quintana Segu=C3=AD writes: >=20 >> 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. >=20 > 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. >=20 >> Is there any script to cleanly join files, by transforming the title o= f >> the file in a first level heading (*) and adding an star to all other >> headings of the file? >=20 > Perl is always handy for this type of thing: >=20 > --8<---------------cut here---------------start------------->8--- > #!/usr/bin/perl > use strict; > use warnings; >=20 > my $mergefile =3D "/tmp/merged.org"; >=20 > open NEWFILE, ">", $mergefile=20 > or die "Can't open $mergefile: $!"; >=20 > while (<>) { > s/^(\*+)/*$1/; > s/^#\+TITLE:\s+(.*)$/* $1/; > s/^(#\+\w+:.*)$/: $1/; > print NEWFILE "$_"; > } >=20 > close NEWFILE; > --8<---------------cut here---------------end--------------->8--- >=20 > Note: This is a quick proof of concept. Use at your own risk. ;) Great, thank you! Pere --=20 Dr. Pere Quintana Segu=C3=AD 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 --------------enigE610EA2A3CB5E64DE1C68193 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJNRtKuAAoJELOasnEsq0MwL6sQAIBFAy/yhHje2y0/6p4S24GA k1rHDELGYELGD4jEzXqDWDSa7AK1TnW+ayw5lrSVUY9Dm7mGJLfbpACbwDbaQSjE q/IuNKRqYKc43sjNHyWzpvaXDfYeDHi1JnZTKM7DhL95izxUkEmw7WvGNCndocxo bDiL6JFJvnlaVZelJQ/701t/6NNSAxtDj+h7jFuwyoERvITo6fz9lWeoZtLckBAG ASySuvJ1jVUBpFo+cc6Y+e+xzQVk6Z29ZechFaaIu4Bp0COGdH4hJruhUpcjNW5A XRCdPO1sFKD7GziWM2utJGY/bCCmOvKKxdQAbnDN/1SH0w3xxZXoAHpEADM7f2RM rNcHRZSbf1PfhJQD5mGN987YZILFBYeBI8VtGW4xvQ4fOB3LSua7ew0jVH+YXTiT UNqOPxfAdcJPMS9lr/JIJaO+MUVaePxXxhXTWCJK9sa5dWRbJc7doOSihOlwiLSg yTBa/wwgvx5IcsWDq/SkClblZHdVtBaGTkPS319cZsJV6iWckyMqQurBQdo2Lph5 GZ7J3/llrFaQE2U6nJb8+K5Td0WpKvFRBOjSxpXgM0TIWO26OfHqzpMwjkE3RIKG dm/GkjAek4iIbl+cT2LB8PVSp51ECebI+crZPaT+to9bOGVZZ12GZTpgCFkXJebl cshlZrDRF6SkgtDpwrHN =o7w3 -----END PGP SIGNATURE----- --------------enigE610EA2A3CB5E64DE1C68193-- --===============0234667090== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0234667090==--