emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Upgrade to org 8.0
@ 2013-06-21  7:43 Chao Lu
  2013-06-21  8:30 ` Giovanni Ridolfi
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Chao Lu @ 2013-06-21  7:43 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1301 bytes --]

Dear list,

I'm trying to upgrade to org 8.0.3 and met some difficulty that could not
solve. Please help.

1. About installation
----------------------------
Currently I'm using Emacs 24.3 under MacOSX mountain lion.
The org mode shipped with this version of emacs is 7.9

I followed the instruction, successfully compiled org 8.0.3 and put all the
*.elc file into my load-path.
Here is the first confusion:
*Before I was using (require 'org-install) to get org code evaluated. Seems
org-install is obsolete now,  then what should I put in my .emacs to get
org loaded?*
*
*
Although I do know why, but seems my old settings get org(8.0.3) loaded,
i.e. M-x org-version gives 8.0.3. But when I try ffap on (require
'org-publish) seems emacs wants to jump to
"/Applications/Documents/Emacs.app/Contents/Resources/lisp/org/org-publish.el.gz",
which is the old org version shipped with Emacs itself.

2. About org-export
----------------------------
I read through the upgrading notes from worg, but still haven't got a
working configuration file, maybe that's the issue of my org installation.
But is there's *working conf on org-export that I can start with*?

I attached my  lch-org-export.el, could somebody have a look how to improve
them to get 8.0.3 working.

Thanks in advance for the help.

Chris

[-- Attachment #1.2: Type: text/html, Size: 1813 bytes --]

[-- Attachment #2: lch-org-export.el --]
[-- Type: application/octet-stream, Size: 6928 bytes --]

;;-*- coding:utf-8; mode:emacs-lisp; -*-

;;; ORG-EXPORT
;; Licence: GNU
;;
;; This file is not part of GNU Emacs.
;;
;; Commentary:
;; Control file of which one to load

;;; CODE
(message "=> lch-org-export: loading...")

;;; Setting
;; special syntax for emphasized text
(setq org-emphasis-alist '(("*" bold "<b>" "</b>")
                           ("/" italic "<i>" "</i>")
                           ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
                           ("=" org-code "<code>" "</code>" verbatim)
                           ("~" org-verbatim "<code>" "</code>" verbatim)
                           ("+" (:strike-through t) "<del>" "</del>")
                           ("@" org-warning "<b>" "</b>")))

;; alist of LaTeX expressions to convert emphasis fontifiers
(setq org-export-latex-emphasis-alist '(("*" "\\textbf{%s}" nil)
                                        ("/" "\\emph{%s}" nil)
                                        ("_" "\\underline{%s}" nil)
                                        ("+" "\\st{%s}" nil)
                                        ("=" "\\verb=%s=" nil)
                                        ("~" "\\verb~%s~" t)
                                        ("@" "\\alert{%s}" nil)))

(setq org-publish-timestamp-directory (concat org-dir "/.org-timestamps/"))
(setq org-export-exclude-tags (list "IDEA" "#A" "#B" "#C"))
;;; Publish-util
(require 'org-publish)
(setq org-publish-project-alist
      `(
	("public-notes"
	 :base-directory ,org-source-dir
	 :base-extension "org"
	 :recursive t
	 :publishing-function org-publish-org-to-html
         :publishing-directory ,pub-html-dir
         :headline-levels 4
	 :section-numbers nil
         :footnotes t
         :language "utf-8"
	 :auto-sitemap t
	 :sitemap-filename "Sitemap.org"
	 :sitemap-title "LooChao's Homepage"
	 :auto-preamble t
	 :auto-postamble t
         ;; :author nil
         ;; :postamble
         ;; "<div id='hosted'><table><tr><td><a href='http://www.gnu.org/software/emacs/'><img src='./theme/emacs-logo.png' alt='Emacs' title ='Powered by GNU/Emacs' style='width:30px;'/></a></td>
;; <td><a href='http://orgmode.org/'><img src='./theme/org-logo-unicorn.png' alt='Org' title='Powered by Emacs Org-mode'  style='width:30px;'/></a></td><td><a href='http://www.princeton.edu'><img src='./theme/PUTiger-logo.gif' alt='Princeton' title='Hosted by Princeton'  style='width:30px;'/></a></td></tr></table></div>"
         ;; :style-include-default nil
         :style "<link rel=\"icon\" href=\"theme/favicon.ico\" type=\"image/x-icon\"/>
<link rel=\"stylesheet\" href=\"./theme/org.css\"  type=\"text/css\"> </link>"
 	 )
	("public-static"
	 :base-directory ,org-source-dir
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|mp3\\|ogg\\|swf\\|ppt"
	 :publishing-directory ,pub-html-dir
	 :recursive t
	 :publishing-function org-publish-attachment
	 )
	("public" :components ("public-notes" "public-static"))

	("options"
	 :section-numbers nil
	 :table-of-contents nil
	 :style "<script type=\"text/javascript\">
                /* <![CDATA[ */
                org_html_manager.set("TOC", 1);
                org_html_manager.set("LOCAL_TOC", 1);
                org_html_manager.set("VIEW_BUTTONS", "true");
                org_html_manager.set("MOUSE_HINT", "underline"); // or background-color like '#eeeeee'
                org_html_manager.setup ();
                /* ]]> */
                </script>"
	 )
		("private"
         :base-directory ,org-private-dir
         :publishing-directory ,prv-html-dir
         :base-extension "org"
         :recursive t
         :publishing-function org-publish-org-to-html
         :headline-levels 3
         :section-numbers nil
         :table-of-contents nil
         :style "<link rel=\"icon\" href=\"theme/favicon.ico\" type=\"image/x-icon\"/><link rel=\"stylesheet\" href=\"./theme/org.css\"  type=\"text/css\"> </link>"
         :auto-preamble t
         :auto-postamble t
         :auto-index t
         :index-filename "index.org"
         :index-title "LooChao's Private"
         :link-home "/index.html"
         )

	 ("private"
         :base-directory ,org-private-dir
         :publishing-directory ,prv-html-dir
         :base-extension "org"
         :recursive t
         :publishing-function org-publish-org-to-html
         :headline-levels 3
         :section-numbers nil
         :table-of-contents nil
         :style "<link rel=\"icon\" href=\"theme/favicon.ico\" type=\"image/x-icon\"/><link rel=\"stylesheet\" href=\"./theme/org.css\"  type=\"text/css\"> </link>"
         :auto-preamble t
         :auto-postamble t
         :auto-index t
         :index-filename "index.org"
         :index-title "LooChao's Private"
         :link-home "/index.html"
         )

	("worg-notes"
         :base-directory ,worg-dir
         :publishing-directory ,worg-html-dir
         :base-extension "org"
         :recursive t
         :publishing-function org-publish-org-to-html
         :headline-levels 3
         :section-numbers nil
         :table-of-contents nil
         :style "<link rel=\"icon\" href=\"theme/favicon.ico\" type=\"image/x-icon\"/><link rel=\"stylesheet\" href=\"worg.css\"  type=\"text/css\"> </link>"
         :auto-preamble t
         :auto-postamble t
         ;; :auto-index t
         ;; :index-filename "index.org"
         ;; :index-title "Hello Worg"
         ;; :link-home "/index.html"
         )
	("worg-static"
	 :base-directory ,worg-dir
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|mp3\\|ogg\\|swf\\|ppt"
	 :publishing-directory ,worg-html-dir
	 :recursive t
	 :publishing-function org-publish-attachment
	 )
	("worg" :components ("worg-notes" "worg-static"))
	))

;; (setq org-export-html-postamble-format
;;       '(("en" "<p class=\"postamble\">Last Updated %d. Created by %c"</p>)))

(defun lch-org-publish-org()
 (interactive)
 (org-publish-project
   (assoc "public" org-publish-project-alist)))

(defun lch-org-publish-prv()
 (interactive)
 (org-publish-project
   (assoc "private" org-publish-project-alist)))

(defun lch-org-publish-worg()
 (interactive)
 (org-publish-project
   (assoc "worg" org-publish-project-alist)))

;;; One-key-map
(defvar one-key-menu-org-export-alist nil
  "`One-Key' menu list for ORG-EXPORT.")

(setq one-key-menu-org-export-alist
      '(
        (("o" . "Org Publish") . org-publish)
        (("p" . "Publish Public") . lch-org-publish-org)
        (("P" . "Publish Private") . lch-org-publish-prv)
        (("w" . "Publish Worg") . lch-org-publish-worg)))

(defun one-key-menu-org-export ()
  "`One-Key' menu for ORG-EXPORT."
  (interactive)
  (one-key-menu "org-export" one-key-menu-org-export-alist t))

(define-key global-map (kbd "M-o") 'one-key-menu-org-export)

;;; PROVIDE
(provide 'lch-org-export)
(message "~~ lch-org-export: done.")

;; Local Variables:
;; mode: emacs-lisp
;; mode: outline-minor
;; outline-regexp: ";;;;* "
;; End:

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-06-21 21:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21  7:43 Upgrade to org 8.0 Chao Lu
2013-06-21  8:30 ` Giovanni Ridolfi
2013-06-21 14:38 ` Suvayu Ali
2013-06-21 14:46   ` John Hendy
2013-06-21 15:47     ` Nicolas Richard
2013-06-21 15:54       ` Achim Gratz
2013-06-21 15:42 ` Achim Gratz
     [not found] ` <CA+M2ft_cdqgpye7-PMxY1c63eTFHrdMRaeeaPW4J=Zb0OYFPXg@mail.gmail.com>
2013-06-21 19:27   ` Chao Lu
2013-06-21 19:34     ` Chao Lu
2013-06-21 20:15       ` Chao Lu
2013-06-21 21:23         ` Suvayu Ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).