emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Report on emacs-wiki interwiki breakage


From: Mark Triggs
Subject: Re: [emacs-wiki-discuss] Report on emacs-wiki interwiki breakage
Date: Sat, 21 Aug 2004 22:58:31 +1000
User-agent: No Gnus v0.3

Michael Olson <address@hidden> writes:

> The problems:
>

[...]

> - Interwiki links don't highlight correctly.

I've attached a patch against emacs-wiki--dev--1.0--patch-63 that fixes
that problem (at least, for me ;o).  It looks like the problem was
introduced in emacs-wiki--dev--patch-50.

Take care,

Mark

-- 
Mark Triggs
<address@hidden>

diff -ru emacs-wiki--dev--1.0--patch-63/emacs-wiki.el 
emacs-wiki--dev--1.0--patch-63-mst/emacs-wiki.el
--- emacs-wiki--dev--1.0--patch-63/emacs-wiki.el        2004-08-21 
22:52:43.000000000 +1000
+++ emacs-wiki--dev--1.0--patch-63-mst/emacs-wiki.el    2004-08-21 
22:54:22.000000000 +1000
@@ -4067,30 +4067,30 @@
          (file-relative-name dest src))))
 
 (defun emacs-wiki-project-interwiki-link (project tag)
-  (let ((page-publishing-directory
-         (file-name-directory
-          (concat emacs-wiki-project-server-prefix
-                  (emacs-wiki-link-url (emacs-wiki-page-name))))))
-    (with-emacs-wiki-project project
-      (if emacs-wiki-publishing-p
-          (let ((url (emacs-wiki-link-url (or tag emacs-wiki-home-page))))
-            (cond
-             ;; bad link, no prefix will be added
-             ((null url) "")
-             ;; try and convert to a relative link
-             ((and emacs-wiki-relative-links
-                   ;; without catching extended links by mistake
-                   (not (string-match "\\[\\[[^][]+\\(\\]\\[[^][]+\\)?\\]\\]"
-                                      url))
-                   (emacs-wiki-relative-link-maybe
-                    (concat emacs-wiki-project-server-prefix url)
-                    page-publishing-directory)))
-             ;; use the server prefix
-             ((concat emacs-wiki-project-server-prefix url))))
-        (or (emacs-wiki-page-file (or tag emacs-wiki-home-page))
-            ;; doesn't yet exist, so we don't qualify the name, causing it
-            ;; to be rendered as a bad link
-            tag)))))
+  (with-emacs-wiki-project project
+    (if emacs-wiki-publishing-p
+        (let ((page-publishing-directory
+               (file-name-directory
+                (concat emacs-wiki-project-server-prefix
+                        (emacs-wiki-link-url (emacs-wiki-page-name)))))
+              ((url (emacs-wiki-link-url (or tag emacs-wiki-home-page)))))
+          (cond
+           ;; bad link, no prefix will be added
+           ((null url) "")
+           ;; try and convert to a relative link
+           ((and emacs-wiki-relative-links
+                 ;; without catching extended links by mistake
+                 (not (string-match "\\[\\[[^][]+\\(\\]\\[[^][]+\\)?\\]\\]"
+                                    url))
+                 (emacs-wiki-relative-link-maybe
+                  (concat emacs-wiki-project-server-prefix url)
+                  page-publishing-directory)))
+           ;; use the server prefix
+           ((concat emacs-wiki-project-server-prefix url))))
+      (or (emacs-wiki-page-file (or tag emacs-wiki-home-page))
+          ;; doesn't yet exist, so we don't qualify the name, causing it
+          ;; to be rendered as a bad link
+          tag))))
 
 ;; URLs
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]