【问题标题】:Using Emacs to start as org-mode使用 Emacs 作为 org-mode 启动
【发布时间】:2011-02-02 16:35:59
【问题描述】:

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

【问题讨论】:

    标签: emacs org-mode


    【解决方案1】:

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

    (pop-to-buffer (get-buffer-create (generate-new-buffer-name "*scratch-org*")))
    (insert "Scratch buffer with org-mode.\n\n")
    (org-mode)
    

    【讨论】:

    • 使用(switch-to-buffer ...) 获取全屏缓冲区而不是拆分窗口。
    【解决方案2】:

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

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

    (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
    

    祝你好运!

    【讨论】:

      【解决方案3】:

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

      (org-agenda-list)
      

      【讨论】:

        【解决方案4】:

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

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

        【讨论】:

          【解决方案5】:

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

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

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

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

          最好的,

          【讨论】:

            【解决方案6】:

            或者,您可以设置 emacs 以显示您的 org 文件。

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2011-05-04
              • 1970-01-01
              • 2017-01-19
              • 1970-01-01
              • 1970-01-01
              • 2010-12-18
              相关资源
              最近更新 更多