emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chao Lu <loochao.list@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Upgrade to org 8.0
Date: Fri, 21 Jun 2013 15:27:36 -0400	[thread overview]
Message-ID: <CAD54YEb2zReMFNZOj_J-QGdDN+cKwPZFh9aRpv9kmaFkQzSkOg@mail.gmail.com> (raw)
In-Reply-To: <CA+M2ft_cdqgpye7-PMxY1c63eTFHrdMRaeeaPW4J=Zb0OYFPXg@mail.gmail.com>


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

Thanks a lot for those replies, which are quite helpful.

1. lch-org.el and lch-org-export.el together completes my conf about org,
which works before 8.0

2. The version I installed is 8.0.3 tar ball instead of git, usually I do
not prefer living at cutting edge.
    - M-x org-version --> "Org-mode version 8.0.3 (8.0.3-dist @
/Users/LooChao/Dropbox/.emacs.d/lisp/org/)"
    - Which reveals the org loaded is the one I installed, which is in my
lisp dir.
    - I agree with John's advice -- keep the new version separate and some
where in the load-path, which is ~/Dropbox/.emacs.d/lisp/org/

3. M-x locate org-publish gives:
'/Applications/Documents/Emacs.app/Contents/Resources/lisp/org/org-publish.elc',
indicating my installation has something wrong...
    still working on it.

Thanks,

Chao


On Fri, Jun 21, 2013 at 8:45 AM, John Hendy <jw.hendy@gmail.com> wrote:

>
> On Jun 21, 2013 2:43 AM, "Chao Lu" <loochao.list@gmail.com> wrote:
> >
> > 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.
> >
>
> Hi,
>
> Where exactly are the new org files installed? I don't see any load paths
> defined.
>
> I think the easiest/simplest/cleanest is to keep the hit version separate
> and just add the lisp dir to your load path vs mixing default org with
> installed git org files.
>
> I didn't catch any defined ox-* backends loaded either. For every backed
> you need to add it to org-export-backends or do:
>
> (require 'ox-backend)
>
> Lastly, you have old variable names in there... org-export-backend-* vars
> are now org-backend-*.
>
> I'd suggest reading the worg doc again!
>
> John
>
> > Chris
> >
> >
>

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

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

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

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

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

;;; Vars
(defvar org-dir (concat emacs-path "/Org") "org dir")
(defvar org-source-dir (concat org-dir "/org")  "org source dir")
(defvar pub-html-dir (concat org-dir "/public_html") "public html dir")
(defvar org-mobile-dir (concat emacs-path "/MobileOrg") "org mobile dir")
(defvar org-private-dir (concat org-dir "/org")  "org private dir")
(defvar prv-html-dir (concat org-dir "/public_html") "private html dir")
(defvar worg-dir (concat git-dir "/worg")  "worg source dir")
(defvar worg-html-dir (concat git-dir "/worg_html") "worg html dir")

;;; Setting
;; Org now part of GNU Emacs
;;(require 'org-install)
(require 'org)

(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(add-to-list 'auto-mode-alist '("README$" . org-mode))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))

(setq org-tags-column -90)

;; (define-key global-map (kbd "C-c l") 'org-store-link)

(setq org-completion-use-ido t)
(setq org-hide-leading-stars t)        ;; Hide the first N-1 stars in a headline.
(setq org-log-done t)
(setq org-export-email-info t)
(setq org-reverse-note-order t)        ;; New notes on top.
(setq org-deadline-warning-days 14)    ;; No. of days to display before expiration of a deadline.

(setq org-directory org-private-dir)
(setq org-agenda-files
      (append (file-expand-wildcards (concat org-source-dir "/*.org"))))
(setq org-export-default-language "EN")

(setq org-mobile-directory org-mobile-dir)
(setq org-mobile-force-id-on-agenda-items nil)
(setq org-mobile-inbox-for-pull (concat org-mobile-dir "/mobileOrg.org"))

(setq org-export-with-LaTeX-fragments t)
;;; Todo
(setq org-use-fast-todo-selection t)
(setq org-todo-keywords '((sequence "QUEUE(q)" "ACTIVE(a)" "PENDING(p@/!)" "|" "DONE(d@/!)" "CANCELLED(c@/!)")
                          (sequence "TOFNSH(t)" "|" "DONE")
                          (sequence "INVOICE(i)" "SENT(n)" "|" "RCVD(r)")
                          (sequence "PROJECT(P)" "|" "DONE(d)")
                          (type "APPT(a)")
                          (type "OBTAIN(o)" "EDU_OBT(e)" "NET_OBT(n)")
                          (type "TOSORT(S)")
                          (type "DELEGATED(d@!)")
                          (type "WAITING(w@/!)")
                          (type "SCHEDULED(s@/!)")
 ))

(setq org-todo-keyword-faces '(
                       ("QUEUE" :foreground "Lavender" :weight bold)
                       ("ACTIVE" :foreground "Cyan" :weight bold)
                       ("TOFNSH" :foreground "PINK" :weight bold)
                       ("DONE" :foreground "PeachPuff2" :weight bold)
                       ;; ("WAITING" :foreground "medium blue" :weight bold)
                       ("APPT" :foreground "medium blue" :weight bold)
                       ("NOTE" :foreground "brown" :weight bold)
                       ("STARTED" :foreground "dark orange" :weight bold)
                       ;; ("TODO" :foreground "red" :weight bold)
                       ("DELEGATED" :foreground "dark violet" :weight bold)
                       ("DEFERRED" :foreground "dark blue" :weight bold)
                       ("SOMEDAY" :foreground "dark blue" :weight bold)
                       ("PROJECT" :height 1.5 :weight bold :foreground "black")
                       ))
;;; Tag
(setq org-fast-tag-selection-single-key t)
(setq org-tag-alist '(
                      ("#A" . ?[)
                      ("#B" . ?])
                      ("#C" . ?\\)

                      ("Audio" . ?a)
                      ("Book" . ?b)
                      ("BIB" . ?B)
                      ("Culture" . ?c)
                      ("ComputerSE" . ?C)
                      ("Doc" . ?d)
                      ;; ("Cookery" . ?)
                      ("EBook" . ?e)
                      ;; ("English" . ?E)
                      ("EDU" . ?E)
                      ("GuoXue" . ?g)
                      ("Humor" . ?h)
                      ("HDoc" . ?H)
                      ("IDEA" . ?i)
                      ("Library" . ?l)
                      ("Life" . ?L)
                      ;; ("Love" . ?)
                      ;; ("List" . ?)
                      ("Mathematics" . ?m)
                      ("OBTAIN" . ?o)
                      ("Org" . ?O)
                      ("PLAN" . ?p)
                      ("Physics" . ?P)
                      ("Question" . ?q)
                      ("Research" . ?r)

                      ("Video" . ?v)
                      ("Web" . ?w)

                      ("ACTIVE" . ?1)
                      ("MOBILE" . ?2)
                      ("AUDIO" . ?3)
                      ("CAR" . ?4)

                      (:startgroup . nil)
                      ("BIB" . ?0)
                      ("STAR3" . ?,)
                      ("STAR4" . ?.)
                      ("STAR5" . ?/)
                      (:endgroup . nil)
                      ))

(setq org-tag-faces
      '(
        ("Audio" . (:foreground "Noccasin" :weight bold))
        ("Book" . (:foreground "Siennal1" :weight bold))
        ("Doc" . (:foreground "PaleGreen" :weight bold))
        ("EBook" . (:foreground "Gold1" :weight bold))
        ("Video" . (:foreground "Violet" :weight bold))

        ("BIB" . (:foreground "DeepSkyBlue" :background "OldLace" :weight bold))
        ("STAR3" . (:foreground "Black" :background "Grey" :weight bold))
        ("STAR4" . (:foreground "Black" :background "SandyBrown" :weight bold))
        ("STAR5" . (:foreground "Black" :background "MistyRose" :weight bold))

        ("Library" . (:foreground "LightCyan" :weight bold))
        ("Mathematics" . (:foreground "Tomato" :weight bold))
        ("Physics" . (:foreground "Peru" :weight bold))
        ("Question" . (:foreground "GreenYellow" :weight bold))
        ("ProbSet" . (:foreground "IndianRed" :weight bold))
        ("DATA" . (:foreground "NavyBlue" :background "OldLace" :weight bold))
        ("IMAGE" . (:foreground "DarkViolet" :background "OldLace" :weight bold))
        ("OBTAIN" . (:foreground "Moccasin" :weight bold))
        ("STUDY" . (:foreground "Gold" :weight bold))
        ("#A" . (:foreground "OrangeRed" :weight bold))
        ("#B" . (:foreground "Pink" :weight bold))
        ("#C" . (:foreground "Light Green" :weight bold))
        ("QUEUE" . (:foreground "Lavender" :weight bold))
        ("ACTIVE" . (:foreground "Cyan" :weight bold))
        ("DONE" . (:foreground "PeachPuff2" :weight bold))

        ("AUDIO" . (:foreground "Cyan" :weight bold))
        ("MOBILE" . (:foreground "Cyan" :weight bold))
        ("CAR" . (:foreground "Cyan" :weight bold))
        ("RECUR" . (:foreground "Cyan" :weight bold))
        ("DAILY" . (:foreground "Cyan" :weight bold))
        ("DUALLY" . (:foreground "Cyan" :weight bold))
        ("TRIPLY" . (:foreground "Cyan" :weight bold))
        ("WEEKLY" . (:foreground "Cyan" :weight bold))
        ))
;;; Babel
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (perl . t)
   (ditaa . t)
   (dot . t)
   (emacs-lisp . t)
   (gnuplot . t)
   (haskell . nil)
   (ocaml . nil)
   (python . t)
   (ruby . t)
   (screen . nil)
   (sh . t)
   (sql . nil)
   (sqlite . t)))

;; No prompt on every code block evaluation
(setq org-confirm-babel-evaluate nil)
;;; Capture
;; %a          annotation, normally the link created with org-store-link
;; %i          initial content, the region when remember is called with C-u.
;; %t          timestamp, date only
;; %T          timestamp with date and time
;; %u, %U      like the above, but inactive timestamps

(define-key global-map (kbd "M-0") 'org-capture)

(setq org-capture-templates
      '(
        ("a" "TODO-#A" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#A" "TODO-#A-") "* %? :#A:\n%U" :prepend t)
	;; ("A" "TODO-#A~" entry (file+olp (concat org-private-dir "/Refile.org") "TODOs" "TODO-#A") "* %? :#A:\n%U" :prepend t)
        ("b" "TODO-#B" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#B" "TODO-#B-") "* %? :#B:\n%U" :prepend t)
        ("B" "ACTIVE-#B" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#B" "TODO-#B-") "* ACTIVE %? :#B:\n%U" :prepend t)
        ("8" "BIB" entry (file+olp (concat org-private-dir "/Refile.org") "BIBs" "BIB") "* %? \n%U" :prepend t)
        ;; ("c" "TODO-#C" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#C" "TODO-#C-") "* %? :#C:\n%U" :prepend t)
        ;; ("C" "TODO-#C~" entry (file+olp (concat org-private-dir "/Refile.org") "TODOs" "TODO-#C") "* %? :#C:\n%U" :prepend t)
        ;; ("c" "COUNT" entry (file+datetree (concat org-private-dir "/iCount.org")) "* %? \n%U" :prepend t)
        ("d" "IDEA" entry (file+olp (concat org-private-dir "/iDea.org") "IDEAs" "IDEA") "* %? \n%U" :prepend t)
        ;; ("g" "GOOD" entry (file+olp (concat org-private-dir "/iPrv.org") "GOOD" "-GOOD-") "* %? :#B:\n%U" :prepend t)
        ;; ("i" "INBOX" entry (file+olp (concat org-private-dir "/Refile.org") "INBOXs" "INBOX") "* %? \n%U" :prepend t)
        ;; ("n" "NOTES" entry (file+olp (concat org-private-dir "/Refile.org") "NOTEs" "NOTE") "* %? \n%U" :prepend t)
        ;; ("q" "QUESTION" entry (file+olp (concat org-private-dir "/iPrv.org") "QUESTIONs" "QUESTION") "* %? \n%U" :prepend t)
        ;; ("l" "LOG" entry (file+datetree (concat org-private-dir "/iLog.org")) "* %U\n%?" :prepend t)
        ;; ("m" "MUSIC" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#C" "MUSICs") "* %? :#C:\n%U" :prepend t)
        ;; ("t" "TODO" entry (file+olp (concat org-private-dir "/Refile.org") "TODOs" "TODO") "* %? \n%U" :prepend t)
        ("o" "OBTAIN" entry (file+olp (concat org-private-dir "/iPrv.org") "TODO-#B" "OBTAINs") "* %? \n%U" :prepend t)
        ;; ("p" "PLAN" entry (file+olp (concat org-private-dir "/iLog.org") "PLANs" "PLAN") "* %u\np%?" :prepend t)
        ;; ("q" "QUESTION" entry (file+olp (concat org-private-dir "/Refile.org") "QUESTIONs" "QUESTION") "* %? \t%U" :prepend t)
        ;; ("v" "VERBAL" entry (file+olp (concat org-private-dir "/English.org") "Verbal" "Verbal") "* %? \n %U" :prepend t)
        ;; ("n" "note" entry (file (concat org-private-dir "/iPrv.org")) "* %? :NOTE: %U %a :CLOCK: :END:" :clock-in t :clock-resume t)
        ;; ("f" "appointment" entry (file+datetree (concat org-private-dir "/iPrv.org")) "* %? %U" :clock-in t :clock-resume t)
        ;; ("p" "Phone call" entry (file (concat org-private-dir "iPrv.org")) "* Phone %(bh/phone-call) - %(gjg/bbdb-company) :PHONE:\n%U\n\n%?" :clock-in t :clock-resume t)
        ;; ("w" "org-protocol" entry (file (concat org-private-dir "iPrv.org")) "* TODO Review %c %U" :immediate-finish t :clock-in t :clock-resume t)
        ))

;;; Agenda
(setq org-agenda-time-grid '((daily require-timed)
			     "________"
			     (0800 1000 1200 1400 1600 1800 2000 2200)))

(define-key global-map (kbd "M-8") 'org-agenda)
(setq org-agenda-custom-commands
      '(
        ("=" "ALL" tags "#A|DAILY|DUALLY|WEEKLY|RECUR|AUDIO|CAR|MOBILE|#B|#C|IDEA")
	("-" agenda "DAY/FOCUS" ((org-agenda-ndays 1)))
	 ;; ("1m" "MOBILE" tags "MOBILE/ACTIVE")
	 ;; ("1a" "AUDIO" tags "AUDIO/ACTIVE")
	 ;; ("1c" "CAR" tags "CAR/ACTIVE")
	 ;; ("1d" "RECUR DAILY" tags "DAILY/ACTIVE")
	 ;; ("1D" "RECUR DUALLY" tags "DUALLY/ACTIVE")
	 ;; ("1t" "RECUR TRIPLY" tags "TRIPLY/ACTIVE")
	 ;; ("1w" "RECUR WEEKLY" tags "WEEKLY/ACTIVE")
        ("`" "ALL TODO"
         (
	  (tags "#A/ACTIVE|WAITING")
	  (tags "#B|OBTAIN/ACTIVE")
          (tags "DAILY/TOFNSH")
	  (tags "DAILY|DUALLY|WEEKLY|RECUR/ACTIVE")
          (tags "MOBILE|AUDIO|CAR/ACTIVE")
	  (tags "#C/ACTIVE")
          ))
        ("1" "ACTIVE TODO-#A"
         (
          ;; (tags "PLAN/ACTIVE" ((org-agenda-overriding-header
          ;; ";>--------PLAN--------<;")))
	  (tags "#A/ACTIVE|WAITING" ((org-agenda-overriding-header
                                      ";>--------ACTIVE & #A TASKs--------<;")))
	  (agenda "Week Agenda" ((org-agenda-ndays 12)
				 (org-agenda-sorting-strategy
				  (quote ((agenda time-up priority-down tag-up))))
				 (org-deadline-warning-days 0)
				 (org-agenda-overriding-header
				  "\n;>--------AGENDA--------<;")))
	  (tags "#A/PENDING" ((org-agenda-overriding-header
                               ";>--------PENDING #A TASKs--------<;")))
          ))
	 ("2" "ACTIVE BLOCKS"
	  (
           (tags "MOBILE|AUDIO|CAR/ACTIVE")
           (tags "DAILY|DUALLY|WEEKLY/ACTIVE")
           (tags "#B|OBTAIN/ACTIVE")
           (tags "#C/ACTIVE")
	   )
	  )
 	 ("3" "RECUR ACTIVE"
	  (
	   (tags "DAILY/ACTIVE")
	   (tags "DUALLY/ACTIVE")
	   (tags "WEEKLY/ACTIVE")
	   ;; (tags "RECUR/ACTIVE")
	   ))
         ("4" "RECUR TOFNSH"
          (
           (tags "DAILY|DUALLY|WEEKLY/TOFNSH")
           ))
	 ("5" "FUN ITEMS" tags "FUN")
         ("0" .  "MISCITEMS")
	 ("01" "TODO-#A QUEUE" tags "#A-ACTIVE")
	 ("02" "TODO-#B/#C/OBT QUEUE" tags "#B|OBTAIN|#C/QUEUE")
	 ("03" "ACM QUEUE" tags "AUDIO|CAR|MOBILE/QUEUE")
	 ("04" "TODO-#B" tags "#B")
	 ("05" "OBTAIN" tags "OBTAIN")
	 ("06" "TODO-#C" tags "#C")
	 ;; ("10" "TEST" occur-tree "Title="Quantum Mechanics"")
	 ;;       (agenda "")
	 ;;       (todo "ACTIVE|NEXT|QUEUE")
	 ;;       (tags "ACTIVE|TIMEBOX|MOBILE|AUDIO|CAR|DAILY|DUALLY|WEEKLY")
	 ;;  (todo "ACTIVE")
	 ;;  (tags "CAR")
	 ;;       ))
	 ;;  ("lpq" "Quantum Mechanics" tags "KEYWORD=\"Quantum Mechanics,\"")
      ("p" "Printed agenda"
         ((agenda "" ((org-agenda-ndays 7)                      ;; overview of appointments
                      (org-agenda-start-on-weekday nil)         ;; calendar begins today
                      (org-agenda-repeating-timestamp-show-all t)
                      (org-agenda-entry-types '(:timestamp :sexp))))
          (agenda "" ((org-agenda-ndays 1)                      ;; daily agenda
                      (org-deadline-warning-days 7)             ;; 7 day advanced warning for deadlines
                      (org-agenda-todo-keyword-format "[ ]")
                      (org-agenda-scheduled-leaders '("" ""))
                      (org-agenda-prefix-format "%t%s")))
          (todo "#B"                                          ;; todos sorted by context
                ((org-agenda-prefix-format "[ ] %T: ")
                 (org-agenda-sorting-strategy '(tag-up priority-down))
                 (org-agenda-todo-keyword-format "")
                 (org-agenda-overriding-header "\nTasks by Context\n------------------\n"))))
         ()
         )
 	("p" . "Priorities")
        ("pa" "A items" tags-todo "+PRIORITY=\"A\"")
        ("pb" "B items" tags-todo "+PRIORITY=\"B\"")
        ("pc" "C items" tags-todo "+PRIORITY=\"C\"")

	("t" . "Tags")
	("ta" "ALL #B" tags "#B" ((org-agenda-prefix-format "[ ] %T: ")
                 (org-agenda-sorting-strategy '(tag-up priority-down))
                 (org-agenda-todo-keyword-format "")
                 (org-agenda-overriding-header "8<========ALL #B========>8")
		 (org-agenda-with-colors t)
		 (org-agenda-compact-blocks nil)
		 (org-agenda-remove-tags t)))
	("te" "Emacs #B" tags "#B" ((org-agenda-files (list (concat org-source-dir "/iPrv.org")))))
        ))
;;; PROVIDE
(provide 'lch-org)
(message "~~ lch-org: done.")

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

[-- Attachment #3: 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:

  parent reply	other threads:[~2013-06-21 19:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-06-21 19:34     ` Chao Lu
2013-06-21 20:15       ` Chao Lu
2013-06-21 21:23         ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD54YEb2zReMFNZOj_J-QGdDN+cKwPZFh9aRpv9kmaFkQzSkOg@mail.gmail.com \
    --to=loochao.list@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).