From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eAcIMoWvf2GtAgAAgWs5BA (envelope-from ) for ; Mon, 01 Nov 2021 10:12:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IIyyLYWvf2HIDgAAbx9fmQ (envelope-from ) for ; Mon, 01 Nov 2021 09:12:37 +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 24CDBF4 for ; Mon, 1 Nov 2021 10:12:37 +0100 (CET) Received: from localhost ([::1]:39116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhTMn-00047h-7b for larch@yhetil.org; Mon, 01 Nov 2021 05:12:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhTM4-00047Y-1r for emacs-orgmode@gnu.org; Mon, 01 Nov 2021 05:11:48 -0400 Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::215]:57627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhTM1-0000oj-57 for emacs-orgmode@gnu.org; Mon, 01 Nov 2021 05:11:47 -0400 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 3B21060135; Mon, 1 Nov 2021 09:11:31 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net From: Noboru Ota To: Ihor Radchenko Subject: Re: Introducing Org-transclusion References: <87fssispc2.fsf@nobiot.com> <87h7cysjf2.fsf@localhost> Date: Mon, 01 Nov 2021 10:11:27 +0100 Message-ID: <87sfwgme9s.fsf@nobiot.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:fff0:2d:8::215; envelope-from=me@nobiot.com; helo=outbound.soverin.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635757957; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=f53lZutWA5vKNw3+j3AD9swQkL482evw5qbQtD1O14I=; b=cQwTdLbwFL2n9Z6Rx2k0BGPIZjasz23fmeIseK6vnsph+Z5R2IWE1plUBTVzgH8BFigLsI GsphHptO7QdzrvFEekxrDaxGVKagJOhPgMfHD6bdRU4btf36aGCGTtVbNwvfe/kyWtQ597 Kc2eulULji7OTjqTHqrwGLq3JdlndZ1giJ+cLXngLwJWg6NgT5QOlRn0I0pkx8bpY5SmNK IYV6+j1730cJ1AiUXAUAb5nje3qVEhdFKsZE/QXAFgdp0EUA+6UNQRpf9pKkpLCZKwsj/w d772WuH+V3d5rWCocPHTeTD3q+wSWxmqyJZCGrMj9DQqvEdydpjaqEp+1pCcTQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635757957; a=rsa-sha256; cv=none; b=Tk/X56C9xwep8n+9XLqy/lRSxUe620PZwT5MXIzlIUqzoDmylU/zofypy5yCoM6cNtd0US tQRLLdtnY2bud6DoeLvO7L6E3611+JesTaQE4j+CiVyr+HthOhvSIafACD/e17Aqk+Dniq Osu4RKJURF04+k3K2IIfwIad0ffjJxP9XP29NTwJbDEhp5fj1HO/F6akOgSTCmLVWEydjt +IVRwkOH3+EIC0tcigb0vjLiu+MYONlLl0cmkH/GS+EWysUyMzwGee329NSvlIDkz3rQRc PRKmNwKBKkifWhFHmf27LR6HKv5wDtSUgZKst1mdEc7H3eJDnrofgxDNdwTlQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Migadu-Queue-Id: 24CDBF4 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: pcBtLIeySG5k Ihor Radchenko writes: > > Welcome ;) > Thank you. > You have my +100500 to have this package as part of Org :D Thank you again :) Is there anything I can/should do to make this happen? I would be happy to email the whole package as a "patch" for code review, if this were the way but I feel that might clutter this mailing list too much with a large amount of text (?) > The package may allow several interesting things in Org: > > 1. An alternative way to structure headings > Currently, we have a rigid headline structures in Org and > alternative tag-based approaches like Org Roam. Headline > transclusion will allow same subtree under several headings (aka > file system symlinks). Org-transclusion will be probably of help here. I didn't think it in this frame (like symlinks) but it has the :level property to control the heading level of the transclusion, which can be different to the original. > 2. A much faster tangle system. If we can directly transclude and sync > contents of source blocks with actual programming language buffer, > C-c ' can trivially support flycheck-mode and provide a more > IDE-like experience while still benefiting from literate programming > style. It has ":src lang" property and can transclude a specific range of source code into Org's source block. It is essentially read-only copy of the original, and you can use "C-c C-c" as a normal Org source block to execute/evaluate it. For flycheck-mode, I am not sure; I don't use it (I use built-in flymake). It may be an interesting experiment for me, too. One thing is that transcluded source blocks are read-only. I think it will require a bit of work to get the correction to work on both the transclusion and source buffers. > 3. Visible #+INCLUDE directives. I recall multiple requests to be able > to see the INCLUDEd files right inside source Org buffer. There is a parallel between #+INCLUDE and #+TRANSCLUDE. Transclusions are read-only copy so they can be exported. I think in many cases they can work as "visible #+INCLUDE". But #+TRANSCLUDE does not support all the features #+INCLUDE support. For example, noweb to include yet another block of text has been reported to output an error. > 4. Dynamic Org files like agenda views, but made of transcluded > headlines. Such files can be kept in Org mode with all its features. Maybe... I don't use Org-agenda, so it didn't occur to me to test this use case. > Transculation has been requested many times by different users. Some > relevant links: > - https://emacs.stackexchange.com/questions/51814/embed-org-task-list-from-other-subtree > - https://www.reddit.com/r/emacs/comments/dz5xeb/is_there_a_way_to_include_an_org_file_in_another/ > - https://www.reddit.com/r/emacs/comments/flxqei/cloningmirroring_a_region_to_some_other_location/fl22ele/ > - https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00141.html > - https://emacs.stackexchange.com/questions/57608/split-code-across-multiple-src-blocks > - https://lists.gnu.org/archive/html/help-gnu-emacs/2020-06/msg00151.html > - https://reddit.com/r/emacs/comments/debean/possible_to_embed_another_org_file_or_entry_in_an/]] Org-transclusion might provide some steps forward for some of the desired functionality discussed in these threads. Especially for the "cloning" a body of text across multiple buffers, I have factored out this part and created a stand-alone library called "Text-clone". It is available in the same repository at https://github.com/nobiot/org-transclusion/blob/main/docs/text-clone.md. This separation was born out of a suggestion by alphapapa on Reddit. I feel that Text-clone can be taken further than the use in Org-transclusion (I feel that Org-transclusion is only one use case for Text-clone). > Other attempted implementations: > - https://github.com/legalnonsense/org-clones > - https://github.com/magnars/multifiles.el > - https://github.com/vspinu/lentic > - https://github.com/whacked/transclusion-minor-mode Yes, I have looked at some of them and also this question from John Kitchen, recorded by alphapapa: (https://github.com/alphapapa/transclusion-in-emacs#org-mode). I also looked at https://github.com/gregdetre/emacs-freex. Org-clones have given me some inspirations. Multifiles looked to be too complicated for me to understand and abandoned for a long time. I was not aware of Lentic. I dismissed Transclusion-minor-mode because it requires a server. Org-transclusion is rather simple. It only requires Emacs 27.1 and Org 9.4. > Best, > Ihor