From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0Ff4DKO7+mPpUwAAbAwnHQ (envelope-from ) for ; Sun, 26 Feb 2023 02:53:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +Q3+C6O7+mO4ggEAG6o9tA (envelope-from ) for ; Sun, 26 Feb 2023 02:53:39 +0100 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 853D3B754 for ; Sun, 26 Feb 2023 02:53:38 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pm.me header.s=protonmail3 header.b=UJOV7vge; 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"; dmarc=pass (policy=quarantine) header.from=pm.me ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677376418; a=rsa-sha256; cv=none; b=DyxU7A0IP3DiNInLyOJnTME+fbgjyXqR4t3M1KioaRPmy5HX4U+3Lo1CvT7ynJiIxtrz5w +KeUbVlr58oVSEXl9QJQvrIS7L0YKuYecHeMrdaXL4nTsrtRGRPBnNu11kEffA8GN8vach kHM2dyrG8E3IErp5DhrlvqAC9Pf+UJ0F6XdvgoHqtTEaMWjTq0eCjmPPbGXC96feG7NOuH 85d5KR8OelzAzjtmNRXs+atnrMpRJyMqvRe2i7wC9a0s5jxGdMGt7sP7zDEKKauujbQthy 0XRKC+9PJdo1W/6sXh+kEkicfLrUHB63yYswXFlIAD/qBEme28I/zDnUcF2mKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pm.me header.s=protonmail3 header.b=UJOV7vge; 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"; dmarc=pass (policy=quarantine) header.from=pm.me ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677376418; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=t8ba9x0niSZ3DBW560YD0I1sdX9oUwMvTOdYjHuxctM=; b=GDumj50BW0SN43uRSdM8fUMEEsvn1x8+jEsnf8FK+ZxnuQzMqRynF6yN2jbovtUodtfgfl DDeh6liD0tBGG1nMKF7gYj9r2Y5094BtTcmYN7ZFLY2Y8ysxwGQqzgdpMG6y3DR2uRCmy6 b69e2y4ZrDeuNm7n1xLA2ci1zDJDbl58v3RbDUZ97u/P0QWjOdI+AGaBT6mL4SIud913R8 3YubG3EdKmoj4DJGvxGQalQxkqSs/wZB+M0YFixsd7sxWZu8J0tpXk+0OwauseB5CSvhqt ceKzUzTzGV/X6m8ykBl3DlvcN2EeB5nfXFTORh6Up+SNeih9D9GJ1ow0eocC4g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pW6Dc-0004t5-W9; Sat, 25 Feb 2023 20:52:53 -0500 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 1pW6Db-0004sv-FQ for emacs-orgmode@gnu.org; Sat, 25 Feb 2023 20:52:51 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pW6DZ-0007uB-Gi for emacs-orgmode@gnu.org; Sat, 25 Feb 2023 20:52:51 -0500 Date: Sun, 26 Feb 2023 01:52:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1677376366; x=1677635566; bh=t8ba9x0niSZ3DBW560YD0I1sdX9oUwMvTOdYjHuxctM=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=UJOV7vgeQ8NzJ/OsZHoOsVFx4Akq83Cicn4E2n9Lpi3dWiQCX4GJYj00jOYRRPKXu +d4a2B4H9udEe0/DZf+OVa6TuUKgEZS0enKZkHTMiJah2vjSw8x7zeEisVHVk1MqwD oeo+rnV/wmIxzar2ynkviBETLhd9prJ8thDEJCU768edARGiUvMXHvl0QRK9YxZYRj 6E7TF4XLf5WqPnJarRQN6oRDLM3BNsGIkN8ubhLO3/3t77+asnsT1+UlMBBY4GBpS9 8HgsYGbVy/xy2lcdrlCj9jutjFkcNBItFpWhxEsox/rf7hnKzNA3n1hdn/ZKKRXl0A L6/iNmr7PBsag== To: emacs-orgmode@gnu.org From: gnuric@pm.me Subject: Have export treat file: paths in INCLUDED file relative to the INCLUDING file's dir Message-ID: <87h6v9gpno.fsf@pm.me> Feedback-ID: 29982984:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.131; envelope-from=gnuric@pm.me; helo=mail-40131.protonmail.ch 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, RCVD_IN_MSPIKE_H2=-0.001, 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: X-Migadu-Queue-Id: 853D3B754 X-Spam-Score: -11.27 X-Migadu-Spam-Score: -11.27 X-Migadu-Scanner: scn0.migadu.com 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: ZJquh+H5crLX Hello, I have a file s.org in ./ (current directory), which includes another file s0.org living under ./media/s/: ./s.org: #+TITLE: s #+INCLUDE: "./media/s/s0.org" ./media/s/s0.org: * s0 ** s01 file:media/s01_image.png I want the org export to html to treat the file: paths in ./media/s/s0.org with respect to the directory of the ./s.org file. In other words, I want export NOT TO TOUCH the file: paths as written included files and effectively just paste the text of s0.org verbatim in s.org (basically similar to what #include directive in C preprocessor would do, e.g.). As of now, the above s.org exports to s.html which has the file: link converted to file:///home/user/media/s/media/s01_image.png I want that link to instead become file:///home/user/media/s01_image.png which used to be the default behavior in a previous version of Org mode (I don't recall which one). Is there a flag that could be passed to #+INCLUDE: to change the 'relativeness' of the link treatment when it comes to #+INCLUDE: directives? I see in ox.el, (defun org-export-expand-include-keyword (&optional included dir footnotes) "Expand every include keyword in buffer. Optional argument INCLUDED is a list of included file names along with their line restriction, when appropriate. It is used to avoid infinite recursion. Optional argument DIR is the current working directory. It is used to properly resolve relative paths. Optional argument FOOTNOTES is a hash-table used for storing and resolving footnotes. It is created automatically." Is this DIR what's needed (to be given to #+INCLUDE: with a flag) to change the link translation behavior? Org mode version 9.4.4 (release_9.4.4) GNU Emacs 27.2 Thanks, Omid