From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ULmINjB4K2SIGgEASxT56A (envelope-from ) for ; Tue, 04 Apr 2023 03:06:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8ICaNTB4K2SKVwAAG6o9tA (envelope-from ) for ; Tue, 04 Apr 2023 03:06:56 +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 53D923C0D1 for ; Tue, 4 Apr 2023 03:06:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjV7c-0006rJ-Dj; Mon, 03 Apr 2023 21:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjV7a-0006r7-LC for emacs-orgmode@gnu.org; Mon, 03 Apr 2023 21:06:02 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjV6V-0005fI-Nh for emacs-orgmode@gnu.org; Mon, 03 Apr 2023 21:06:02 -0400 Received: by mail-lj1-x22e.google.com with SMTP id q14so32189454ljm.11 for ; Mon, 03 Apr 2023 18:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680570293; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oy5PFySbXgNL4nm7/a0xqmdOX1EDemgcsU0RLGSBgXA=; b=VwJH74tQG/hxN4cS2mm9CcZ2yjZlF16/I35FI7dt6sc6A3TC+csiYft8ZkeCFxgwQh TGK8BqH3rGIn5tkmeu+5GllFh9mW07GS5L6FzjTg4i8U7cAPreAzyv2n1ZorGXhL7H9E F4E5VRxNQw2PGDabIYxkR+Af2HLXUJIkPhggxd6fjXoZ64har1X4Qwtzh7Wswl4mm6tw HY6t5tBsxYsnMJeH/Id3CTbU6Zm9ankzmLcY0hEqQEVLSazACFA8J1WR1s7BNM3Y9XUn 1/6DyymfeXbCLPIHiS0Jek9KGmOslRlxY7zxi1lNx3JlebJ/m7FD/Zcx2AIq6g0vkZb7 Yz2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680570293; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oy5PFySbXgNL4nm7/a0xqmdOX1EDemgcsU0RLGSBgXA=; b=TRcSny1Lx79CA6EFKyLp80nRV+xcAAYRcepxQ+dMPTR2KzIBDehHnBj8kVVHIJYqgV q1kgnxrlr5jphh1JQI1G4+9LIqKrVomB8hg48RjrdbMm5SJs6Xy138D0f3zsAQzA0Rx0 XG5g0lMZDr8TWXqRsbSvakN57Ti3smSnIvvscEi6YwBvgE0xLxIq4MTRU3VUcorEtG1S n+suK/VAM3zENdMBqY2JgWhXaYtXICoVmnoIERyPxrEqyhQp7Jpx6F4SHB9aBLwfaQNl eBHGnu0pQjt2nIA3kBAgySTGRgLRLQeL3wdIAiRjGkeiECc9HIZh4rNgd8BHuB0n86ki z9eA== X-Gm-Message-State: AAQBX9f8cujjnefJEx4of6eb+wNB185cc2ng0biGnuybJxrxH3x3SmK3 lPv/G1Y9bn0tyCRVKJIzXX1g4p5sb1/AYeAUSRI= X-Google-Smtp-Source: AKy350ZrT/kGd2dkDcSSJRccfUGeUR0RuFKJrcQNcP1LRlz1JkAtliAv8Wiv50KFCxoxyTCGYqWXJLLYFM8xa1pvSmQ= X-Received: by 2002:a2e:980c:0:b0:2a6:2ae3:ef02 with SMTP id a12-20020a2e980c000000b002a62ae3ef02mr438539ljj.4.1680570292989; Mon, 03 Apr 2023 18:04:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:5d2:b0:258:a264:8fd6 with HTTP; Mon, 3 Apr 2023 18:04:51 -0700 (PDT) In-Reply-To: <87cz4lb9ya.fsf@localhost> References: <87h6v9gpno.fsf@pm.me> <87ilfmxen5.fsf@localhost> <87mt4xvn4w.fsf@tec.tecosaur.net> <87ttz5a2zt.fsf@pm.me> <87sfdilgyb.fsf@localhost> <871ql23r92.fsf@pm.me> <87cz4lb9ya.fsf@localhost> From: Samuel Wales Date: Mon, 3 Apr 2023 18:04:51 -0700 Message-ID: Subject: Re: [FR] Allow to #+include files verbatim without any processing (was: Have export treat file: paths in INCLUDED file relative to the INCLUDING file's dir) To: Ihor Radchenko Cc: gnuric@pm.me, orgmode@tec.tecosaur.net, emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=samologist@gmail.com; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680570416; a=rsa-sha256; cv=none; b=GfTP5qzlgl8QiwK7zHA6vZF+F70y137hi6YNqmmWgYqzJoVS+OoQRO16d6N2cdSr6QLr5K zC3STDzMvAEgJdr3snAz4/HzadkEnF6ps2hG+94VoRMG9B4MePO4/zKtKajJrOn1ZIpA2K vyraKecXYSH5zC9hLi+O9xuKocebSa/Kssdptq5PD+39S1vQqTjrQuYX8MpKJwtXT4R+9y Dq5ob5JbN/C/0DtTgCujmRqhXN32PeNJW3FsGAERom1kg8cw/TbUBuxcnmU1lrqCtbOj6i aaZa9Y4HWsvww1xSrcBU4mE1Km2L8GZ75xJpSpF1pnnLqwq82x72mgob8SEHeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VwJH74tQ; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680570416; 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=oy5PFySbXgNL4nm7/a0xqmdOX1EDemgcsU0RLGSBgXA=; b=HdDzKrHNNZ+fq1e4fi5KktdiYnHgRDLVlssA7PRdFQWCm791Ae9OHc8uYKRUCIXLncEuHN 9lAgEcrlB6mJ9FOgS7nm64zKznYecHsJtjcOd9iA08xPRQ3WKLfezGpYEen3XMxZuNOE9Z 0Qxl6yJ6FUMy9tYUrqEey84D09LphGUgQE8DgeHcHFPTOghXZhQ//22dZDwQ5A2mQYnK6z LU2UjcfL8ZbQnxlJIbgpM7dKDB6YLBYRZH8Z64pkDIrrYHi4JW1EfFdXxnDShOt+msKAGM /2ERddNZurx8JJdDv0/tVWGg3xzLK/vr54NHBpPUuOOMADBkCdTd59TuVaczIA== X-Migadu-Spam-Score: -6.45 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VwJH74tQ; 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-Spam-Score: -6.45 X-Migadu-Queue-Id: 53D923C0D1 X-TUID: LRReEQnPALfA off topic, but is it possible to leverage such a default into being able to include a paragraph [or a section] from the current file? istr this required specifying both dir [fixed with this default] and the file basename. here are some of the things i tried. bad syntax no doubt. # #+include: [[id:d3df9f9f-946d-44b6-9b58-b3a69e069458][About]] :only-contents t # #+include: "#about" :only-contents t # #+include: "*about" :only-contents t # #+include: [*about] :only-contents t On 4/3/23, Ihor Radchenko wrote: > gnuric@pm.me writes: > >> Hi Ihor, >> Thanks for your reply and clarification on what Timothy meant. >> >> 1. Is there a general workaround that could be used as of now? > > Nothing great. You may have to use a custom macro, but you will then > miss auto adjustment of heading levels and other #+INCLUDE features. > > A bit more dramatic would be advising `org-export--update-included-link' > with :around advice #'ignore. That will skip link updates completely. > >> 2. Is there something I can do to help with a :dir or similar option's >> development? I have some (very) basic knowledge of lisp. > > You can look into `org-export--prepare-file-contents' that is doing all > the processing of the included files. It will have to be modified to > take the new options. The options are parsed by > `org-export-expand-include-keyword'. > > If you have experience with other programming languages, things should > not be too hard - just follow the existing code. > >> 3. If it helps, this behavior has changed since (at least) Org >> 9.1.9-65-g5e4542, which is the default distributed with GNU Emacs 26.3. >> With that Org, export to html took the links in the #+INCLUDE'd .org files >> as being relative to the includer's dir (i.e., the PARENT .org file's >> dir), which I consider 'verbatim' inclusion. > > This behaviour is not documented and not defined. > The relative file link resolution was requested in > https://lists.gnu.org/r/emacs-orgmode/2019-02/msg00103.html and then > implemented in 931b7b8faf9. > > Note that #+INCLUDE generally assumes regular Org files and the new > behaviour you stumbled upon makes more sense as the default. > > Unfortunately, this change has not been announced in ORG-NEWS. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com