From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +EbLDnL90l5YbQAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 00:42:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yP6cCnL90l5PeQAAB5/wlQ (envelope-from ) for ; Sun, 31 May 2020 00:42:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AFEAE94042B for ; Sun, 31 May 2020 00:42:25 +0000 (UTC) Received: from localhost ([::1]:51710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfC3U-0003X3-BW for larch@yhetil.org; Sat, 30 May 2020 20:42:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfC2n-0003UG-U5 for emacs-orgmode@gnu.org; Sat, 30 May 2020 20:41:41 -0400 Received: from mail-mw2nam12on2104.outbound.protection.outlook.com ([40.107.244.104]:29760 helo=NAM12-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfC2m-0002pb-CW for emacs-orgmode@gnu.org; Sat, 30 May 2020 20:41:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROM7kJlotFlxt1qDAllLEfCHhUg/qisDIJm5z62WJzTN4+xTNG6bUItToVNn2mV+ZPUXcm9F/i0T0VXyXC+2sDSeYwLUocRIQzbLihgYMt+hZivfo6U1oHz0E73+v9gC9P3s+TeMt5ZUWgG2Me9NVMhA78a1jRd7Qi0HweW2/b+E7Frh0avElyxEaXwLuk+2NME9UN0G1mfiOqEtTq4gLY4Ug1iTzCqtpgkSDYSi0kP5HnKLsjaWID+ZwIJdu5214o6HWt4kkPStOAM8N+cT4Jv7zXIxUqvqC6f/yLB8DxH6Fk7A4ZEhw9NbtaBml7d57M2mxMqCtgSPmcqMYNiu+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SvHTPHNnqbVh6M/ttySUBGAxW7DKpXFeVPZgf5VtwxM=; b=SX+6ebTkJI95Tt92KrpCv9z1+Wh4HinyRiib5Z9fli3FyOqYgYc9ihF6iTXI6KS66n0/ZRqk0y2chsL/ARmP2ao7VODzOUH7U7vhEOMPyEooDoIVXksXar6Fx7vhWpzV+cZlnOsftSRueNI7ANNRqPNUOUgMUH2HzQ49qyWQdeokgcJVdWSzt3UvWENILEdvj4momXTZX7z/2x7HVpncV0hq66dUk4H4U3BkEhlJ7QeegufokpTF9Q71fHOs3xWEs3vWD49oGur31iHXf8XaotCjPqW9Tcipati/3++Wj6vn//KYjAMzj6SgzSxXbfnRiCjx5ci2KnfobIZGkZy/vA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=rochester.edu; dmarc=pass action=none header.from=ur.rochester.edu; dkim=pass header.d=ur.rochester.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ur.rochester.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SvHTPHNnqbVh6M/ttySUBGAxW7DKpXFeVPZgf5VtwxM=; b=n25qT1DgoCA7N88EpemcTn9JpqkVip6gl5cNDgFFf+fZeR9rizfVYWgaoMQf+Tp0si6Gq38fQHyTUCeMsChVmC4ZT8bzu8FFiEAhL4oFCW2WOPU+I8OqzH/O1s+PnFQmYZK0MaIMYZhp90NsxVUKgKSbSU5u/7gvv027xO7Pn/o= Received: from DM6PR07MB7242.namprd07.prod.outlook.com (2603:10b6:5:222::13) by DM6PR07MB6777.namprd07.prod.outlook.com (2603:10b6:5:1c2::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Sun, 31 May 2020 00:41:36 +0000 Received: from DM6PR07MB7242.namprd07.prod.outlook.com ([fe80::81b9:4584:96eb:c7b1]) by DM6PR07MB7242.namprd07.prod.outlook.com ([fe80::81b9:4584:96eb:c7b1%2]) with mapi id 15.20.3045.022; Sun, 31 May 2020 00:41:36 +0000 Content-Type: text/plain; charset=us-ascii Subject: Re: Splitting large org file into smaller ones From: "Marvin M. Doyley" In-Reply-To: Date: Sat, 30 May 2020 20:41:33 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <6AB1CB70-EDF4-4C6A-B42F-0941E930B600@ur.rochester.edu> References: <64119DDD-42BD-47AC-9EB6-DD25FE58BB37@ur.rochester.edu> To: Diego Zamboni X-Mailer: Apple Mail (2.3608.80.23.2.2) X-ClientProxiedBy: MN2PR04CA0002.namprd04.prod.outlook.com (2603:10b6:208:d4::15) To DM6PR07MB7242.namprd07.prod.outlook.com (2603:10b6:5:222::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from vpn13-9.net.rochester.edu (128.151.13.9) by MN2PR04CA0002.namprd04.prod.outlook.com (2603:10b6:208:d4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Sun, 31 May 2020 00:41:36 +0000 X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Originating-IP: [128.151.13.9] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fca67852-75a8-4c06-441f-08d804fb5fcf X-MS-TrafficTypeDiagnostic: DM6PR07MB6777: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-Forefront-PRVS: 0420213CCD X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J71CBRxlaloi/lfc1T3SZT0kL75Gye/iJBPCAAl13BN49dV1KpkAdwzIIyvyWtbb5GdeuwmeOpj9hubm2tW8CclMJIInpvErI3HaDBu5Bw+uQ1ZRItmamcWJ5HNgc3Nf6S0Y4YFEbUO5DXt58SZbWNR1hVcDJWqUeYA+GAwlFVQeuDUJbUfeH5oMMPkvubDWvswj7gbDFlweWJT5WijclDO3f9EQRvuq0D/fNPgxa+iw4MnsQa3KPcWqOyQE+DOkW9jzy6MgFhYO80Dw0zyaaDsnesnaTBRrVIYExW1549yhlUq1Uwk2Qnf8SST3Qby2xDConMIqi7/K/lCvBU5WfStlLJZW03A7p3nCtUwWN4IUqXJusigai0dKa3jrgzqgYlHbA9dXiojMbH7oMbz0Dg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR07MB7242.namprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(39850400004)(396003)(366004)(136003)(346002)(956004)(8676002)(2906002)(478600001)(6506007)(83380400001)(83170400001)(6666004)(2616005)(53546011)(4326008)(5660300002)(316002)(966005)(6486002)(186003)(33656002)(16526019)(6916009)(8936002)(66476007)(66946007)(26005)(6512007)(52116002)(786003)(66556008)(75432002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: bJ79TtGKAGkyuxDQvAz/HmEc/tmaQmaSCVV2H7KHMMhBy27xfqmtyd92D8Af5ttdvrVFdZAvilsOuXo7gXnb2nRtv0PT/mMq3zXTZ6fUTv4f2+bfFMY8WkW42ErJpwNGeCHrsZ5/FhrH8pnbUZ87e6nft8xNOEIAxHKvX5cJFdafQZP8EZOecHwVSXKQpa01tJwtyPqoeXUs9nftSBT9M9XNvKB6coNOhozAf8K9MrMu3SAovJSI18zb0oG7NNJ7Cg/Inskhe91n8eGVhx8jCyM+Ytqc8+EBtBUAknmOyGG8JAt9dKz15Nf4rELIOaKvEBqJucgBSKXS1UejKgS4zjyiGhs4L3vLKWur6EXIQGhCZIvcn8pT9S9LGoXhe7mGM5XtVwc409a7cL/RAgr6Ac1tf8SU4pgAp24tsAnnx1R2qssN3Z5mlvIia4cwWSP/aoaFUWsKzW3uurJQS+OTwoa/EU502MSo7ONDXbr87U4= X-OriginatorOrg: ur.rochester.edu X-MS-Exchange-CrossTenant-Network-Message-Id: fca67852-75a8-4c06-441f-08d804fb5fcf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2020 00:41:36.5199 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 374e17f4-cf11-4ce2-b3ef-5de76bf4ce41 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ejIygpHeMnktMRmPkHlI3ebZh3eUFBAA7lFnQykiUuRUVbFExVht5pcHqMT72GUzj9brNgseFaRCwrTWKHxPed4fvcKTIwkNUYM7y/sBJl0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB6777 Received-SPF: none client-ip=40.107.244.104; envelope-from=m.doyley@rochester.edu; helo=NAM12-MW2-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/30 20:41:38 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ur.rochester.edu header.s=selector2 header.b=n25qT1Dg; dmarc=pass (policy=none) header.from=rochester.edu; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -2.71 X-TUID: OcsCtejLEbyc Cool! I will try this too Thanks Cheers, M > On May 30, 2020, at 6:23 PM, Diego Zamboni wrote: >=20 > Hi Marvin, >=20 > I replied to a similar question some time ago, here's my answer (with > updated links since the files have changed in the meantime): >=20 > I do something similar in my ox-leanpub-book module [1], which exports > each top-level heading to a different file. The general idea is to use > =3Dorg-map-entries=3D to loop over the entire buffer [2]. The function yo= u > call can then check whether the current entry is a header at the level > you want [3] and then export it to the corresponding file. The title > can be used to deduct the filename [4]. >=20 > I found that I had to mark the entire subtree before calling the > export function [5], otherwise the headline was not getting included > in the export. >=20 > I based my code originally on this blog post, which might be a simpler > starting point: > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__medium.com_-40laks= hminp_publishing-2Da-2Dbook-2Dusing-2Dorg-2Dmode-2D9e817a56d144&d=3DDwIBaQ&= c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3DT41F_5QsIVBGYhPPUkgYHUp= 9iPHgs2rOCjs7rfKaTMU&m=3D249GZv4Zgx7zyEm64J3m2eEYuchXSdodRltw_gmrqlg&s=3Dex= fuDxb81D5anZ5KD-hCvUI4PRaQxsb812EaBW3b9p4&e=3D=20 > - this code does not select the entire subtree before exporting, which > means only the contents of the section is exported, but not the > headline itself. >=20 > I wrote a simplified function which puts the above ideas together, > feel free to use it: > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__gist.github.com_zz= amboni_2e6ac3c4f577249d98efb224d9d34488&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGEpaQh= 5ofMHBeTl9EI2eaqQZhHbOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m= =3D249GZv4Zgx7zyEm64J3m2eEYuchXSdodRltw_gmrqlg&s=3DARDFenWJJT9XTsBKAReDC6bD= x9VwbP3ADCw3o-_hQbY&e=3D=20 >=20 > Hope this helps! > --Diego >=20 > [1] https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_zza= mboni_ox-2Dleanpub_tree_book-2Dand-2Dmarkua&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGE= paQh5ofMHBeTl9EI2eaqQZhHbOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU= &m=3D249GZv4Zgx7zyEm64J3m2eEYuchXSdodRltw_gmrqlg&s=3DpeXBLnzs1ABFnCABzVUsle= y3-VMFDR0_2oLF3TgiBPM&e=3D=20 > [2] https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_zza= mboni_ox-2Dleanpub_blob_f7ae0f86f517a321a5150e1c712554b12acf144b_ox-2Dleanp= ub-2Dbook.el-23L216-2DL217&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2= eaqQZhHbOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3D249GZv4Zgx7z= yEm64J3m2eEYuchXSdodRltw_gmrqlg&s=3D3K2q6g7FxxjjxKJZtqdsE5bpMFT6RTf3S4mmyld= NdLw&e=3D=20 > [3] https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_zza= mboni_ox-2Dleanpub_blob_f7ae0f86f517a321a5150e1c712554b12acf144b_ox-2Dleanp= ub-2Dbook.el-23L145&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhH= bOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3D249GZv4Zgx7zyEm64J3= m2eEYuchXSdodRltw_gmrqlg&s=3DQOtk1D413Gju7Agm6zgbAMlIwww6e-UV1SZsjomzuZA&e= =3D=20 > [4] https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_zza= mboni_ox-2Dleanpub_blob_f7ae0f86f517a321a5150e1c712554b12acf144b_ox-2Dleanp= ub-2Dbook.el-23L154-2DL158&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2= eaqQZhHbOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3D249GZv4Zgx7z= yEm64J3m2eEYuchXSdodRltw_gmrqlg&s=3DynLKEu4CLjIJqR3y3zl2UMEkS_onMBSSb2TDwOa= ixt4&e=3D=20 > [5] https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_zza= mboni_ox-2Dleanpub_blob_f7ae0f86f517a321a5150e1c712554b12acf144b_ox-2Dleanp= ub-2Dbook.el-23L192&d=3DDwIBaQ&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhH= bOU&r=3DT41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3D249GZv4Zgx7zyEm64J3= m2eEYuchXSdodRltw_gmrqlg&s=3DquomDHaK1zPArr8wu5m8uwkgug6NZ6eDChE5VMZwrG4&e= =3D=20 >=20 > On Sat, May 30, 2020 at 12:08 PM Marvin M. Doyley > wrote: >>=20 >> Hi there, >>=20 >> Is there an efficient way to split a large org file into smaller ones? >>=20 >> Lets say I have a master file with the following >>=20 >>=20 >> * Notes >> ** Candidate A >> - Strong technical background >> - High H-factor >> - good funding >> - More established investigator >> - Huge startup need $$ >>=20 >> ** Candidate B >> - lower startup need >> - signal processing >> - young investigator >>=20 >>=20 >> How do I export the subtree to separate org files, say >>=20 >> - Candidate-a.org >> - Candidate-b.org >>=20 >>=20 >> Thanks >>=20 >> M