From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Subject: Re: include an .org file and lower the level of all its headers Date: Sun, 14 Nov 2010 12:31:05 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016364c761759f9a90494fde42b Return-path: Received: from [140.186.70.92] (port=53709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHWai-0005TK-Fi for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 02:01:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHWae-0007xT-4C for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 02:01:32 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:46402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHWad-0007xG-SL for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 02:01:28 -0500 Received: by wyf23 with SMTP id 23so5056157wyf.0 for ; Sat, 13 Nov 2010 23:01:26 -0800 (PST) In-Reply-To: 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: Carsten Dominik Cc: emacs-orgmode@gnu.org, Jianshi Huang --0016364c761759f9a90494fde42b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Nov 13, 2010 at 1:12 AM, Carsten Dominik wrote: > > On Nov 10, 2010, at 3:46 AM, Jianshi Huang wrote: > >> Hi, >> >> I know I can include any file using #+INCLUDE. >> >> I need to include several org files, but they were edited >> independently as a complete document. >> >> Now I want to lower the levels of headers in these org files >> automatically during inclusion. Is there a way to do that? > > No. =C2=A0But since #+include accepts arguments, it could be implemented, > something like > > #+include "aaa.org" :minlevel 4 > > or so. =C2=A0I would accept a good patch to this effect. Here's a patch. I tested it with a simple document and works fine. Thanks, Puneeth --0016364c761759f9a90494fde42b Content-Type: text/plain; charset=US-ASCII; name="org-export-minlevel.patch.txt" Content-Disposition: attachment; filename="org-export-minlevel.patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gghkt5hi0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWV4cC5lbCBiL2xpc3Avb3JnLWV4cC5lbAppbmRleCAyYWZm Y2JhLi4wOGMwYWM2IDEwMDY0NAotLS0gYS9saXNwL29yZy1leHAuZWwKKysrIGIvbGlzcC9vcmct ZXhwLmVsCkBAIC0yMTI2LDEyICsyMTI2LDEzIEBAIFRZUEUgbXVzdCBiZSBhIHN0cmluZywgYW55 IG9mOgogKGRlZnVuIG9yZy1leHBvcnQtaGFuZGxlLWluY2x1ZGUtZmlsZXMgKCkKICAgIkluY2x1 ZGUgdGhlIGNvbnRlbnRzIG9mIGluY2x1ZGUgZmlsZXMsIHdpdGggcHJvcGVyIGZvcm1hdHRpbmcu IgogICAobGV0ICgoY2FzZS1mb2xkLXNlYXJjaCB0KQotCXBhcmFtcyBmaWxlIG1hcmt1cCBsYW5n IHN0YXJ0IGVuZCBwcmVmaXggcHJlZml4MSBzd2l0Y2hlcyBhbGwpCisJcGFyYW1zIGZpbGUgbWFy a3VwIGxhbmcgc3RhcnQgZW5kIHByZWZpeCBwcmVmaXgxIHN3aXRjaGVzIGFsbCBtaW5sZXZlbCkK ICAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQogICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndh cmQgIl4jXFwrSU5DTFVERTo/WyBcdF0rXFwoLipcXCkiIG5pbCB0KQogICAgICAgKHNldHEgcGFy YW1zIChyZWFkIChjb25jYXQgIigiIChtYXRjaC1zdHJpbmcgMSkgIikiKSkKIAkgICAgcHJlZml4 IChvcmctZ2V0LWFuZC1yZW1vdmUtcHJvcGVydHkgJ3BhcmFtcyA6cHJlZml4KQogCSAgICBwcmVm aXgxIChvcmctZ2V0LWFuZC1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ml4IHByZWZpeDEgbWFya3VwIG1pbmxldmVsKQog ICAiR2V0IHRoZSBjb250ZW50cyBvZiBGSUxFIGFuZCByZXR1cm4gdGhlbSBhcyBhIHN0cmluZy4K IElmIFBSRUZJWCBpcyBhIHN0cmluZywgcHJlcGVuZCBpdCB0byBlYWNoIGxpbmUuICBJZiBQUkVG SVgxCiBpcyBhIHN0cmluZywgcHJlcGVuZCBpdCB0byB0aGUgZmlyc3QgbGluZSBpbnN0ZWFkIG9m IFBSRUZJWC4KQEAgLTIxOTMsNiArMjE5NCw5IEBAIHRha2UgY2FyZSBvZiB0aGUgYmxvY2sgdGhl eSBhcmUgaW4uIgogCShnb3RvLWNoYXIgKG1hdGNoLWJlZ2lubmluZyAwKSkKIAkoaW5zZXJ0ICIs IikKIAkoZW5kLW9mLWxpbmUgMSkpKQorICAgICh3aGVuIG1pbmxldmVsCisgICAgICAoZG90aW1l cyAobHZsIG1pbmxldmVsKQorCShvcmctbWFwLXJlZ2lvbiAnb3JnLWRlbW90ZSAocG9pbnQtbWlu KSAocG9pbnQtbWF4KSkpKQogICAgIChidWZmZXItc3RyaW5nKSkpCiAKIChkZWZ1biBvcmctZ2V0 LWFuZC1yZW1vdmUtcHJvcGVydHkgKGxpc3R2YXIgcHJvcCkK --0016364c761759f9a90494fde42b 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 --0016364c761759f9a90494fde42b--