开发者

Using Emacs to start as org-mode

I find org-mode very useful, and I'd like start org-mode开发者_JS百科 as default mode when I run emacs. How can I do that?


I assume you want to keep the default *scratch* buffer open. Add the following to your .emacs:

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


I love org-mode as well, but would not want to use it when I edit code files. I use the following configuration, which I find more convenient, maybe it will be of some use to you:

1) Adding the following lines to your .emacs file will put emacs in org-mode everytime you open a file in .org, .ref, .notes, or an encrypted version of it.

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

2) I like to launch emacs directly in agenda mode in the morning (but still launch it in normal way in other occasions). I defined a shell alias for it:

alias org emacs -f org-agenda-list

Good luck!


If you've got org-mode set up to keep track of your agenda, you can get Emacs to start by showing your weekly agenda by adding this line to your .emacs:

(org-agenda-list)


I've just got this in my list of custom-set-variables that Emacs produces automatically.

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


If you use org-mode very often like me, the best way(I think) is to start emacs with and org file loaded and shown. (+ a (org-agenda-list)). You can check my .emacs file to see how to set it up.

PS, I have a portable version with .emacs configure ready, which setup org mode, I-do, etc. It also included org sample file. I think that is a better start point for new comers.

Basically run with runemacs.bat and everything is ready.

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

Best,


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜