~ubuntu-branches/ubuntu/trusty/muse-el/trusty

« back to all changes in this revision

Viewing changes to examples/mwolson/muse-init.el

  • Committer: Bazaar Package Importer
  • Author(s): Michael W. Olson (GNU address)
  • Date: 2006-10-10 21:44:42 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 edgy)
  • Revision ID: james.westby@ubuntu.com-20061010214442-dwhmmh43pp8oqi4f
Tags: 3.02.8-1
* New upstream release.
* Bug fix: "muse-el: Can not activate planner-mode on Emacs 22", thanks
  to intrigeri (Closes: #391408).
* Bug fix: "muse-el: muse-http.el is not functional", thanks to Junichi
  Uekawa (Closes: #357949).
* control (Build-Depends): New field which contains debhelper
  dependency.
  (Standards-Version): Bump to 3.7.2.
* debian/emacsen-install: Compile files in contrib directory in addition
  to the normal fare.  Thanks to Junichi Uekawa for the suggestion.
* debian/emacsen-startup: Add contrib directory to load-path.
* debian/emacsen-remove: Fix comment.
* debian/compat: New file that sets the debhelper compatibility level to
  4.
* debian/rules: Remove DH_COMPAT line.  Thanks to Romain Francoise for
  the suggestion.
* debian/NEWS: Rename from NEWS.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
;;; muse-init.el --- Initialize muse-mode.
 
1
;;; muse-init.el --- Initialize Emacs Muse
2
2
 
3
 
;; Hacked on by Michael Olson
 
3
;; Author: Michael Olson
4
4
 
5
5
;; In order to see the scripts that I use to publish my website to a
6
6
;; remote webserver, check out
21
21
(require 'muse-blosxom)  ; load blosxom module
22
22
(require 'muse-docbook)  ; load DocBook publishing style
23
23
(require 'muse-html)     ; load (X)HTML publishing style
24
 
(require 'muse-texinfo)  ; load Info/PDF publishing styles
 
24
(require 'muse-latex)    ; load LaTeX/PDF publishing styles
 
25
(require 'muse-texinfo)  ; load Info publishing style
25
26
(require 'muse-wiki)     ; load Wiki support
26
 
(require 'muse-xml)      ; load experimental XML support
 
27
(require 'muse-xml)      ; load XML support
27
28
;;(require 'muse-message)  ; load message support (experimental)
28
29
 
29
30
;; Setup projects
47
48
 
48
49
(setq muse-project-alist
49
50
      `(
50
 
        ("Website"
51
 
         ("~/proj/wiki/web/"
52
 
          :force-publish ("WikiIndex")
53
 
          :default "WelcomePage")
 
51
        ("Website" ("~/proj/wiki/web/"
 
52
                    :force-publish ("WikiIndex")
 
53
                    :default "WelcomePage")
54
54
         (:base "my-xhtml"
55
 
                :path "~/personal-site/site/web"))
 
55
                :path "~/personal-site/site/web")
 
56
         (:base "my-pdf"
 
57
                :path "~/personal-site/site/web"
 
58
                :include "/CurriculumVitae[^/]*$"))
56
59
 
57
 
        ("Projects"
58
 
         ("~/proj/wiki/projects/"
59
 
          :force-publish ("WikiIndex")
60
 
          :default "WelcomePage")
 
60
        ("Projects" ("~/proj/wiki/projects/"
 
61
                     :force-publish ("WikiIndex")
 
62
                     :default "WelcomePage")
61
63
         (:base "my-xhtml"
62
64
                :path "~/personal-site/site/projects"))
63
65
 
64
 
        ("Blog"
65
 
         (,@(muse-project-alist-dirs "~/proj/wiki/blog")
66
 
          :default "index")
 
66
        ("Blog" (,@(muse-project-alist-dirs "~/proj/wiki/blog")
 
67
                 :default "index")
67
68
 
 
69
         ;; Publish this directory and its subdirectories.  Arguments
 
70
         ;; are as follows.  The above `muse-project-alist-dirs' part
 
71
         ;; is also needed, using Argument 1.
 
72
         ;;
 
73
         ;;  1. Source directory
 
74
         ;;  2. Output directory
 
75
         ;;  3. Publishing style
68
76
         ,@(muse-project-alist-styles "~/proj/wiki/blog"
69
77
                                      "~/personal-site/site/blog"
70
78
                                      "my-blosxom"))
71
79
 
72
 
        ("MyNotes"
73
 
         ("~/proj/wiki/notes/"
74
 
          :force-publish ("WikiIndex")
75
 
          :default "WelcomePage")
76
 
         (:base "my-xhtml"
 
80
        ("MyNotes" ("~/proj/wiki/notes/"
 
81
                    :force-publish ("index")
 
82
                    :default "index")
 
83
         (:base "xhtml"
77
84
                :path "~/personal-site/site/notes")
78
85
         (:base "my-pdf"
79
86
                :path "~/personal-site/site/notes"))
80
87
 
81
 
        ("Plans"
82
 
         ("~/proj/wiki/plans/"
83
 
          :default "TaskPool"
84
 
          :major-mode planner-mode
85
 
          :visit-link planner-visit-link)
 
88
        ("Private" ("~/Documents" "~/Documents/work-school"
 
89
                    :default "movielist")
 
90
         ,@(muse-project-alist-styles "~/Documents"
 
91
                                      "~/Documents"
 
92
                                      "pdf"))
 
93
 
 
94
        ("Classes" (,@(muse-project-alist-dirs "~/proj/wiki/classes")
 
95
                    :default "index")
 
96
         ,@(muse-project-alist-styles "~/proj/wiki/classes"
 
97
                                      "~/personal-site/site/classes"
 
98
                                      "xhtml"))
 
99
 
 
100
        ("Plans" ("~/proj/wiki/plans/"
 
101
                  :default "TaskPool"
 
102
                  :major-mode planner-mode
 
103
                  :visit-link planner-visit-link)
86
104
         (:base "planner-xhtml"
87
105
                :path "~/proj/notmine/planner-out"))
88
106
        ))
89
107
 
90
108
;; Wiki settings
91
109
(setq muse-wiki-interwiki-alist
92
 
      '(("PlugWiki" . "http://plug.student-orgs.purdue.edu/plugwiki/")
 
110
      '(("PlugWiki" . "http://plug.student-orgs.purdue.edu/wiki/")
93
111
        ("TheEmacsWiki" . "http://www.emacswiki.org/cgi-bin/wiki/")
94
112
        ("ArchWiki" . "http://wiki.gnuarch.org/")
95
113
        ;; abbreviations
96
114
        ("CERIAS" . "http://www.cerias.purdue.edu/")
97
 
        ("PLUG" . "http://plug.student-orgs.purdue.edu/plugwiki/")))
 
115
        ("Planner" . "http://www.plannerlove.com/")
 
116
        ("GP2X" . "http://www.gp2x.co.uk/")
 
117
        ("PLUG" . "http://plug.student-orgs.purdue.edu/wiki/")))
98
118
 
99
119
;;; Functions
100
120
 
119
139
  (let ((muse-current-project (muse-project project)))
120
140
    (call-interactively 'muse-project-find-file)))
121
141
 
122
 
;; Make the current file display correctly in Xanga
 
142
;; Determine whether we are publishing a certain kind of output
 
143
(defsubst my-muse-format-p (format)
 
144
  (let ((base (muse-get-keyword :base muse-publishing-current-style)))
 
145
    (when base (string-match format base))))
123
146
 
124
147
(defun my-muse-blosxom-finalize (file output-path target)
125
148
;;  (my-muse-prepare-entry-for-xanga output-path)
126
149
;; For now, do nothing.
127
150
  )
128
151
 
 
152
;; Make the current file display correctly in Xanga
129
153
;; I call this using C-c p x now.
130
 
 
131
154
(defun my-muse-prepare-entry-for-xanga (file)
132
155
  "Mangle FILE so that Xanga doesn't bug out, saving to X clipboard.
133
156
 
168
191
              (replace-match "<br />")))))
169
192
      ;; Get rid of 2 spaces together and merge lines
170
193
      (goto-char (point-min))
171
 
      (while (re-search-forward (concat "["
172
 
                                        muse-regexp-space
173
 
                                        "]+") nil t)
 
194
      (while (re-search-forward (concat "[" muse-regexp-blank "\n]+") nil t)
174
195
        (replace-match " "))
175
196
      ;; Remove trailing space
176
197
      (goto-char (point-min))
188
209
(global-set-key "\C-cpl" 'muse-blosxom-new-entry)
189
210
(global-set-key "\C-cpL" #'(lambda () (interactive)
190
211
                             (my-muse-project-find-file "Blog")))
 
212
(global-set-key "\C-cpi" #'(lambda () (interactive)
 
213
                             (my-muse-project-find-file "Private")))
191
214
(global-set-key "\C-cpn" #'(lambda () (interactive)
192
215
                             (my-muse-project-find-file "MyNotes")))
193
216
(global-set-key "\C-cpp" #'(lambda () (interactive)
194
217
                             (my-muse-project-find-file "Plans")))
195
218
(global-set-key "\C-cpr" #'(lambda () (interactive)
196
219
                             (my-muse-project-find-file "Projects")))
 
220
(global-set-key "\C-cps" #'(lambda () (interactive)
 
221
                             (my-muse-project-find-file "Classes")))
197
222
(global-set-key "\C-cpw" #'(lambda () (interactive)
198
223
                             (my-muse-project-find-file "Website")))
199
224
(global-set-key "\C-cpx" 'my-muse-prepare-entry-for-xanga)
203
228
(custom-set-variables
204
229
 '(muse-blosxom-base-directory "~/proj/wiki/blog/")
205
230
 '(muse-colors-autogen-headings (quote outline))
 
231
 '(muse-colors-inline-image-method (quote muse-colors-use-publishing-directory))
206
232
 '(muse-file-extension "muse")
207
233
 '(muse-html-charset-default "utf-8")
208
234
 '(muse-html-encoding-default (quote utf-8))
 
235
 '(muse-html-footer "~/personal-site/muse/generic-footer.html")
 
236
 '(muse-html-header "~/personal-site/muse/generic-header.html")
209
237
 '(muse-html-meta-content-encoding (quote utf-8))
210
238
 '(muse-html-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"all\" href=\"/common.css\" />
211
239
<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"screen\" href=\"/screen.css\" />
213
241
 '(muse-latex-header "~/personal-site/muse/header.tex")
214
242
 '(muse-mode-auto-p nil nil (muse-project))
215
243
 '(muse-mode-highlight-p t nil (muse-colors))
216
 
 '(muse-mode-hook (quote (footnote-mode muse-wiki-update-custom-values)))
217
 
 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki muse-publish-escape-specials-in-string)))
218
 
 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page" "anime")))
 
244
 '(muse-mode-hook (quote (muse-wiki-update-custom-values flyspell-mode footnote-mode)))
 
245
 '(muse-publish-comments-p t)
 
246
 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki)))
 
247
 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page")))
219
248
 '(muse-xhtml-footer "~/personal-site/muse/generic-footer.html")
220
249
 '(muse-xhtml-header "~/personal-site/muse/generic-header.html"))
221
250
(custom-set-faces