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 ms9.migadu.com with LMTPS id yDY+O4+ZKmRLwgAASxT56A (envelope-from ) for ; Mon, 03 Apr 2023 11:17:04 +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 sNJ+Oo+ZKmQvRwEAG6o9tA (envelope-from ) for ; Mon, 03 Apr 2023 11:17:03 +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 76CF31DC4B for ; Mon, 3 Apr 2023 11:17:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjGIa-0003zI-7m; Mon, 03 Apr 2023 05:16:24 -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 1pjGIY-0003z0-6V for emacs-orgmode@gnu.org; Mon, 03 Apr 2023 05:16:22 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjGIV-0004qn-Da for emacs-orgmode@gnu.org; Mon, 03 Apr 2023 05:16:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 41997240238 for ; Mon, 3 Apr 2023 11:16:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680513376; bh=hUTYBmxSTFjh4BrVF73rl6uxAZcSlWdgEQxXI1ihwfM=; h=From:To:Cc:Subject:Date:From; b=PbQ7wFz0bOYCPzsIPTrVIWm6isjfuG4bzQNnogQ0n/ViUDqj6k9e+RkXfQiAdT6M2 ftyzjsdKCGRFGtM4nFIN/5hnmgUcGPwd/cx7h5jkarWMCWc2TptAM+inx4gWtyeQj1 pt7pRa0t89ws/U9KWMXx0MyHwzp14xc6hk1g6oNyni4pNbgoQYGtZ2CmNhWCKvieMe gVZWNaYn7ge9xlhhRhlJvPOQWXtM2V1uPjbF7wZ8jcEyIlNFElfo7SHI0YyJAhQic+ c+22csFGv3JbG5kRZZYLTVcquo7lEkDxI8PnHTO6/cMHFBEQF/kBCywKObQGsgJajn BeUD9eAWIXBnw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pqlct0mPsz6txD; Mon, 3 Apr 2023 11:16:13 +0200 (CEST) From: Ihor Radchenko To: gnuric@pm.me Cc: orgmode@tec.tecosaur.net, emacs-orgmode@gnu.org 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) In-Reply-To: <871ql23r92.fsf@pm.me> References: <87h6v9gpno.fsf@pm.me> <87ilfmxen5.fsf@localhost> <87mt4xvn4w.fsf@tec.tecosaur.net> <87ttz5a2zt.fsf@pm.me> <87sfdilgyb.fsf@localhost> <871ql23r92.fsf@pm.me> Date: Mon, 03 Apr 2023 09:18:21 +0000 Message-ID: <87cz4lb9ya.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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=1680513423; a=rsa-sha256; cv=none; b=SprYyIF207Ezhg6XG96uHcbS2DKZEXOFEkBMESSha82N/c+GodRXFk3Pap7n+7mefMwp/g Apwo6lx+6xmipdsweb7xn+aGri5UugILj18s9naC7xIH7pnOZhoROEqJhy2pEDLSclkXgo aLR6+KZZ++TW3eLPRZD8Og55moYY5HBxPjlw3OO1D6y3MrDj5sPHbnjxqRFz3EWz0+GNTl ovZ0H0yyfUonFEKCMT95SRD/azqcVKnY3L0xY7QhNbjaBDBlpADLUXH65bynFEoVD5VSA+ jz8I+NoaKBGJVVGQx+AM33QucpIp1ILquuQ8KbcKMpDKoo4jXzHOwdNO0eyv7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PbQ7wFz0; dmarc=pass (policy=none) header.from=posteo.net; 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=1680513423; 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=TZPJe+c5jTWWTiHfARQPPrWkDzmmJQOgeNwKKPV9TkU=; b=fBYR4gQE/phGdtrIAaMcktNBdu7MVxb1q3RkjhIp5Iy53kiHuHOhz5+j92tKQI316J3php hyy1QnEIMif5uuhEFwJGIklV2YvTjF57yM1fIUGuq8Biv1WvOPfx9SZt4APEiRWTUY2XEB RH6g2gdh1rmtgtgSIkJpsafKodq1UKq+V8FkoeZKsoiITXb5c57hP6D4jeqrp/FZuIDWPr Dmr0xXT0d+gq/2V+kpRZK7c+pbfppJX3nnM0OWC1mwJWTn/JteF3baJ/GAwugSbYfcpxhL 4iGbWmyaQzC+j+dCOFb0ocBBfaUrh44QgAGoBtd8ZYCOJkS6FWhbCirVPfbt0Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PbQ7wFz0; dmarc=pass (policy=none) header.from=posteo.net; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -9.63 X-Spam-Score: -9.63 X-Migadu-Queue-Id: 76CF31DC4B X-TUID: HA87k8lJ1uDk 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