From ea4cfcb425808c83fb03f951aaf16aaa4418816c Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 2 Jan 2006 01:05:13 +0000 Subject: [PATCH] muse-wiki: Allow interwiki links to use different base URLs. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): If :base-url is defined for the remote style, use it instead of file-relative-name to resolve the path. Thanks to Justin Kirby for the idea. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-337 --- ChangeLog | 15 +++++++++++++++ lisp/muse-wiki.el | 16 ++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a4b93a..279ddd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,21 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2006-01-02 01:05:13 GMT Michael Olson patch-337 + + Summary: + muse-wiki: Allow interwiki links to use different base URLs. + Revision: + muse--main--1.0--patch-337 + + * lisp/muse-wiki.el (muse-wiki-resolve-project-page): If :base-url is + defined for the remote style, use it instead of file-relative-name to + resolve the path. Thanks to Justin Kirby for the idea. + + modified files: + ChangeLog lisp/muse-wiki.el + + 2006-01-01 19:15:02 GMT Michael Olson patch-336 Summary: diff --git a/lisp/muse-wiki.el b/lisp/muse-wiki.el index e3f5280..d099bc6 100644 --- a/lisp/muse-wiki.el +++ b/lisp/muse-wiki.el @@ -163,12 +163,16 @@ style and ignore the others." (muse-current-file) (cddr (muse-project-of-file)))))) (cond ((and remote-style local-style muse-publishing-p) - (muse-publish-link-file - (file-relative-name (expand-file-name - page (muse-style-element :path remote-style)) - (expand-file-name - (muse-style-element :path local-style))) - nil remote-style)) + (let ((prefix (muse-style-element :base-url remote-style))) + (muse-publish-link-file + (if prefix + (concat prefix page) + (file-relative-name (expand-file-name + page + (muse-style-element :path remote-style)) + (expand-file-name + (muse-style-element :path local-style)))) + nil remote-style))) ((not muse-publishing-p) (if page-path page-path -- 2.11.4.GIT