Trouble with publishing Wiki

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble with publishing Wiki

Xingang Zhang

Hello there,

I am a newbie to emacs-wiki. I have installed and configured
emacs-wiki following some websites. Everything seems fine. But when I
tried to publish a trial wiki page on my own hard drive. it always
complains like:

Warning (emacs-wiki): Emacs/WelcomePage: Error evaluating
                (concat
                 (and (emacs-wiki-page-file emacs-wiki-default-page t)
                      (not (emacs-wiki-private-p emacs-wiki-default-page))
                      (concat
                       (emacs-wiki-link-href emacs-wiki-default-page "Home")
                       " / "))
                 (emacs-wiki-link-href emacs-wiki-index-page "Index")
                 (and (emacs-wiki-page-file "ChangeLog" t)
                      (not (emacs-wiki-private-p "ChangeLog"))
                      (concat
                       " / "
                       (emacs-wiki-link-href "ChangeLog" "Changes"))))
              : (wrong-number-of-arguments #[(target old new) \303
#\207 [old new target replace-regexp-in-string] 4] 4)


The WelcomePage.html is generated. but missing the footer
(i.e. Home/Index/ChangeLog) part. Could anybody help me to locate the
problem? Below is my init file:

;;
;; configuration file to load the emacs Wiki for journaling
;; note: most of this part is copied from websites. Used at your
;; own risk.
;;

;; first off, load the emacs-wiki, and other required packages
(require 'emacs-wiki)
(require 'emacs-wiki-project)
(require 'emacs-wiki-menu)
(require 'emacs-wiki-srctag)
(require 'emacs-wiki-table)

;; add the key-binding for emacs-wiki
(add-hook 'emacs-wiki-mode-hook
          (lambda ()
            (define-key emacs-wiki-mode-map (kbd "C-c C-h") 'emacs-wiki-preview-html)
            (define-key emacs-wiki-mode-map (kbd "C-c C-c") 'emacs-wiki-preview-source)
            (define-key emacs-wiki-mode-map (kbd "C-c C-v") 'emacs-wiki-change-project)

))

;; set up the default browser for your preview
(setq browse-url-generic-program "firefox")

(defun emacs-wiki-preview-source ()
  (interactive)
  (emacs-wiki-publish-this-page)
  (find-file (emacs-wiki-published-file)))

(defun emacs-wiki-preview-html ()
  (interactive)
  (emacs-wiki-publish-this-page)
  (browse-url-generic (emacs-wiki-published-file)))

;; set the homepage
;; (setq emacs-wiki-home-page "~/Wiki/publish/Default/WelcomePage.html")

(setq emacs-wiki-inline-relative-to 'emacs-wiki-publishing-directory)

;; to publish for multiple projects
(setq emacs-wiki-projects
      '(("Default" . ((emacs-wiki-directories . ("~/Wiki/draft/Default"))
                      (emacs-wiki-publishing-directory
                      . "~/Wiki/publish/Default")
;;                      (emacs-wiki-default-page . "../Default/WelcomePage")
                      ))
        ("Emacs" . ((emacs-wiki-directories . ("~/Wiki/draft/Emacs"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Emacs")
;;                    (emacs-wiki-default-page . "../Emacs/WelcomePage")
                    ))
        ("Programming" . ((emacs-wiki-directories . ("~/Wiki/draft/Programming"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Programming")
;;                    (emacs-wiki-default-page . "../Programming/WelcomePage")
                    ))
        ("Computer" . ((emacs-wiki-directories . ("~/Wiki/draft/Computer"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Computer")
;;                    (emacs-wiki-default-page . "../Computer/WelcomePage")
                    ))
        ("Reading" . ((emacs-wiki-directories . ("~/Wiki/draft/Reading"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Reading")
;;                    (emacs-wiki-default-page . "../Reading/WelcomePage")
                    ))
        ("Linux" . ((emacs-wiki-directories . ("~/Wiki/draft/Linux"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Linux")
;;                    (emacs-wiki-default-page . "../Linux/WelcomePage")
                    ))
        ("Optics" . ((emacs-wiki-directories . ("~/Wiki/draft/Optics"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Optics")
;;                    (emacs-wiki-default-page . "../Optics/WelcomePage")
                    ))
        ("Others" . ((emacs-wiki-directories . ("~/Wiki/draft/Others"))
                    (emacs-wiki-publishing-directory . "~/Wiki/publish/Others")
;;                    (emacs-wiki-default-page . "../Others/WelcomePage")
                    ))
))

(setq emacs-wiki-menu-factory 'emacs-wiki-menu-make-from-list)
(setq emacs-wiki-menu-definition '(("Default" "../Default/WelcomePage.html" "Default Wiki Page")
                                   ("Emacs" "../Emacs/WelcomePage.html" "Emacs Tips or Tricks")
                                   ("Programming" "../Programming/WelcomePage.html" "Programming Hacks")
                                   ("Computer" "../Computer/WelcomePage.html" "Computer Stuffs")
                                   ("Reading" "../Reading/WelcomePage.html" "General Reading")
                                   ("Linux" "../Linux/WelcomePage.html" "Happy Penguin")
                                   ("Optics" "../Optics/WelcomePage.html" "Let Light Shine")
                                   ("Others" "../Others/WelcomePage.html" "Collections")))


;; use the interlink between different projects
(setq emacs-wiki-interwiki-names
      '(("Default" .
         (lambda (tag)
           (concat "../Default/" tag ".html")))
        ("Emacs" .
         (lambda (tag)
           (concat "../Emacs/" tag ".html")))
        ("Programming" .
         (lambda (tag)
           (concat "../Programming/" tag ".html")))
        ("Computer" .
         (lambda (tag)
           (concat "../Computer/" tag ".html")))
        ("Reading" .
         (lambda (tag)
           (concat "../Reading/" tag ".html")))
        ("Linux" .
         (lambda (tag)
           (concat "../Linux/" tag ".html")))
        ("Optics" .
         (lambda (tag)
           (concat "../Optics/" tag ".html")))
        ("Others" .
         (lambda (tag)
           (concat "../Others/" tag ".html")))))

;; autload the outline-minor-mode
(add-hook 'emacs-wiki-mode-hook
          (function (lambda()
                      (outline-minor-mode))))

;; emacs wiki index page
(setq emacs-wiki-index-page "WikiIndex.html")

;; use the common.css from mwolson's webpage
;; (setq emacs-wiki-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" href=\"~/elisp/common.css\">")
(setq emacs-wiki-maintainer "mailto:[hidden email]")

;; customization

(custom-set-variables
 '(emacs-wiki-charset-default "utf-8")
 '(emacs-wiki-coding-default (quote utf-8))
 )
(custom-set-faces)

;; automatically publish code while saving
;; thanks sacha for this convenience.

(add-hook 'emacs-wiki-after-wiki-publish-hook 'emacs-wiki-publish-index)

;;;_+ Automatically publish files upon saving
(defun sacha-emacs-wiki-auto-publish ()
  (when (derived-mode-p 'emacs-wiki-mode)
    (unless emacs-wiki-publishing-p
      (let ((emacs-wiki-publishing-p t)
            (emacs-wiki-after-wiki-publish-hook nil))
        (emacs-wiki-publish-this-page)
;;        (emacs-wiki-publish-index)
        ))))

(add-hook 'emacs-wiki-mode-hook
          (lambda () (add-hook 'after-save-hook
                               'sacha-emacs-wiki-auto-publish nil t)))


--




_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with publishing Wiki

Xingang Zhang

I found the problem via some google search. It's something related to
the color-theme.el. Comment out the following code from the
color-theme.el will eliminate the warning message:

;; Add this since it appears to miss in emacs-2x
(or (fboundp 'replace-in-string)
    (defun replace-in-string (target old new)
      (replace-regexp-in-string old new  target)))

I am wondering if there is anybody maintain the color-theme anymore?
It causes a lot of headache to the Emacs 23 user. I guess I will dump
it later. But for now, the color for Emacs 22 or 23 is too pale for
me.


--
Xingang Zhang
174 Wymount Terrace
Provo, UT 84604



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with publishing Wiki

John Sullivan-2
In reply to this post by Xingang Zhang
Xingang Zhang <[hidden email]> writes:

> Hello there,
>
> I am a newbie to emacs-wiki. I have installed and configured
> emacs-wiki following some websites. Everything seems fine. But when I
> tried to publish a trial wiki page on my own hard drive. it always
> complains like:
>

You might want to try Muse instead. It is the replacement for emacs-wiki.

The new mailing lists are [hidden email] and
[hidden email].

You can read about Muse at <http://www.emacswiki.org/wiki/EmacsMuse>.

--
John Sullivan
Emacs Planner Maintainer
http://www.wjsullivan.net/PlannerMode.html
GPG Key: AE8600B6


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with publishing Wiki

Xiaodong Xu
In reply to this post by Xingang Zhang
Some emacs extensions conflict with emacs-wiki, even muse, e.g.
wb-line-number.el which is used to show line numbers.

--
.:: http://tsid.prgmr.com/wiki ::.
.:: http://stid.blogchina.com ::.



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss