尝试使用捕获时组织模式设置问题
我试图按照 org-manual p 74 中的说明使用捕获。 这是 org 模式的 .emacs 文件。
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-default-notes-file (concat org-directory "~/notes.org")) <-- error
(define-key global-map "\C-cc" 'org-capture)
但我收到这个错误。可能出了什么问题?
Symbol's value as variable is void: org-directory
添加
戴夫回答后,我修改了代码,它似乎工作正常。但我发现的另一个问题是抄送 c 给了我这个错误。
Symbol's function definition is void : org-capture
I was trying to use the capture as is explained in org-manual p 74.
This is the .emacs file for org mode.
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-default-notes-file (concat org-directory "~/notes.org")) <-- error
(define-key global-map "\C-cc" 'org-capture)
But I get this error. What might be wrong?
Symbol's value as variable is void: org-directory
ADDED
After Dave's answer, I modified the code, and it seems to work fine. But the other problem that I found was C-c c gives me this error.
Symbol's function definition is void : org-capture
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,确保您使用的是 org-mode 6.36 或更高版本。 (早期版本使用 Remember.el,它有不同的设置。)
您使用的是未定义的符号,
org-directory
。尝试使用:
跟进:
要加载最近的 org-mode 包:
请注意,打包时,org-mode lisp 文件位于 lisp 子目录中。
First of all, make sure you're using org-mode 6.36 or later. (Earlier versions use remember.el which has a different setup.)
You're using a symbol that's not defined,
org-directory
.Try using:
Followup:
To load a recent org-mode package:
Note that as packaged, the org-mode lisp files are in the lisp sub-directory.
我知道这个问题已经得到解答,但我想为那些还没有成功的人留下更彻底的答案。我只是走过场,我将在下面列出每个步骤。
<块引用>
# 本地软件在哪里找到
前缀 = /用户/用户名/脚本
# 本地 Lisp 文件的去向。
lispdir= $(前缀)/emacs/lisp/org
# 本地数据文件所在的位置。
datadir = $(前缀)/emacs/etc/org
# 信息文件的去向。
infodir = $(前缀)/emacs/info
编辑您的 .emacs 文件并粘贴两个新路径(如果还没有)。第一个是用于存放您可能拥有的任何 .el 文件的 lisp 文件夹,第二个是因为我将 org 文件包含在 org 文件夹中,该文件夹是 lisp 的子文件夹。不幸的是,“加载路径”不够智能,无法检测子文件夹,因此您必须显式设置每个文件夹。
提示:
I know this question has been answered, but I would like to leave a more thorough answer for those people who haven't been successful. I just went through the motions and I am going to make a list of each step below.
Edit your .emacs file and paste in there two new paths (if not already there). The first one is for the lisp folder for any .el files you may have and the second one is there because I contained the org files in an org folder, which is a subfolder of lisp. Unfortunately, the "load-path" is not smart enough to detect subfolders, therefore you must set each folder explicitly.
HINT: