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 ms9.migadu.com with LMTPS id yAWXMakDjmQHSgEASxT56A (envelope-from ) for ; Sat, 17 Jun 2023 21:04:09 +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 JlJ9MakDjmQqOQEAauVa8A (envelope-from ) for ; Sat, 17 Jun 2023 21:04:09 +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 65A673A458 for ; Sat, 17 Jun 2023 21:04:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAbCd-00084y-GC; Sat, 17 Jun 2023 15:03:15 -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 1qAbCZ-00083R-H7 for emacs-orgmode@gnu.org; Sat, 17 Jun 2023 15:03:11 -0400 Received: from ms11p00im-qufo17281701.me.com ([17.58.38.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAbCX-0004ir-Ls for emacs-orgmode@gnu.org; Sat, 17 Jun 2023 15:03:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akirakyle.com; s=sig1; t=1687028588; bh=4E6hvfZWSWhpfRnPCgw20XE2loWf3c+XcJGLHgcFdzA=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=IRclQnl+SXb4jq7DIqq+WdbCMR7vrBxzb/GAHODs9rQ60NXMX1XY3gJ0DlR3z1UhC VyYc+feuEhZswCbkdNHGeEys82unlaX0NPQ9ghwkQcbc+SkfxdygwCAO5VCGllkkzN Q1iT+HbCydFbdhnf3gBWRisJVuC5dmrCxLche/d/vi0zlLZPO9J6ee4hfEFfhKd9FV C9cLzOzsPSDraCZostgREmvWC3nFw65zD8UGpn5LpUx+9I6CIch6QgTjBX8PwrGlJ6 ZL7PocJOkgr80kWUZwaSsInwT4Lw2dwaAIZgxgSTzex0gVV//2aVPUXrEAwCLoeSse RWaNrRHgJuhSg== Received: from aMac (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17281701.me.com (Postfix) with ESMTPSA id A8BE074257F for ; Sat, 17 Jun 2023 19:03:07 +0000 (UTC) User-agent: mu4e 1.10.3; emacs 29.0.91 From: Akira Kyle To: emacs-orgmode@gnu.org Subject: [PATCH] ox-html.el: Fix relative links with :html-link-use-abs-url Date: Sat, 17 Jun 2023 13:01:06 -0600 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Proofpoint-GUID: UW4rHqa1Kvb0sZiCB3IPRvVooe2K8SGz X-Proofpoint-ORIG-GUID: UW4rHqa1Kvb0sZiCB3IPRvVooe2K8SGz X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1030 bulkscore=0 mlxlogscore=519 mlxscore=0 adultscore=0 malwarescore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2306170178 Received-SPF: pass client-ip=17.58.38.54; envelope-from=akira@akirakyle.com; helo=ms11p00im-qufo17281701.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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=1687028649; a=rsa-sha256; cv=none; b=QldmwKd6Tznu9Tr6b38e/Hx5NhQHJs02TbYx4u4Fvj8g3I1Ju+U41PcOSXKZbT24AuJN8l cGN6hUDaajuMXRtygDRfPDM9Yh/E2rj9HiF5aIgXKy17hs01VdtvwnvGz9Z6ucnN2EYIQA 4gvuCMM7ah0nDambZFebVNDt/6uci8zJ7HR82pUXxhWGec+M3MmRFTQlhLrSEltWpCmF+0 EGpdn/3+7PwiIaQ3X/f/9jkUh5NVZma7JpJCLezPEDoyC2eJjf5LbYrWbHFVmOb6GZuWAE bwpFN2qvPokyPitzx7AfRPEDPA1Lo9qX+gulBrfyJMVLDBy45P2DS6JRSwhSQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=akirakyle.com header.s=sig1 header.b=IRclQnl+; dmarc=none; 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=1687028649; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4E6hvfZWSWhpfRnPCgw20XE2loWf3c+XcJGLHgcFdzA=; b=s7XFSjUPm6iBi7veGPDA4iv1khzhYxwVAeDOh4BkAFmSIPR1Fax92vEvIbujc484iwRn0l gOL6vCT0uF01VUDQiG1fIdarxsOfMGOqvCUo4bWZybaneBGcLh8EzigyvM2pV3u7gwiNdt 5N+Qz8+0ZM7K3jxsVZbZJO63GOdZciiGc50HSI7Bp/BjKqtL8DL8gFE8SAPORBZOJmiyH1 sYXWIUn9UZmqfzwGM/XcfJBLkwWj7wFI3X10Go4pbpByaW2d2zD0zRkLfoAptd2N+KfDZ5 rRDw4qrOs7/oXTqRk2Wx1j7hqwWPdUSW5pEZuwOj9HeSSr2y6l/jV9aLNQ96AQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=akirakyle.com header.s=sig1 header.b=IRclQnl+; dmarc=none; 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: -8.03 X-Spam-Score: -8.03 X-Migadu-Queue-Id: 65A673A458 X-TUID: QKcTlov/hx5A --=-=-= Content-Type: text/plain; format=flowed I'm pretty sure this fixes a bug and that the intended behavior is that when publishing with, say, ~:html-link-use-abs-url t~ and ~:html-link-home mysite.com~, one would expect a link like ~[[file:my/page.org]]~ to be exported to ~mysite.com/my/page.com~. I may have have misunderstood something though. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-html-link-Fix-relative-links-with-html-link-use-.patch >From e9b8b782dbf956c855e2e3cdec5b9e8aa47d47c1 Mon Sep 17 00:00:00 2001 From: Akira Kyle Date: Mon, 27 Feb 2023 12:12:32 -0700 Subject: [PATCH] org-html-link: Fix relative links with :html-link-use-abs-url * lisp/ox-html.el (org-html-link): When publishing relative links with both :html-link-use-abs-url and :html-link-home, ensure the correct link is constructed. --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index b519402b1..27da1cc30 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -3227,7 +3227,7 @@ INFO is a plist holding contextual information. See (org-trim (plist-get info :html-link-home))))) (when (and home (plist-get info :html-link-use-abs-url) - (file-name-absolute-p raw-path)) + (not (file-name-absolute-p raw-path))) (setq raw-path (concat (file-name-as-directory home) raw-path)))) ;; Maybe turn ".org" into ".html". (setq raw-path (funcall link-org-files-as-html-maybe raw-path info)) -- 2.41.0 --=-=-=--