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

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

[emacs-wiki-discuss] Re: A problem with publishing.


From: Michael Olson
Subject: [emacs-wiki-discuss] Re: A problem with publishing.
Date: Fri, 28 Oct 2005 13:11:05 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Andrea Riciputi <address@hidden> writes:

> I've recently updated emacs-wiki on my system from version 2.68 to
> 2.70, and I've noticed that every time I publish a wiki document the
> resulting html file is opened inside emacs. Since I use emacs from
> the terminal this behaviour is not very usefull, and I was wondering
> if it'd be possible to disable it. Looking into the manual didn't
> help.

I've used the following work-around in my init file for emacs-wiki.

;; COMPLETELY disable text mode hooks while publishing.  For some
;; reason, a user of an obscure version of (X)Emacs had a problem with
;; my solution, which actually worked, unlike the current version of
;; this in `emacs-wiki-publish.el'.
(defun emacs-wiki-publish (&optional arg)
  "Publish all wikis that need publishing.
If the published wiki already exists, it is only overwritten if
the wiki is newer than the published copy.

When given the optional argument ARG, all wikis are rewritten, no
matter how recent they are.  The index file is rewritten no
matter what."
  (interactive "P")
  ;; prompt to save any emacs-wiki buffers
  (save-some-buffers nil (lambda ()
                           (derived-mode-p 'emacs-wiki-mode)))
  (let ((emacs-wiki-project emacs-wiki-current-project)
        (text-mode-hook nil))
    (emacs-wiki-refresh-file-alist)
    (let* ((names (emacs-wiki-file-alist))
           (files (list t))
           (lfiles files)
           ;; disable hooks
           (emacs-wiki-mode-hook nil))
      (while names
        (setcdr lfiles (cons (cdar names) nil))
        (setq lfiles (cdr lfiles)
              names (cdr names)))
      (if (emacs-wiki-publish-files (cdr files) arg)
          (progn
            (run-hooks 'emacs-wiki-after-wiki-publish-hook)
            (message "All Wiki pages%s have been published."
                     (if emacs-wiki-current-project
                         (concat " for project "
                                 emacs-wiki-current-project)
                       "")))
        (message "No Wiki pages%s need publishing at this time."
                 (if emacs-wiki-current-project
                     (concat " in project "
                             emacs-wiki-current-project)
                   ""))))))

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: anime, Debian, XHTML, wiki, Emacs Lisp
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
 |_] | \| |_| Jabber: mwolson_at_hcoop.net

Attachment: pgphAEshcfCZm.pgp
Description: PGP signature


reply via email to

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