如何在 Windows XP 上安装 org-mode 7.5 版的信息文件?

Sha*_*nce 6 windows emacs windows-xp org-mode

我正在尝试在 Windows XP 机器上安装 org-mode 7.5,但M-x org-info提供了 Emacs 23.3.1 附带的 Org 版本 6.33x 的文档

我下载了 zip 文件并将其解压缩到“~/.emacs.d/org-7.5/”:

c:/Documents and Settings/myusername/Application Data/.emacs.d/org-7.5:
total used in directory 16 available 279614668
drwxrwxrwx  1 myusername Domain Users     0 04-08 09:50 .
drwxrwxrwx  1 myusername Domain Users     0 04-08 09:58 ..
-rw-rw-rw-  1 myusername Domain Users 14168 03-07 13:29 Makefile
-rw-rw-rw-  1 myusername Domain Users  1051 03-07 13:29 README
drwxrwxrwx  1 myusername Domain Users     0 04-08 09:50 contrib
drwxrwxrwx  1 myusername Domain Users     0 04-08 09:50 doc
drwxrwxrwx  1 myusername Domain Users     0 04-08 10:10 lisp
-rw-rw-rw-  1 myusername Domain Users  1007 03-07 13:29 request-assign-future.txt
Run Code Online (Sandbox Code Playgroud)

The Org Manual第 1.2 节“安装”中,指示说要编辑附带的 Makefile,然后运行. 作为 Windows 机器,这行不通。make

C:\Documents and Settings\myusername\Application Data\.emacs.d\org-7.5>make
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)

那么是什么在我的~/.emacs.d/init.el文件中添加了以下行:

(setq load-path (cons "~/.emacs.d/org-7.5/lisp" load-path))
Run Code Online (Sandbox Code Playgroud)

重新启动 emacs,然后对 Org 7.5 lisp 目录进行字节编译:

ELISP> (version)
"GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600)\n of 2011-03-10 on 3249CTO"
ELISP> load-path

("~/.emacs.d/org-7.5/lisp" "~/.emacs.d" <snip>)

ELISP> (byte-recompile-directory "~/.emacs.d/org-7.5/lisp/" 0 t)
"Done (Total of 99 files compiled)"
Run Code Online (Sandbox Code Playgroud)

然后在 init.el 中添加以下几行:

(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-col" 'org-store-link)
(global-set-key "\C-coc" 'org-capture)
(global-set-key "\C-coa" 'org-agenda)
(global-set-key "\C-cob" 'org-iswitchb)
(setq org-log-done t)
Run Code Online (Sandbox Code Playgroud)

再次重启 emacs。现在安装了 Org 7.5:

ELISP> org-version
"7.5"
Run Code Online (Sandbox Code Playgroud)

但是执行的步骤不会创建或安装信息文件,因此当我使用时,M-x org-info我会获得 Org 版本 7.5 而不是 6.33x 的手册:

File: org,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)

Org Mode Manual
***************

This manual is for Org version 6.33x.
Run Code Online (Sandbox Code Playgroud)

Sha*_*nce 1

根据需要向 .emacs 或 .emacs.d/init.el 添加一行,其中包含 Org 7.5 附带的文档 Info-default-directory-list

; Find the Org documentation
(setq Info-default-directory-list 
  (cons "~/.emacs.d/org-7.5/doc/" Info-default-directory-list)) 
Run Code Online (Sandbox Code Playgroud)

这确实导致了一个奇怪的现象,即当启动信息模式(例如使用M-x infoC-h i)时,组织模式现在位于菜单中的第一行,位于主要 Emacs 帮助之前。

File: dir,  Node: Top   This is the top of the INFO tree

  <snip>

* Menu:

Emacs
* Org Mode: (org).      Outline-based notes management and organizer

* Info: (info).                 How to use the documentation browsing system.
* Emacs: (emacs).               The extensible self-documenting text editor.
* Emacs FAQ: (efaq).            Frequently Asked Questions about Emacs.
* <snip>
Run Code Online (Sandbox Code Playgroud)

另外,我发现org-info在 org-mode 至少使用一次之前不可用,我添加了以下行以使其始终可用:

(require 'org-info)
Run Code Online (Sandbox Code Playgroud)

注意: InfoPath 上的emacs wiki 条目建议使用INFOPATH环境变量,而不是Info-default-directory-list在非 Windows 计算机上。