UP | HOME

Setup

Table of Contents

1 Emacs setup

Add the following elisp code to your emacs config file (i.e. ~/.emacs)

;;
;; this is the file used for the publication of the tty.cl website
;; if you want to do changes to the publication system this is the place

;; to debug the .emacs file
(setq debug-on-error t)

(global-font-lock-mode t)
(require 'font-lock) ; enable syntax highlighting

;; define the ispell dictionary to use
(setq ispell-dictionary "en")

; (add-to-list 'exec-path "~/bin/")
; (add-to-list 'exec-path "~/lib/elisp/")
; (add-to-list 'load-path "~/lib/elisp/")
; (add-to-list 'load-path "~/lib/elisp/ess/lisp/")
; (add-to-list 'load-path "~/git/org-mode-release/")
(add-to-list 'load-path "~/emacs.tty.cl/org-mode.git/lisp/")
(add-to-list 'load-path "~/emacs.tty.cl/org-mode.git/contrib/lisp/")

; (load "~/lib/elisp/htmlize.el")
; (load "~/lib/elisp/gnuplot.el")
; (global-font-lock-mode 1)
(show-paren-mode 1)

(require 'org)
(require 'org-html)
(require 'htmlize)
;; (require 'org-install)
;; (require 'org-publish)
;; (require 'org-mime)
;; (require 'org-checklist)

(eval-after-load "org-html"
'(setq org-export-html-scripts
       (concat org-export-html-scripts "\n"
               "<script type=\"text/javascript\">
var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));
</script>
<script type=\"text/javascript\">
try {
var pageTracker = _gat._getTracker(\"UA-2675698-2\");
pageTracker._trackPageview();
} catch(err) {}</script>
")))

(setq org-export-default-language "en"
      org-export-html-extension "html"
      org-export-with-timestamps nil
      org-export-with-section-numbers nil
      org-export-with-tags 'not-in-toc
      org-export-skip-text-before-1st-heading nil
      org-export-with-sub-superscripts '{}
      org-export-with-LaTeX-fragments t
      org-export-with-archived-trees nil
      org-export-highlight-first-table-line t
      org-export-latex-listings-w-names nil
      org-export-html-style-include-default nil
      org-export-htmlize-output-type 'css
      org-startup-folded nil
      org-publish-list-skipped-files t
      org-publish-use-timestamps-flag t
      org-export-babel-evaluate nil
      org-confirm-babel-evaluate nil)

(setq org-export-htmlize-output-type 'css)

(setq org-todo-keywords (quote ((sequence "TODO(t)" "STARTED(s!)" "|" "DONE(d!/!)" "REJECTED(r)")
                                (sequence "WAITING(w@/!)" "SOMEDAY(S!)" "OPEN(O@)" "|" "CANCELLED(c@/!)")
                                (sequence "QUOTE(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)"))))

(setq org-todo-keyword-faces (quote (("TODO" :foreground "#FFCC6E" :weight bold)
                                     ("STARTED" :foreground "blue" :weight bold)
                                     ("DONE" :foreground "forest green" :weight bold)
                                     ("WAITING" :foreground "orange" :weight bold)
                                     ("SOMEDAY" :foreground "magenta" :weight bold)
                                     ("CANCELLED" :foreground "forest green" :weight bold)
                                     ("QUOTE" :foreground "red" :weight bold)
                                     ("QUOTED" :foreground "magenta" :weight bold)
                                     ("APPROVED" :foreground "forest green" :weight bold)
                                     ("EXPIRED" :foreground "forest green" :weight bold)
                                     ("REJECTED" :foreground "forest green" :weight bold)
                                     ("FAIL" :foreground "red" :weight bold)
                                     ("OPEN" :foreground "blue" :weight bold))))

(setq org-priority-faces (quote (("A" :foreground "#E01B4C")
                                 ("B" :foreground "#1739BF")
                                 ("#C" :foreground "#575757"))))

(setq org-fast-tag-selection-include-todo t)
(setq org-use-fast-todo-selection t)
(setq org-treat-S-cursor-todo-selection-as-state-change t)
(setq org-log-done 'time)

(setq org-publish-project-alist
'(
  ("org-site"
   :base-directory "~/tty.cl.git/"
   :base-extension "org"
   :publishing-directory "~/tty.cl/"
   :recursive t
   :publishing-function org-publish-org-to-html
   :headline-levels 4             ; Just the default for this project.
   :section-numbers nil
   :auto-preamble t
   :html-postamble "<p class=\"author\">Author: %a (%e)</p>
<p class=\"creator\">Generated by %c on %d</p>
<p class=\"xhtml-validation\">%v</p>
<p class=\"copyright\">Copyright &copy; 2011 tty team</p>
<p class=\"notice\">Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.</p>
"
   :auto-index t                  ; Generate index.org automagically...
   :index-filename "sitemap.org"  ; ... call it sitemap.org ...
   :index-title "Sitemap"         ; ... with title 'Sitemap'.
   :style "<link rel=\"stylesheet\" title=\"Standard\" href=\"/css/style.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"/css/code.css\" type=\"text/css\" />"
   )
  ("org-static"
   :base-directory "~/tty.cl.git/"
   :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
   :publishing-directory "~/tty.cl/"
   :recursive t
   :publishing-function org-publish-attachment
   )
  ("site" :components ("org-site" "org-static"))
))

Author: Felipe Reyes (freyes@tty.cl)

Generated by Org version 7.5 with Emacs version 23 on 2010-09-01 Wed

Validate XHTML 1.0

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.