Re: [PATCH] ox-html.el: Fix relative links with :html-link-use-abs-url

2023-07-10 Thread Ihor Radchenko
Akira Kyle  writes:

> 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

Applied, onto main, adding TINYCHANGE cookie to the commit message.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8fa7f0279

You are now listed as Org contributor.
https://git.sr.ht/~bzg/worg/commit/faf027f8

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] ox-html.el: Fix relative links with :html-link-use-abs-url

2023-06-18 Thread Ihor Radchenko
Akira Kyle  writes:

> 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~.
> ...
> -  (file-name-absolute-p raw-path))
> +  (not (file-name-absolute-p raw-path)))

Looks right.
Would you mind also adding a test to testing/lisp/text-ox-html.el ?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[PATCH] ox-html.el: Fix relative links with :html-link-use-abs-url

2023-06-17 Thread Akira Kyle


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.

>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