原创 Emacs-muse的部分问题解决收藏

  1. 今天从emacs-wiki转向emacs-muse,搞配置倒是简单,就是最后找WikiName的时候郁闷了半天,原来Wiki中的WikIName不行了 ,后来终于发现用[[WikiNames]]就可以了,埃.叹.
  2. 在用muse的时候偶尔会出现"No word lists can be found for the language "en_US""原来是aspell-en的问题,一般来说是因为用的是muse建议的配置,其中会加一个FlySpell的hook在muse-mode上,因此需要找aspell.
  3. cvs了一个23的emacs发现终于可以直接和外部复制粘贴中文了,22调了半天coding-system都出不来,郁闷死了...
  4. 改了coding-system搞定发布的中文问题,下面是.emacs部分


set-language-environment 'Chinese-GB)
(set-keyboard-coding-system 'euc-cn)
(set-clipboard-coding-system 'euc-cn)
(set-terminal-coding-system 'euc-cn)
(set-buffer-file-coding-system 'euc-cn)
(set-selection-coding-system 'euc-cn)
(modify-coding-system-alist 'process "*" 'euc-cn)
(setq default-process-coding-system
'(euc-cn . euc-cn))
(setq-default pathname-coding-system 'euc-cn)
 

默认编码是的utf-8用户

;; locale coding
(setq locale-coding-system'utf-8)
(prefer-coding-system'utf-8)
(set-keyboard-coding-system'utf-8)
(set-terminal-coding-system'utf-8)
(set-selection-coding-system'utf-8)
(set-clipboard-coding-system 'ctext)
(set-buffer-file-coding-system 'utf-8)



下面贴一下muse-init.el的配置


;;; muse-init.el --- Initialize Emacs Muse

;; Author: Michael Olson

;; In order to see the scripts that I use to publish my website to a
;; remote webserver, check out
;; http://www.mwolson.org/projects/SiteScripts.html.

;;; Setup

;; Add to load path
;(when (fboundp 'debian-pkg-add-load-path-item)
;  (debian-pkg-add-load-path-item "/stuff/proj/emacs/muse/rel--3.02/lisp")
;  (debian-pkg-add-load-path-item "/stuff/proj/emacs/muse/rel--3.02/experimental"))

(add-to-list 'load-path "~/.emacs.d/site-lisp/muse")
;; Initialize
(require 'outline)       ; I like outline-style faces
(require 'muse)          ; load generic module
(require 'muse-colors)   ; load coloring/font-lock module
(require 'muse-mode)     ; load authoring mode
;(require 'muse-blosxom)  ; load blosxom module
(require 'muse-docbook)  ; load DocBook publishing style
(require 'muse-html)     ; load (X)HTML publishing style
;(require 'muse-latex)    ; load LaTeX/PDF publishing styles
;(require 'muse-texinfo)  ; load Info publishing style
(require 'muse-wiki)     ; load Wiki support
(require 'muse-xml)      ; load XML support
;;(require 'muse-message)  ; load message support (experimental)

;; Setup projects

;; Here is my master project listing.

(setq muse-project-alist
      '(
;        ("Website"                      ; my various writings
;         ("~/Muse/Pages"
;          :default "WelcomePage")
;         (:base "html" :path "~/Muse/public_html/website"))
;       ("Programming"
;         ("~/Muse/Pragramming"
;          :default "WelcomePage")
;         (:base "html" :path "~/Muse/public_html/programming"))
        ("notes"
         ("~/doc/emacs/muse" :default "WelcomePage")
         (:base "html" :path "~/doc/emacs/public_html/muse"))))
;         (:base "pdf"  :path "~/doc/emacs/public_pdf/muse"))))

;; Wiki settings
(setq muse-wiki-interwiki-alist
      '(("PlugWiki" . "http://plug.student-orgs.purdue.edu/wiki/")
        ("TheEmacsWiki" . "http://www.emacswiki.org/cgi-bin/wiki/")
        ("ArchWiki" . "http://wiki.gnuarch.org/")
        ;; abbreviations
        ("CERIAS" . "http://www.cerias.purdue.edu/")
        ("Planner" . "http://www.plannerlove.com/")
        ("GP2X" . "http://www.gp2x.co.uk/")
        ("PLUG" . "http://plug.student-orgs.purdue.edu/wiki/")))

;;; Functions


;; Switch to the given project and prompt for a file
(defun my-muse-project-find-file (project)
  (interactive)
  (let ((muse-current-project (muse-project project)))
    (call-interactively 'muse-project-find-file)))

;; Determine whether we are publishing a certain kind of output
(defsubst my-muse-format-p (format)
  (let ((base (muse-get-keyword :base muse-publishing-current-style)))
    (when base (string-match format base))))

;;; Key customizations


(global-set-key "\C-cpp" #'(lambda () (interactive)
                             (my-muse-project-find-file "notes")))

;;; Custom variables


(setq muse-html-meta-content-type "text/html; charset=utf-8")
;(setq muse-html-meta-charset "gb2312")
(setq muse-html-content-coding "utf-8")
(setq muse-html-charset-default "utf-8")
(setq muse-html-coding-default "utf-8")

(setq muse-file-extension nil
           muse-mode-auto-p t)
(add-hook 'find-file-hooks 'muse-mode-maybe)

(setq muse-html-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"all\" href=\"../main.css\" />")

(custom-set-variables
 '(muse-colors-autogen-headings (quote outline))
 '(muse-colors-inline-image-method (quote muse-colors-use-publishing-directory))
 '(muse-mode-highlight-p t nil (muse-colors))
 '(muse-mode-hook (quote (muse-wiki-update-custom-values flyspell-mode footnote-mode)))
 '(muse-publish-comments-p t)
 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki)))
 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page"))))
(custom-set-faces
 '(muse-bad-link-face ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))
 '(muse-link-face ((t (:foreground "blue" :underline "blue" :weight bold)))))

;;; muse-init.el ends here

发表于 @ 2006年05月06日 21:26:00|评论(loading...)

新一篇: 给自己搭配颜色 | 旧一篇: gnome中使用Emacs中文输入

用户操作
[即时聊天] [发私信] [加为好友]
mirindagum
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
文章分类
收藏
    存档
    软件项目交易
    Csdn Blog version 3.1a
    Copyright © mirindagum