;; -*- emacs-lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; $Id: emacs_wiki.el,v 1.3 2006-11-06 21:02:42 rscholz Exp $
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Einstellungen für den Emacs-Wiki-Mode
;;
;; Die offizielle Quelle dieser Datei ist
;;   <http://www.zonix.de/projects/emacs/config>
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; emacs-wiki                               <URL:http://repose.cx/emacs/wiki>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; emacs-wiki nutzt table.el für schönere HTML-Tabellen
(require 'table)

;; Laden
(load "emacs-wiki")

(setq emacs-wiki-default-page "ZonixUniverse")
(setq emacs-wiki-home-page emacs-wiki-default-page)

(setq emacs-wiki-directories '("~/xxx/wiki"))
(setq emacs-wiki-publishing-directory "~/www/zonix.de/universe")

(setq emacs-wiki-footer-date-format "%d.%m.%Y")

;; Style-Sheet für generierte Seiten
(setq emacs-wiki-style-sheet "<style type=\"text/css\">
a {
  color: #FFCC00;
}

a:visited {
  color: #A0A0A0;
}

a.nonexistent {
  font-weight: bold;
  color: #FF2222;
}

a.nonexistent:visited {
  color: #FF2222;
}

body {
  background: #000000; color: #EEEEEE;
  margin-left: 5%; margin-right: 5%;
  margin-top: 3%
}

em { font-style: italic; }
strong { font-weight: bold }

ul { list-style-type: disc }

dl.contents { margin-top: 0 }
dt.contents { margin-bottom: 0 }

p.verse {
  white-space: pre;
  margin-left: 5%
}

pre {
  white-space: pre;
  font-family: monospace;
  margin-left: 5%
}

h1 {
  padding: 5px;
  background: #333333; color: #EEEEEE;
}

div.wikicontent {
  margin-top: 5px;
  padding: 5px;
  background: #333333; color: #EEEEEE;
}

div.navfoot {
  margin-top: 5px;
  padding: 5px;
  background: #333333; color: #EEEEEE;
}

</style>")


;; Header jeder generierten Seite
(setq emacs-wiki-publishing-header
  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">
<html>
  <head>
    <title><lisp>(emacs-wiki-page-title)</lisp></title>
    <meta name=\"generator\" content=\"emacs-wiki.el\">
    <meta http-equiv=\"<lisp>emacs-wiki-meta-http-equiv</lisp>\"
          content=\"<lisp>emacs-wiki-meta-content</lisp>\">
    <link rev=\"made\" href=\"<lisp>emacs-wiki-maintainer</lisp>\">
    <link rel=\"home\" href=\"<lisp>(emacs-wiki-published-name
                                     emacs-wiki-home-page)</lisp>\">
    <link rel=\"index\" href=\"<lisp>(emacs-wiki-published-name
                                      emacs-wiki-index-page)</lisp>\">
    <lisp>emacs-wiki-style-sheet</lisp>
  </head>
  <body>
    <div class=\"head\">
    <table width=\"100%\"  border=\"0\" summary=\"Header\">
    <tr><td width=\"100%\"><h1><lisp>(emacs-wiki-page-title)</lisp></h1></td>
    <td align=left><a href=\"../index.html\"><img src=\"../img/menu/main.jpg\" alt=\"Logo\" border=0></a></td>
    </tr></table>
    </div>
    <div class=\"wikicontent\">
    <!-- Page published by Emacs Wiki begins here -->\n")

;; Footer jeder generierten Seite
(setq emacs-wiki-publishing-footer
  "
    <!-- Page published by Emacs Wiki ends here -->
    </div>
    <div class=\"navfoot\">
      <table width=\"100%\" border=\"0\" summary=\"Footer navigation\">
        <tr>
          <td width=\"33%\" align=\"left\">
            <lisp>
              (if buffer-file-name
                  (concat
                   \"<span class=\\\"footdate\\\">Zuletzt ge&auml;ndert: \"
                   (format-time-string emacs-wiki-footer-date-format
                    (nth 5 (file-attributes buffer-file-name)))
                   (and emacs-wiki-serving-p
                        (emacs-wiki-editable-p (emacs-wiki-page-name))
                        (concat
                         \" / \"
                         (emacs-wiki-link-href
                          (concat \"editwiki?\" (emacs-wiki-page-name))
                          \"Edit\")))
                   \"</span>\"))
            </lisp>
          </td>
          <td width=\"34%\" align=\"left\">
            <span class=\"foothome\">
              <lisp>
                (concat
                 (and (emacs-wiki-page-file emacs-wiki-home-page t)
                      (not (emacs-wiki-private-p emacs-wiki-home-page))
                      (concat
                       (emacs-wiki-link-href emacs-wiki-home-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\" \"&Auml;nderungen\"))))
              </lisp>
            </span>
          </td>
          <td width=\"33%\" align=\"right\">
            <lisp>
              (if emacs-wiki-serving-p
                  (concat
                   \"<span class=\\\"footfeed\\\">\"
                   (emacs-wiki-link-href \"searchwiki?get\" \"Search\")
                   (and buffer-file-name
                        (concat
                         \" / \"
                         (emacs-wiki-link-href
                          (concat \"searchwiki?q=\" (emacs-wiki-page-name))
                          \"Referrers\")))
                   \"</span>\"))
            </lisp>
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>\n")


;; Alex Reinwarth:
;; (require 'emacs-wiki)

;; (setq emacs-wiki-default-page "index")
;; (setq emacs-wiki-home-page "index")
;; (setq emacs-wiki-index-page "SiteIndex")
;; (setq emacs-wiki-maintainer "webmaster@reinwarth.com")
;; (setq emacs-wiki-publishing-directory "~/public_html")
;; (setq emacs-wiki-directories '("~/documents/Wikis/ReinwarthCom"))
;; (setq emacs-wiki-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" href=\"are.css\">")
;; (setq emacs-wiki-table-attributes "border=\"0\"")
;; (setq emacs-wiki-footer-date-format "%d.%m.%y")


;; (setq emacs-wiki-publishing-header
;;   "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">
;; <html>
;;   <head>
;;     <title><lisp>(emacs-wiki-page-title)</lisp></title>
;;     <meta name=\"generator\" content=\"emacs-wiki.el\">
;;     <meta http-equiv=\"<lisp>emacs-wiki-meta-http-equiv</lisp>\"
;;        content=\"<lisp>emacs-wiki-meta-content</lisp>\">
;;     <link rev=\"made\" href=\"<lisp>emacs-wiki-maintainer</lisp>\">
;;     <link rel=\"home\" href=\"<lisp>(emacs-wiki-published-name
;;                                   emacs-wiki-home-page)</lisp>\">
;;     <link rel=\"index\" href=\"<lisp>(emacs-wiki-published-name
;;                                    emacs-wiki-index-page)</lisp>\">
;;     <lisp>emacs-wiki-style-sheet</lisp>
;;   </head>
;;   <body>
;;     <h1><lisp>(emacs-wiki-page-title)</lisp></h1>
;; <table summary=\"main table\" border=\"0\">
;; <tr>
;; <td valign=\"top\">
;; <lisp>(insert-file \"MenuBar\")</lisp>
;; </td>
;; <td>&nbsp;</td>
;; <td>
;; <!-- Page published by Emacs Wiki begins here -->\n")
;; ;;   <tr><td><lisp>
;; ;;                   (emacs-wiki-link-href \"ChangeLog\" \"&Auml;nderungen\")
;; ;;   </lisp></td></tr> 

;; (setq emacs-wiki-publishing-footer
;;   " <!-- Page published by Emacs Wiki ends here -->
;;     </td></tr></table>
;;     <div class=\"navfoot\">

;;       <table width=\"100%\"  border=\"0\" summary=\"Footer navigation\">
;;      <tr>
;;        <td align=\"right\">
;;          <lisp>
;;            (if buffer-file-name
;;                (concat
;;                 \"<span class=\\\"footdate\\\"> \"
;;                   (emacs-wiki-link-href \"ChangeLog\" \"Letzte &Auml;nderung: \")

;;                 (format-time-string emacs-wiki-footer-date-format
;;                  (nth 5 (file-attributes buffer-file-name)))
;;                 (and emacs-wiki-serving-p
;;                      (emacs-wiki-editable-p (emacs-wiki-page-name))
;;                      (concat
;;                       \" / \"
;;                       (emacs-wiki-link-href
;;                        (concat \"editwiki?\" (emacs-wiki-page-name))
;;                        \"Edit\")))
;;                 \"</span>\"))
;;          </lisp>
;;        </td>
;;      </tr>
;;       </table>

;;     </div>
;;   </body>
;; </html>\n")

;; (setq emacs-wiki-publishing-markup 
;; (list
;;    ;; change the displayed title or the stylesheet for a given page
;;    ["\\`#\\(title\\|style\\)\\s-+\\(.+\\)\n+" 0
;;     emacs-wiki-markup-initial-directives]

;;    ;; process any markup tags
;;    [emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags]

;;    ;; emphasized or literal text
;;    ["\\(^\\|[-[ \t\n<('`\"]\\)\\(=[^= \t\n]\\|_[^_ \t\n]\\|\\*+[^* \t\n]\\)"
;;     2 emacs-wiki-markup-word]

;;    ;; headings, outline-mode style
;;    ["^\\(\\*+\\)\\s-+" 0 emacs-wiki-markup-heading]

;;    ;; define anchor points
;;    ["^#\\([A-Za-z0-9_%]+\\)\\s-*" 0 emacs-wiki-markup-anchor]

;;    ;; horizontal rule, or section separator
;;    ["^----+" 0 "<hr>"]

;; ["ä" 0 "&auml;"]
;; ["ö" 0 "&ouml;"]
;; ["ü" 0 "&uuml;"]

;; ["Ä" 0 "&Auml;"]
;; ["Ö" 0 "&Ouml;"]
;; ["Ü" 0 "&Uuml;"]

;; ["ß" 0 "&szlig;"]

;; ;["<" 0 "&lt;"]
;; ;[">" 0 "&gt;"]

;;    ;; footnotes section is separated by a horizontal rule in HTML
;;    ["^\\(\\* \\)?Footnotes:?\\s-*" 0 "<hr>\n<p>\n"]
;;    ;; footnote definition/reference (def if at beginning of line)
;;    ["\\[\\([1-9][0-9]*\\)\\]" 0 emacs-wiki-markup-footnote]

;;    ;; don't require newlines between numbered and unnumbered lists.
;;    ;; This must come before paragraphs are calculated, so that any
;;    ;; extra newlines added will be condensed.
;;    ["^\\s-*\\(-\\|[0-9]+\\.\\)" 1 "\n\\1"]

;;    ;; the beginning of the buffer begins the first paragraph
;;    ["\\`\n*" 0 "<p>\n"]
;;    ;; plain paragraph separator
;;    ["\n\\([ \t]*\n\\)+" 0 "\n\n</p>\n\n<p>\n"]

;;    ;; if table.el was loaded, allow for pretty tables.  otherwise only
;;    ;; simple table markup is supported, nothing fancy.  use | to
;;    ;; separate cells, || to separate header elements, and ||| for
;;    ;; footer elements
;;    (vector
;;     (if (featurep 'table)
;;      "^\\(\\s-*\\)\\(\\+[-+]+\\+[\n\r \t]+|\\)"
;;       "^\\s-*\\(\\([^|\n]+\\(|+\\)\\s-*\\)+\\)\\([^|\n]+\\)?$")
;;     1 'emacs-wiki-markup-table)

;;    ;; unnumbered List items begin with a -.  numbered list items
;;    ;; begin with number and a period.  definition lists have a
;;    ;; leading term separated from the body with ::.  centered
;;    ;; paragraphs begin with at least six columns of whitespace; any
;;    ;; other whitespace at the beginning indicates a blockquote.  The
;;    ;; reason all of these rules are handled here, is so that
;;    ;; blockquote detection doesn't interfere with indented list
;;    ;; members.
;;    ["^\\(\\s-*\\(-\\|[0-9]+\\.\\|\\(.+\\)[ \t]+::\n?\\)\\)?\\([ \t]+\\)" 4
;;     emacs-wiki-markup-list-or-paragraph]

;;    ;; "verse" text is indicated the same way as a quoted e-mail
;;    ;; response: "> text", where text may contain initial whitespace
;;    ;; (see below).
;;    ["<p>\\s-+> \\(\\([^\n]\n?\\)+\\)\\(\\s-*</p>\\)?" 0
;;     emacs-wiki-markup-verse]

;;    ;; join together the parts of a list
;;    ["</\\([oud]l\\)>\\s-*\\(</p>\\s-*<p>\\s-*\\)?<\\1>\\s-*" 0 ""]

;;    ;; join together the parts of a table
;;    (vector
;;     (concat "</tbody>\\s-*"
;;          "</table>\\s-*" "\\(</p>\\s-*<p>\\s-*\\)?" "<table[^>]*>\\s-*"
;;          "<tbody>\\s-*") 0 "")
;;    ["</table>\\s-*\\(</p>\\s-*<p>\\s-*\\)?<table[^>]*>\\s-*" 0 ""]

;;    ;; fixup paragraph delimiters
;;    (vector
;;     (concat "<p>\\s-*\\(</?" emacs-wiki-block-groups-regexp ">\\)") 0 "\\1")
;;    (vector (concat "\\(</?" emacs-wiki-block-groups-regexp
;;                 ">\\)\\s-*\\(</p>\\)") 3 "\\1")

;;    ;; terminate open paragraph at the end of the buffer
;;    ["<p>\\s-*\\'" 0 ""]
;;    ;; make sure to close any open text (paragraphs)
;;    ["\\([^> \t\n]\\)\\s-*\\'" 0 "\\1\n</p>"]
;;    ;; lists have no whitespace after them, so add a final linebreak
;;    ["\\(</[oud]l>\\)\\(\\s-*\\(<hr>\\|\\'\\)\\)" 0 "\\1\n<br>\\2"]

;;    ;; bare email addresses
;;    ["\\([^[]\\)\\([-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+\\)" 0
;;     "\\1<a href=\"mailto:\\2\">\\2</a>"]

;;    ;; replace WikiLinks in the buffer (links to other pages)
;;    ;; <nop> before a WikiName guards it from being replaced
;;    ;; '''' can be used to add suffixes, such as WikiName''''s
;;    [emacs-wiki-url-or-name-regexp 0 emacs-wiki-markup-link]
;;    ["''''" 0 ""]

;;    ;; insert the default publishing header
;;    (function
;;     (lambda ()
;;       (insert emacs-wiki-publishing-header)))

;;    ;; insert the default publishing footer
;;    (function
;;     (lambda ()
;;       (goto-char (point-max))
;;       (insert emacs-wiki-publishing-footer)))

;;    ;; process any remaining markup tags
;;    [emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags]))

;; (setq emacs-wiki-changelog-markup
;;   (list
;;    ["&" 0 "&amp;"]
;;    ["<" 0 "&lt;"]
;;    [">" 0 "&gt;"]

;;    ["^\\(\\S-+\\)\\s-+\\(.+\\)" 0 emacs-wiki-markup-changelog-section]

;;    ;; emphasized or literal text
;;    ["\\(^\\|[-[ \t\n<('`\"]\\)\\(=[^= \t\n]\\|_[^_ \t\n]\\|\\*+[^* \t\n]\\)"
;;     2 emacs-wiki-markup-word]

;;    ;; headings, outline-mode style
;;    ["^\\*\\s-+\\(.+\\)$" 0 "<div class=cla>\\1</div>"]

;;    ;; don't require newlines between unnumbered lists.
;;    ["^\\s-*\\(\\*\\)" 1 "\n\\1"]

;;    ;; the beginning of the buffer begins the first paragraph
;;    ["\\`\n*" 0 "<p>\n"]
;;    ;; plain paragraph separator
;;    ["\n\\([ \t]*\n\\)+" 0 "\n\n</p>\n\n<p>\n"]

;;    ;; unnumbered List items begin with a -.  numbered list items
;;    ;; begin with number and a period.  definition lists have a
;;    ;; leading term separated from the body with ::.  centered
;;    ;; paragraphs begin with at least six columns of whitespace; any
;;    ;; other whitespace at the beginning indicates a blockquote.  The
;;    ;; reason all of these rules are handled here, is so that
;;    ;; blockquote detection doesn't interfere with indented list
;;    ;; members.
;;    ["^\\(\\s-*\\(\\*\\)\\)?\\([ \t]+\\)\\(\\([^\n]\n?\\)+\\)" 3
;;     "<ul>\n<li>\\4</ul>\n"]

;;    ;; join together the parts of a list
;;    ["</\\([oud]l\\)>\\s-*\\(</p>\\s-*<p>\\s-*\\)?<\\1>\\s-*" 0 ""]

;;    ;; fixup paragraph delimiters
;;    (vector
;;     (concat "<p>\\s-*\\(</?" emacs-wiki-block-groups-regexp ">\\)") 0 "\\1")
;;    (vector (concat "\\(</?" emacs-wiki-block-groups-regexp
;;                 ">\\)\\s-*\\(</p>\\)") 3 "\\1")

;;    ;; terminate open paragraph at the end of the buffer
;;    ["<p>\\s-*\\'" 0 ""]
;;    ;; make sure to close any open text (paragraphs)
;;    ["\\([^> \t\n]\\)\\s-*\\'" 0 "\\1\n</p>"]
;;    ;; lists have no whitespace after them, so add a final linebreak
;;    ["\\(</[oud]l>\\)\\(\\s-*\\(<hr>\\|\\'\\)\\)" 0 "\\1\n<br>\\2"]

;;    ;; bare email addresses
;;    ["\\([^[]\\)\\([-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+\\)" 0
;;     "\\1<a href=\"mailto:\\2\">\\2</a>"]

;;    ;; replace WikiLinks in the buffer (links to other pages)
;;    [emacs-wiki-url-or-name-regexp 0 emacs-wiki-markup-link]
;;    ["''''" 0 ""]

;;    ;; insert the default publishing header
;;    (function
;;     (lambda ()
;;       (insert emacs-wiki-publishing-header)))

;;    ;; insert the default publishing footer
;;    (function
;;     (lambda ()
;;       (goto-char (point-max))
;;       (insert emacs-wiki-publishing-footer)))

;;    ;; process any remaining markup tags
;;    [emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags]))

;; (add-hook 'emacs-wiki-mode-hook 'footnote-mode)
;; (add-hook 'emacs-wiki-mode-hook 'flyspell-mode)

;; (set-face-foreground 'emacs-wiki-link-face "DarkGreen")
;; (set-face-foreground 'emacs-wiki-bad-link-face "firebrick")

;; (global-set-key [(control c)(control f)] 'emacs-wiki-find-file)
;; (define-key emacs-wiki-mode-map [(super tab)] 'emacs-wiki-previous-reference)
;; (define-key emacs-wiki-mode-map [(hyper tab)] 'emacs-wiki-previous-reference)