Skip to content

Commit f94d72a

Browse files
committed
Upgrade builtin org-mode to 8.x git branch.
1 parent b745da9 commit f94d72a

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

CHANGELOG.org

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
** core
99
- By default, use git shallow clone for el-get to save time and bandwidth.
10+
- Upgrade the builtin =org-mode= to latest 8.x branch.
1011
- Enhance =ome-load= and =ome-install= function.
1112
- =ome-package-list-to-org-table= function to get a list of installed
1213
el-get packages in org-mode format.

core/ome-org.org

+45-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,52 @@ which is also *implemented using* Org-mode and [[http://git-scm.com/][git]].
2020

2121
#+NAME: org-el-get-packages
2222
#+CAPTION: El-get packages for ome-org module
23-
| | Status | Description |
24-
|------------+-------------+----------------------------------|
25-
| [[http://www.emacswiki.org/emacs/Htmlize][htmlize]].el | Recommended | Export an buffer to html format. |
26-
| [[http://staff.science.uva.nl/~dominik/Tools/cdlatex/][CDLaTeX]] | Recommended | Speedy \LaTeX{} input. |
23+
| | Status | Description |
24+
|------------+-------------+-------------------------------------------|
25+
| [[http://orgmode.org/][org-mode]] | Required | One of the killer Apps on Emacs platform. |
26+
| [[http://www.emacswiki.org/emacs/Htmlize][htmlize]].el | Recommended | Export an buffer to html format. |
27+
| [[http://staff.science.uva.nl/~dominik/Tools/cdlatex/][CDLaTeX]] | Recommended | Speedy \LaTeX{} input. |
2728

29+
* Org-mode upgrade
30+
:PROPERTIES:
31+
:CUSTOM_ID: org-mode-upgrade
32+
:END:
33+
34+
#+BEGIN_QUOTE
35+
Org 8.0 is the most disruptive major version of Org.
36+
37+
-- http://orgmode.org/Changes_old.html
38+
#+END_QUOTE
39+
40+
So why upgrade? Because it is there, it is the future of org-mode. Second, I
41+
want to export my org files to markdown format, some times.
42+
43+
You can get the latest org-mode by =M-x el-get-install RET org-mode=
44+
directly. However, with oh-my-emacs, we need some tricks to make it work.
45+
46+
Oh-my-emacs use =org-babel= from =org-mode= to provide a literate emacs
47+
configuration, so we need to =(require 'org)= just after oh-my-emacs
48+
starts(before loading =el-get=). By default, oh-my-emacs will load the builtin
49+
=org-mode= instead of the latest =org-mode= package from =el-get=. To get
50+
around this, I define two variables: =el-get-org-mode-dir= and
51+
=org-home=. Thus, if =(el-get-package-installed-p 'org-mode)=, oh-my-emacs will
52+
recognize =org-mode= from =$HOME/.emacs.d/el-get/org-mode=. You can also
53+
download tarball from http://orgmode.org, and then start your Emacs from
54+
command line like this: =ORG_HOME=/path/to/latest/org-mode/ emacs=. However,
55+
I do not recommend this way for long time daily use.
56+
57+
One of the most exciting features of org-mode 8.x is the new export engine,
58+
check [[http://article.gmane.org/gmane.emacs.orgmode/65574][the mailing list]] for original announcing post. For other features, check
59+
[[http://orgmode.org/worg/org-8.0.html][org 8.0 upgrading doc]].
60+
61+
#+NAME: org-mode-upgrade
62+
#+BEGIN_SRC emacs-lisp
63+
(defun ome-org-mode-setup ()
64+
;; markdown export support
65+
(require 'ox-md))
66+
67+
(ome-install 'org-mode)
68+
#+END_SRC
2869

2970
* Keybindings
3071
:PROPERTIES:

init.el

+14-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,20 @@
1919
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
2020
(when (fboundp mode) (funcall mode -1)))
2121

22-
;; load Org-mode from source when the ORG_HOME environment variable is set
23-
(setq org-home (getenv "ORG_HOME"))
22+
(defvar el-get-org-mode-dir "~/.emacs.d/el-get/org-mode/"
23+
"The directory for org-mode el-get package.
24+
25+
You can get the latest org-mode by el-get. You need to restart your emacs and
26+
oh-my-emacs will recognize the newly installed org-mode package.")
27+
28+
(defvar org-home
29+
(or (getenv "ORG_HOME")
30+
(if (file-directory-p el-get-org-mode-dir)
31+
el-get-org-mode-dir))
32+
"The directory of org-mode package.
33+
34+
You can get the latest org-mode by el-get, or download the package from
35+
official org-mode website directly.")
2436

2537
(when org-home
2638
(let ((org-lisp-dir (expand-file-name "lisp" org-home))

0 commit comments

Comments
 (0)