From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4NWqIdlRMmM3RgEAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 03:28:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MPiwIdlRMmPXcQAAauVa8A (envelope-from ) for ; Tue, 27 Sep 2022 03:28:57 +0200 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 2181FDE67 for ; Tue, 27 Sep 2022 03:28:55 +0200 (CEST) Received: from localhost ([::1]:55158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oczP3-00061y-Ey for larch@yhetil.org; Mon, 26 Sep 2022 21:28:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oczNu-00061o-4D for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 21:27:43 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:42819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oczNs-0003Z5-Cu for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 21:27:41 -0400 Received: by mail-pg1-x52d.google.com with SMTP id e129so2006404pgc.9 for ; Mon, 26 Sep 2022 18:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=118B9CKbLzPubTml/VUhr5O0s6VDYLzc/bWGDp/WDGk=; b=BwCJo/k5Cb464rXtspPwcNgG51+/chBmwJdIQhChwN+F90Foc5a9Ka4iYyFJTzZKz8 Dy4vIvnIFxDDrG0ar0TwvyzkhTbkYAF40REa/Yl4uCY1k2t6lOlV2qR3RQSwSTJmSSH7 WzlH9Wva1WazES62+0SEYW2rHKWP2fLOLoghVhvylv0wNBO7wgt16OMsqDvP0gTi9bPm 0Ah9M5x3DmvNHR1kDx7tJGvWX0ky2PM4Fdz5OJKypuLbBEqQkXsU4xJ5sgn23um5GgSE YKvMt/oWRklbmWN9f/1kuMN7PcEQL+865kSRZgm1vSnrLi1M1fERNDQxa9aZhiavGAkO fckw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=118B9CKbLzPubTml/VUhr5O0s6VDYLzc/bWGDp/WDGk=; b=pAcuLUQoeNNM8dwvyhy49EeNx5eBZREIDaFk8ATBN7vAcSLbKkLpTMedO+VOLPFsZN devC6XRN1sxWdDsyiRlIpgqZAamXWKY5wzaEvbV3ROTT4TXdgK2+Ggdp+tQJm1oUFL4c dr8BjUbAfms3tNDHWNcKkzqBZi5iL4PwK2lHwbNIDfsweua/vhMms5PnuWfL7AeoovFZ sYreMEGHQCfYd0Cv6LE3oazlknIo/0WozH87eLTDAj7862163vtuQMX0Nl/COVm5TFE8 vLeWw+axdWhwg9Ibk43qV3ErpgAMjcAvA5a6nWoFthRcHrzOWWwO9LKb+qkzF6echuFO WWbA== X-Gm-Message-State: ACrzQf1gyJWIWdtn5xLkpNLjPAtvLVKQlUKRMPwHxsropwDi3yQhDtsk HYxRvw3CB+9u2FIXAJ8N4R4= X-Google-Smtp-Source: AMsMyM7sdHvZtIc1bG73vRffmvtSZVsyKsGh3BtLKyjoCjKCHYjkcocdwKICNa/nnwlfvKkQ+N68fQ== X-Received: by 2002:a05:6a00:1304:b0:555:6d3f:1223 with SMTP id j4-20020a056a00130400b005556d3f1223mr25336249pfu.60.1664242058783; Mon, 26 Sep 2022 18:27:38 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id p14-20020a17090a284e00b001fd9c63e56bsm7078147pjf.32.2022.09.26.18.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 18:27:37 -0700 (PDT) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Extract toc from org file In-Reply-To: <0102018379a514bb-022ca801-7259-4a39-8368-80ce371128de-000000@eu-west-1.amazonses.com> References: <100cb12a-b3f1-739a-84f1-847f5e86a8bc@housseini.me> <0102018379a514bb-022ca801-7259-4a39-8368-80ce371128de-000000@eu-west-1.amazonses.com> Date: Tue, 27 Sep 2022 09:28:30 +0800 Message-ID: <87zgelppvl.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664242136; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=118B9CKbLzPubTml/VUhr5O0s6VDYLzc/bWGDp/WDGk=; b=rYcEj0K305V5w+HCUH+H9azdo8UB/0QWewHhhDLZ2W8JN4uThdJViqLgIS85FwyhBEX+yI QIQgiHifnuhIKjm0TqA2xdpGbf4+5ybCl4I/xEVjj+BvzKHTtd9v6VDUSVpJ4RcctWEn5t o0vaz7GbUKZ82lch0dNg9Kb/GeCvdLppPJ/Cr/ajpzgxvGaVvkMAk0S+abIdmLHKltQIEy 1pQbka/F3y5nV8puqSPQbHmoHbxCkJ+K+eRYEEallCcXgCMqPGtILl28velqKv4siZuPk/ RBAjx9rtOPMBUuKnuuCbOi109kb7CdVVV7AbwUNyWgYt+xmcqm057qWoQEnQZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664242136; a=rsa-sha256; cv=none; b=E5hTmw7IWKkZ4akqciEtlCDpHfcD8XpJCcl6u0H485JcwXisgJ6Cx4CG16yOqGnIkiWhkr L2cbV2Ol2vF25s9iDY5Lus4UAwAKtaWDioRua9NJaOZHzHd7gnwkozuVK03ZodHSJc+gaN PhfPv+8SDj9LpWXeKn8vtc/jvI5w6gVax2xpBrXvkZvT7WHzmGqASkSi/P21RLgTSK7rnO qoFzTEZ7l1fOJNgYNCAkg/4PIdPqcK0Fc8LbOs0RVuy3CAFFVVg9+i+xzpsVko58y0luGc IaJd/noQjAJnNK7V34wKFy9Ak4dYwMwv2BX5XJdWaR+hJ7XNOgXwxnurRJ3buw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="BwCJo/k5"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="BwCJo/k5"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2181FDE67 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: JNzrBl1ExaHW reza writes: > Hi list > > Is there a way to extract a toc from an org file e.g: > > #+INCLUDE: myfile.org :toc only > > I want to assemble the toc's from several files into one file and there > seems to be no easy way to do this. I presume that you are attempting to export multiple org files at the same time. Such functionality is covered by Org publish. Org publish allows generating a sitemap, which is another word for TOC in a multifile export. See 14.1.7 Generating a sitemap section of Org manual. If you are exporting a single Org file that is using contents of multiple #+include'd files, you can use the normal TOC generation as described in 13.3 Table of Contents section of the Org manual. Hope it helps. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92