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

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

[emacs-wiki-discuss] [Bug] InterWiki links and C-c C-e (was Re: Files un


From: Yamagata Yoriyuki
Subject: [emacs-wiki-discuss] [Bug] InterWiki links and C-c C-e (was Re: Files under DeaultProject)
Date: Sat, 04 Jun 2005 22:19:38 +0900 (JST)

From: Yamagata Yoriyuki <address@hidden>
Subject: Re: [emacs-wiki-discuss] Files under DeaultProject
Date: Wed, 01 Jun 2005 23:10:49 +0900 (JST)

> Ughh...  Now InterWiki links between projects do not work.
> 
> Is there someone who experiences similar problems?  Do InterWiki links
> work for everyone else?

I think I have found the cause.  There is a bug (or feature, I do not
know) in the "emacs-wiki-edit-link-at-point".  The problem above only
occurs when the link is edited by "emacs-wiki-edit-link-at-point".

The description of the problem is the following.

"emacs-wiki-edit-link-at-point" creates the new link by
"emacs-wiki-make-link".  "emacs-wiki-make-link" pre-processes the link
by "emacs-wiki-wiki-link-target", which translates inter-wiki links
using "emacs-wiki-interwiki-names".

For inter-projects inter-wiki links,
"emacs-wiki-project-interwiki-link" is used for translation.  Since
"emacs-wiki-publishing-p" is nil in this case,
"emacs-wiki-project-interwiki-link" returns an absolute path to the
link target.

Thus, after editing links by "emacs-wiki-edit-link-at-point", link
targets are referred by their absolute location, not by inter-wiki
names.  During publishing, this causes that links are not properly
adjusted for the server-side configuration, and causes broken links.

In addition to this problem, putting absolute locations during edit
is, in my opinion, not good idea, because changing the location of
outer-Wiki becomes difficult.

Quick fix is commenting out the following line.

(defun emacs-wiki-make-link (link &optional name)
  "Return a Wiki link to LINK with NAME as the text."
  (let ((case-fold-search nil))
    (unless name
      (setq name (emacs-wiki-wiki-visible-name link)))
;;    (setq link (emacs-wiki-wiki-link-target link)) <- here
    (when (equal name link)
      (setq name nil))

--
Yamagata Yoriyuki







reply via email to

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