From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 6D4zI8ysMmN+TQAAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 09:57:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uBRrIsysMmMRcgEAG6o9tA (envelope-from ) for ; Tue, 27 Sep 2022 09:57:00 +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 295D31D835 for ; Tue, 27 Sep 2022 09:57:00 +0200 (CEST) Received: from localhost ([::1]:49204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od5Sd-0003OP-3k for larch@yhetil.org; Tue, 27 Sep 2022 03:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od4gq-0007pu-J4 for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 03:07:36 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:38704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od4gn-0006JU-Gq for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 03:07:35 -0400 Received: by mail-pf1-x429.google.com with SMTP id a29so8899559pfk.5 for ; Tue, 27 Sep 2022 00:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=TamuzZhwCwt37YEbWz+ZwMoVMxN5IewUk3mpeq7eq5g=; b=O1J8c0VUZWHsQ+Iqtzuv6iUjFyVPJ7gwxP32fRCGhVLy4RxnhM2cCDSCEjza+mv+Dd RB1sdninhceoqcX2cjouFyHZj0TWijCy0Mpa8Nh8pRlav7zeCbSwmZ2YrfJq6jzrNu8M J+uIwMtjRBBkGzvDGzcR6bjL1MfOIJisuutzSFmyPEAxhkN/AIkl5v9tS7ngEF450neA aGToe+M2yYaE/ZvZoSKIbkK3/0EN+1nUMc74hNxVGB6d8IW5KgRkz1DAPueHk0WsBITE GhZpNCBtrjyvtFlfl3RCdcOzT0QNp59DDFEPvbzddxPcguSIGMXmuCR5ktGYzEjUTz4C j5AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=TamuzZhwCwt37YEbWz+ZwMoVMxN5IewUk3mpeq7eq5g=; b=Xs5cEQQmHCg05KL6zhkA0SEv4uPWGCRxE6wx1Cvpy989x8WL1MEhRwpKDiMSIP7UmM plIePzu+HYuJ6g/X/p/SWg+PmtXPXufPEYgELkCMYZCaV1r91AK/ocCbSONDk1rHtUQZ GBH+C9RkIE8U6WConhy8b/MaZo1F0smh3W+pWiuxilL86VlRoHkEjA5DatCxH9KIDuO9 thkMEuM2K9Ww4Kf2VBY0JG5MeB1axeFFTYNOhbC9DgBmOhwhm1rNhnUMTeLJww9qD+dH iqTtU4Hecs2L6kkCdd3IW5VtJ8Nitk3eM1qpm37HqWDSyeFKYT1TBB39rS1Ge3zEOoE3 uEmQ== X-Gm-Message-State: ACrzQf12LbkqjYp76kl2e3khxQTLroTjZx03W1/nvhpwpH0HUScOX4xM Cjln0ykVkjKyy0VaWud4+Z4= X-Google-Smtp-Source: AMsMyM6lSCb2bWALey6mTigMVs68JGWOBRO98BMFoFhMaIW2zakNchvuyYuGr7lt/EwBlmse3BiMpA== X-Received: by 2002:a62:4e8e:0:b0:54a:ee65:cde6 with SMTP id c136-20020a624e8e000000b0054aee65cde6mr27671053pfb.42.1664262451685; Tue, 27 Sep 2022 00:07:31 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id b3-20020a170902650300b00174f7d107c8sm672163plk.293.2022.09.27.00.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 00:07:31 -0700 (PDT) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Extract toc from org file In-Reply-To: <010201837db72cff-7a3d0b9f-8e0d-4a59-afeb-e3066b287e02-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> <87zgelppvl.fsf@localhost> <010201837db72cff-7a3d0b9f-8e0d-4a59-afeb-e3066b287e02-000000@eu-west-1.amazonses.com> Date: Tue, 27 Sep 2022 15:08:21 +0800 Message-ID: <87sfkdnvkq.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=yantar92@gmail.com; helo=mail-pf1-x429.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=1664265420; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=TamuzZhwCwt37YEbWz+ZwMoVMxN5IewUk3mpeq7eq5g=; b=sRxTKktoY+BoqMV4XMG3MpiZSk4+QZODYG8MPyNYnMqAm6EF7gBLCc880A8DapqVHZbEk+ aYyntvY0ZhZM48cIW1LrLsRr5EJ2nuf8qExXrun7Ecqu0yOLqAdAbWcUM0BIEFFbHhU2m4 HH3z9esdt97WT3Rov6vMbX+HRF1TvSRpkNtYt7G5/CNv6P1PVEh87mNf5aLyh/Usw0DxHK XNK5raZSrm7rVpacrW4Btpd4hM5tRP00dgPXf0wMKj3sXvytWLhBSXucIdbAcM7bkck6bU HUhf2U2wFgkJOOWw7IGnBa5XVzPGmN+FtIqMkYhaKTKTdvl+s49xqGmgNZdoiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664265420; a=rsa-sha256; cv=none; b=psUTUBdXrB9Lz6wX5ueJE33HSx6ewGPeN3S9/DgEqRyzUCiisNqf0Pa7ITAvDEI9aS55fx 79EzRjjEVtaEV9BFj/kMKEcmLzeVaFJk7x0lB4o32HcKkxSuDbZxt5V+C+edaHT0ge6yLx umuCKrpZzQqBiD7n3i7h6LZbv0hMAa34wowCrdgWfrB2qy0iXgi5iokmcvjwQUZbYsAwN4 f3hnoxfjysKHx+57qJ+OeaNhRGHkPeGyks6LqaNbo3d7S0tSSFG/K7ZLse0owpFRb8PR8g Od1slNEVNrMxiTwUaZgyvjJ/qCtiTwSPkmgfU/tYEqIYgBpz84VSU529I/kRUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=O1J8c0VU; 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=O1J8c0VU; 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: 295D31D835 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: s1yFXAVrW5eo reza writes: > I'm using org publish, but the sitemap does only collect the titles from= =20 > org files but I want the complete toc of each file and as far as I=20 > undesrand this is not possible with sitemap? You just need a custom :sitemap-function. The default `org-publish-sitemap-default' flattens the hierarchy. >From the manual: =E2=80=98:sitemap-function=E2=80=99 Plug-in function to use for generation of the sitemap. It is called with two arguments: the title of the site-map and a representation of the files and directories involved in the project as a nested list, which can further be transformed using =E2=80=98org-list-to-generic=E2=80=99, =E2=80=98org-list-to-subtree=E2= =80=99 and alike. Default value generates a plain list of links to all files in the project. You may create a function similar to `org-publish-sitemap-default' but using `org-list-to-subtree' instead of `org-list-to-org' >> 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. > > But this forces all the content into a single file, no? Yes, it will. It is indeed not something you want in your use case. --=20 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