Emacs阅读chm文档

*/-->

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

code {color: #FF0000}
pre.src {background-color: #002b36; color: #839496;}

Emacs阅读chm文档

在Emacs中查看html的文档,可以通过我这篇w3m查看html文档 文章来进行。但是chm文档是一种html文档的编译版本,在Emacs中无法打开。

那么,要想在Emacs中查看chm,首先要了解chm文档到底是怎样的。
我们打开一个tcl的chm文档,点击任意一个页面,右键查看“属性”,可以看到其中有一项:

地址: mk:@MSITStore:C:\Tcl8.6\doc\ActiveTclHelp8.6.chm::/tdom/dom.html

这个地址可以用系统自带的hh.exe来打开:

hh mk:@MSITStore:C:\Tcl8.6\doc\ActiveTclHelp8.6.chm::/tdom/dom.html

但是,这个不是标准的url,也无法用浏览器打开。另外,我们也不知道要打开的是哪一个html页面。

为了解决这个问题,我们这里有几种方式:

  • 使用keyhh.exe来打开:

    KeyHH -MyHelp -#klink "ActiveX Control Wizard" htmlhelp.chm

    这就是用一个更加高级一点的hh.exe程序来打开chm文档,只要Id配置相同,就只会打开一个chm文档。
    keyhh.exe已经停止更新了,官方网站已经关闭了,从这里还可以下载:

    http://api.256file.com/download/66010_keyhh.exe

    但是,里面好像有个bug,就是当第一次搜索的时候,如果需要选择的时候,就会卡死了。把默认的选项"-#klink" 改为 "-#alink" 之后就可以了。

    (defun chm-help--lookup-chm (file-path keyword)
    "Open a window showing the documentation for the word under the point"
    (interactive "fChm File: \nSKeyword: ")
    (start-process "keyhh" nil "keyhh.exe"
    (concat "-" mode-name) ;; use mode name as ID
    "-#alink" (format "'%s'" keyword)
    file-path)) (chm-help--lookup-chm "c:/tcl/doc/ActiveTclHelp8.5.chm" "dom")
  • 使用archmage + chmview
    这个只能在linux上使用,archmage没有windows版本。
  • 先反编译
    先用自带的hh.exe命令反编译成html文件,然后,用w3m查看。

    hh -decompile X:\A Y:\B.chm

Date: 2017-01-14 17:11

Created: 2017-01-14 周六 23:13

Validate

最新文章

  1. 免费打造自己的个人网站,免费域名、免费空间、FTP、数据库什么的,一个不能少,没钱,也可以这么任性
  2. Android:将View的内容映射成Bitmap转图片导出
  3. leetcode题解: Remove Duplicates from Sorted List(已排序单链表去重)
  4. QT模态弹出对话框
  5. 对指定文件生成数字摘要的MD5工具类
  6. ListView嵌套ListView优化
  7. svg转换工具
  8. Gizmos绘制塔防游戏网格
  9. cordova环境搭建
  10. nginx中的epoll模型
  11. mysql 纵表转横表
  12. git 与 ftp 共同工作
  13. 实现一个简易版的SpringMvc框架
  14. javascript的函数、事件
  15. C# MediaHelper
  16. hdu5521(Meeting)spfa 层次网络最短路
  17. Python open 对应的参数
  18. SQL注入之Sqli-labs系列第二十六关(过滤空格、注释符、逻辑运算符注入)和第二十六A
  19. TensorFlow-实战Google深度学习框架 笔记(上)
  20. json与list,map,String之间的互转

热门文章

  1. 通过字典给类的实体属性赋值生成url字符串
  2. python 学习 [day6]
  3. Java多线程和死锁
  4. centos7,yum安装的redis用systemctl无法启动
  5. C#常见数据格式导出
  6. hadoop 完全分布式
  7. python+selenium+Eclipse安装
  8. C#中Invoke的用法
  9. openstack私有云布署实践【12.2 网络Neutron-controller节点配置(办公网环境)】
  10. 九章lintcode作业题