7

我发现 org-mode 非常有用,我希望在运行 emacs 时将 org-mode 作为默认模式启动。我怎样才能做到这一点?

4

6 回答 6

11

我假设您想保持默认*scratch*缓冲区打开。将以下内容添加到您的 .emacs 中:

(pop-to-buffer (get-buffer-create (generate-new-buffer-name "*scratch-org*")))
(insert "Scratch buffer with org-mode.\n\n")
(org-mode)
于 2011-02-02T16:46:45.103 回答
10

我也喜欢 org-mode,但我不想在编辑代码文件时使用它。我使用以下配置,我觉得更方便,也许它对你有一些用处:

1) 将以下行添加到您的 .emacs 文件中,每次您在 .org、.ref、.notes 或其加密版本中打开文件时,都会将 emacs 置于 org 模式。

(setq auto-mode-alist
  '(
    ("\\.org$" . org-mode)  
    ("\\.org.gpg$" . org-mode)  
    ("\\.ref$" . org-mode)
    ("\\.ref.gpg$" . org-mode)
    ("\\.notes$" . org-mode)
))

2)我喜欢早上直接以议程模式启动emacs(但在其他场合仍以正常方式启动)。我为它定义了一个 shell 别名:

alias org emacs -f org-agenda-list

祝你好运!

于 2011-02-18T21:22:45.363 回答
4

如果你设置了 org-mode 来跟踪你的议程,你可以通过在你的 .emacs 中添加这一行来显示你的每周议程来让 Emacs 开始:

(org-agenda-list)
于 2011-02-02T17:26:32.487 回答
3

我刚刚在 Emacs 自动生成的自定义设置变量列表中找到了这个。

'(initial-major-mode (quote org-mode))

于 2011-08-16T17:31:20.790 回答
1

如果您像我一样经常使用 org-mode,最好的方法(我认为)是启动 emacs 并加载并显示 org 文件。(+ a(组织议程列表))。您可以查看我的 .emacs 文件以了解如何设置它。

PS,我有一个带有 .emacs 配置的便携式版本,它设置了 org 模式、I-do 等。它还包括 org 示例文件。我认为这对于新来者来说是一个更好的起点。

基本上用 runemacs.bat 运行,一切准备就绪。

http://nd.edu/~gsong/portable_emacs.html

最好的,

于 2011-08-24T16:34:59.213 回答
-1

Or, you can set emacs to display your org file.

于 2011-02-09T04:51:57.653 回答