Chinaunix首页 | 论坛 | 博客
  • 博客访问: 110607
  • 博文数量: 40
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 420
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-02 15:41
文章分类

全部博文(40)

文章存档

2009年(40)

我的朋友
最近访客

分类:

2009-06-02 16:06:19

零、安装前提
发行版本:   redhat 9.0
内核版本:   2.4.20.18
Gcc版本:    3.2
emacs版本:  22.x
一、   安装gc库
下载版本号大于(等于)6.1的gc库。
    cp gc6.1.tar /INSTALL_PATH/ # INSTALL_PATH是软件源代码存放的目录
    cd /INSTALL_PATH
    tar –xvzf gc6.1.tar
    cd gc6.1
./configure --prefix=;
make;
make check;
make install
ln –s /lib/libgc.so /lib/libgc.so
 
二、   安装w3m
下载相应的w3mgc。
cp w3m-0.5.2.tar /INSTALL_PATH/
    cd /INSTALL_PATH
    tar –xvzf w3m-0.5.2.tar
cd  w3m-0.5.2
# Note: if you're using GC library 6.1, you should install gc.h to PREFIX/include:
    cp gc-6.1/include/gc.h PREFIX/include
   ./configure
  make
   # make install
 
三、   安装emacs-w3m
下载相应的emacs-w3m
注意:这里的emacs-w3m是针对emacs 22以上的版本,其他版本的请看对应的README文件。
cp emacs-w3m-1.4.4.tar /INSTALL_PATH/
    cd /INSTALL_PATH
    tar –xvzf emacs-w3m-1.4.4.tar
cd  emacs-w3m-1.4.4
    ./configure
    ( 如果在emacs已经安装了多个版本的Gnus,就要通过--with-addpath指明要使用的哪个版本的gnus.elc
./configure --with-addpath=/usr/local/share/emacs/site-lisp/gnus)
    make
    make install
 
四、   在.eamcs中进行配置w3m接口
 
;;网页浏览
(setq load-path (cons "~/.emacs.d/site/emacs-w3m-1.4.4" load-path))
(require 'w3m)
(setq exec-path (cons "/bin" exec-path))
(setq w3m-command (concat "/bin/w3m.exe" ""))
(setq w3m-browse-url (concat "/bin/w3m.exe" ""))
(setq w3m-find-file (concat "/bin/w3m.exe" ""))
(setq browse-url-browser-function 'w3m-browse-url)
;(setq w3m-local-find-file-function nil)
;;; Allow browsing of local files:
(setq w3m-dirlist-cgi-program "/bin/dirlist.cgi")
;;; causes the return key to submit a form
(setq w3m-use-form t)
(setq w3m-use-mule-ucs t)
(setq w3m-use-toolbar t) 
(setq w3m-use-cookies t)
(setq w3m-display-inline-image t)
(setq w3m-bookmark-file-coding-system 'chinese-iso-8bit)
(setq w3m-coding-system 'chinese-iso-8bit)
(setq w3m-default-coding-system 'chinese-iso-8bit)
(setq w3m-file-coding-system 'chinese-iso-8bit)
(setq w3m-file-name-coding-system 'chinese-iso-8bit)
(setq w3m-terminal-coding-system 'chinese-iso-8bit)
(setq w3m-input-coding-system 'chinese-iso-8bit)
(setq w3m-output-coding-system 'chinese-iso-8bit)
;(setq w3m-bookmark-file-coding-system 'chinese-gbk)
;(setq w3m-default-coding-system 'chinese-gbk)
;(setq w3m-coding-system 'chinese-gbk)
;(setq w3m-file-coding-system 'chinese-gbk)
;(setq w3m-file-name-coding-system 'chinese-gbk)
;(setq w3m-terminal-coding-system 'chinese-gbk)
;(setq w3m-input-coding-system 'chinese-gbk)
;(setq w3m-output-coding-system 'chinese-gbk)
 
(setq w3m-tab-width 4)
(setq w3m-fill-column 120);;设置浏览窗的宽度,1024*768的就用这个设置吧
(setq w3m-home-page "~/index.html")
(setq w3m-view-this-url-new-session-in-background t)
;;(require 'mime-w3m) 不知道怎么用,包含就出错,抄来的
(add-hook 'w3m-fontify-after-hook 'remove-w3m-output-garbages)
(defun remove-w3m-output-garbages ()
      (interactive)
      (let ((buffer-read-only))
        (setf (point) (point-min))
        (while (re-search-forward "[\200-\240]" nil t)
          (replace-match " "))
        (set-buffer-multibyte t))
      (set-buffer-modified-p nil))
 
 
五、 W3m在emacs中的使用说明
具体请看:
 
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/vpxiroot/archive/2009/05/04/4148094.aspx
阅读(1259) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~