From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iPF7Dw8LM2McVwAAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 16:39:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 02xhDw8LM2N5LgAAauVa8A (envelope-from ) for ; Tue, 27 Sep 2022 16:39:11 +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 BBF37D529 for ; Tue, 27 Sep 2022 16:39:10 +0200 (CEST) Received: from localhost ([::1]:43060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odBjo-00064n-RT for larch@yhetil.org; Tue, 27 Sep 2022 10:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od9ya-0007Wj-45 for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 08:46:17 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:33401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od9yY-0006tM-9K for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 08:46:15 -0400 Received: by mail-pg1-x532.google.com with SMTP id f193so9353648pgc.0 for ; Tue, 27 Sep 2022 05:46:13 -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=VljK/DDiWcmj3afXFzvt25GHn1kRSdwnEotFVT+M+tM=; b=adD/JbhTo+hNNmeZPjayqgImkI7XxvKSMWM81SyRBK2xQXQFn6xLGwCETaMkpTyXi/ LAXN3ONXFHTta0D8rZOzgDZZZnPlABl3RfgVOH0KZrX4Jvs2QmUu79XO3F4Umvlwmcmp dSdxyjGY+BKY8DxSRQc53ukO+AE93wDRvOOuoLznpbhI/rkbCxf6TRU86tYOGsMRzCkk Lj2azfabJ1PMKXAiZ8NdfK7XOZ68NI69Kb18rG09CeGo92RiqZiJ820/x2fuX4O4AHNh oeqSrhvxOEaIfIyy/Y1Kf8BJ7APavnYqYZIBRacIcjlMDz+zhR7lAiZUdtq/KGpT8Hhv 2luA== 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=VljK/DDiWcmj3afXFzvt25GHn1kRSdwnEotFVT+M+tM=; b=M208nhXB2MjwOLqi7+Lfv/t8qYKS1i2Y+BN4FKcMkffJvkPncsVmFas64QQY5B5a28 /VOPYGTpqx/ztIiKHS0QT/EnwnQW+Fb3Z5LGNvfGt2lPkcs6CO2WROKEAjRljZw5g66D dvbzkCQE7o4mhY/lCKjU+tNaIleCAXu6LGCKC9OWHUTXXhRlCn/DxtNtWLuLQD07KEDB pFvj5gsDukmtKJ7fJOrxEf8hsf7DFKgXUrA/Mxsy2eBZLOZJdfYRIFKItr2vbwK4AhKn ddZTKUHSihA0kZP1466b/2shBylelKehDQnf4YkRR/18duNHZX6pQ5DEzwUb8MnS177l BGUw== X-Gm-Message-State: ACrzQf1N1M8AnL0pL4Yn4IA9GH3yi/xJo8sXoSA8MsekFpDwGRkA05KM 9ZHd47gnSQjynasI3xSdADbkqbmPrZ4LiQ== X-Google-Smtp-Source: AMsMyM47a9QpAJW2f81NHFYC43ZL+5n7WdS6/g+SHq06vz5Sh7NjHKIQIwqR+Y5hqLu2cAN1h84AFQ== X-Received: by 2002:a05:6a00:14d3:b0:546:e93c:4768 with SMTP id w19-20020a056a0014d300b00546e93c4768mr28527076pfu.36.1664282772646; Tue, 27 Sep 2022 05:46:12 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id w15-20020aa7954f000000b00540c24ba181sm1607179pfq.120.2022.09.27.05.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 05:46:11 -0700 (PDT) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Extract toc from org file In-Reply-To: <010201837e0740fa-da95f799-9196-4463-854b-98be644b9b52-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> <87sfkdnvkq.fsf@localhost> <0ce13d8e-aea6-64af-86e5-da4f88be5d9c@housseini.me> <010201837e0740fa-da95f799-9196-4463-854b-98be644b9b52-000000@eu-west-1.amazonses.com> Date: Tue, 27 Sep 2022 20:47:03 +0800 Message-ID: <878rm5nfw8.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=yantar92@gmail.com; helo=mail-pg1-x532.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664289550; 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=VljK/DDiWcmj3afXFzvt25GHn1kRSdwnEotFVT+M+tM=; b=Hshgh0glUclyZLUA+fNDflazU1abO+ddE+C5Yyhbm6eIQrp0EzNVTqBozLow4K1+RQ6te6 8JvSKVzvzBmYH3YXu3bxyaCKP7gpf5txUjpeMHa2ZSNfGkgMViSsSm7kIfaOGHnoLkShqz kf/ZkA5vtfhWfx7171jP3LxoHLl2dIspCK3hWzn2jjuarmc+6qiwQ4HW0Zp7dnjUxSTIy6 prxnUifaKhbiKNyj0Rz5X36NNncoM1eLUiilTZqgZcUES6upUZXx4tnKyfar2PRk/Kzrft D/uXZ691F78n5JASAJ2sER6vJpIvkGUpPdVuJEk5oJbCn6AtP1b9vgsbmA9N8g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664289550; a=rsa-sha256; cv=none; b=DTrZLf5P+wA5ApUmg/Tf2jSIcHAz+tXcVdavPjhK11A/2MfBD4f00QNNXAg75leA3TgP2i WmMGKXelgi/BZKU5rJxGAlszn86nF3++JqPFATzczCgBM9okMdKVqSUNSQaoBZA1+yPjWG aD/9/yvOI4hp4NnqUUh3PxW9jqkajTJ75qtp/KGRc4k1aRRXfZrhq5cqzocAo6eF2oqJLw BBI7J8vIMVRdfqFylOu9fcDBVRuSO/HL0zF5HnZ7D8ZfXCSw+zRO+6q/Qr96mOGRdPS9rX BSHuD7akdh7gEA4Ecbtq/sBDjJpmXpP/gJu8kD1KwHUhNVUCd++k6OKHZq0wrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="adD/JbhT"; 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="adD/JbhT"; 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: BBF37D529 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: y/dzW87eGj+6 reza writes: >> You may create a function similar to `org-publish-sitemap-default' but > >> using `org-list-to-subtree' instead of `org-list-to-org' > > Thanks for the pointers, but I can't figure out how to get from there to > a toc? As I understand, `list' is a list of files from my project and > `org-list-to-subtree' does add stars to this list. But how do I get all > sections and subsections from my file to appear here? Hmm. You are right. Currently, only links to files inside published project are in the sitemap. Adding TOC cross-links will not be trivial. One way could be publishing TOC in individual files and later moving those TOCs into sitemap. But, say, in html the TOC entries are internal html links... So things are going to be tricky. Or you may reuse the code for site index (org-publish-collect-index and org-publish-index-generate-theindex) but to collect your TOC entries. If you manage to get something useful about this problem, please let us know. This kind of feature sounds like something we could add to ox-publish. -- 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