Advertisement
Guest User

New exporter emacs-config.org file

a guest
Mar 17th, 2013
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. * Set window options
  2.  
  3. Sets font size, window location, width, and height.
  4.  
  5. #+begin_src emacs-lisp
  6. ;; font size, window height/width/placement
  7. (set-face-attribute 'default nil :height 100)
  8. (setq initial-frame-alist
  9. '((left . 0) (top . 16)
  10. (width . 120) (height . 46)))
  11. (tool-bar-mode 0)
  12. #+end_src
  13.  
  14. Font and toolbar
  15.  
  16. #+begin_src
  17. ;; (set-face-attribute 'default nil :font "Droid Sans Mono Slashed-10")
  18. (set-face-attribute 'default nil :height 100)
  19. (setq initial-frame-alist
  20. '((left . 0) (top . 16)
  21. (width . 120) (height . 52)))
  22. (tool-bar-mode 0)
  23. #+end_src
  24.  
  25. * Org-mode options
  26.  
  27. Load orgmode modules:
  28.  
  29. #+begin_src emacs-lisp
  30. (require 'org-inlinetask)
  31. (require 'org-impress-js)
  32. #+end_src
  33.  
  34. Export backends
  35.  
  36. #+begin_src emacs-lisp
  37.  
  38. (setq org-export-backends (quote (
  39. ascii
  40. md
  41. beamer
  42. s5
  43. taskjuggler)))
  44.  
  45. (require 'ox-latex)
  46. (require 'ox-html)
  47. (require 'ox-odt)
  48.  
  49.  
  50. #+end_src
  51.  
  52. Setup beamer export template:
  53.  
  54. #+begin_src emacs-lisp
  55. (add-to-list 'org-latex-classes
  56. '("beamer"
  57. "\\documentclass\[presentation\]\{beamer\}"
  58. ("\\section\{%s\}" . "\\section*\{%s\}")
  59. ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
  60. ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
  61. #+end_src
  62.  
  63. Org-specific keyboard shorcuts
  64.  
  65. #+begin_src emacs-lisp
  66. (global-set-key "\C-cl" 'org-store-link)
  67. (global-set-key "\C-ca" 'org-agenda)
  68. #+end_src
  69.  
  70.  
  71. Org-mode appearance tweaks
  72.  
  73. #+begin_src emacs-lisp
  74. (setq org-hide-leading-stars t)
  75. (setq org-blank-before-new-entry nil)
  76. (setq org-link-file-path-type (quote absolute))
  77. #+end_src
  78.  
  79.  
  80. Todo keywords
  81.  
  82. #+begin_src emacs-lisp
  83. ;; todos
  84. (setq org-todo-keywords '((sequence
  85. "todo(t)" "next(n)" "wait(w@)" "|"
  86. "done(d)" "cancelled(c@/@)")))
  87. #+end_src
  88.  
  89. Clocking
  90.  
  91. #+begin_src emacs-lisp
  92. ;; clocks
  93. (require 'org-clock)
  94. (setq org-clock-into-drawer t)
  95. (global-set-key "\C-cr" 'org-resolve-clocks)
  96. (global-set-key "\C-ce" 'org-set-effort)
  97. (setq org-clock-out-remove-zero-time-clocks t)
  98. (setq org-clock-out-when-done t)
  99. #+end_src
  100.  
  101.  
  102. Log into drawers
  103.  
  104. #+begin_src emacs-lisp
  105. ;; logging
  106. (setq org-log-into-drawer t)
  107. (setq org-log-done (quote time))
  108. #+end_src
  109.  
  110.  
  111. Refiling and archiving
  112.  
  113. #+begin_src emacs-lisp
  114. ;; file format, allow creating headlines in refile
  115. ;;(setq org-refile-allow-creating-parent-nodes (quote confirm))
  116. (setq org-archive-location "~/org/archive/archive_2012.org::* From %s")
  117. (setq org-archive-save-context-info
  118. (quote (time file itags olpath)))
  119. (setq org-refile-targets (quote ((nil :maxlevel . 3)
  120. (org-agenda-files :maxlevel . 3))))
  121. (setq org-refile-use-outline-path (quote file))
  122.  
  123. ;; open org archive files in org-mode
  124. (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\)$" . org-mode))
  125. #+end_src
  126.  
  127.  
  128. Capture templates
  129.  
  130. #+begin_src emacs-lisp
  131. ;; capture
  132. (global-set-key "\C-cc" 'org-capture)
  133. (setq org-capture-templates
  134. '(("l" "log" entry (file+headline "~/org/capture.org" "Log")
  135. "* %? \n%u " :clock-in t :clock-resume t)
  136. ("t" "task" entry (file+headline "~/org/projects.org" "Tasks")
  137. "* todo %? %^g\n%u" :prepend t)
  138.  
  139. ("c" "clock" entry (file+datetree "~/org/clocking.org")
  140. "* %?\n%u" :clock-in t :clock-keep t)))
  141. #+end_src
  142.  
  143.  
  144. Agenda options
  145.  
  146. #+begin_src emacs-lisp
  147. ;; agenda stuff
  148. ;;(setq org-agenda-todo-ignore-scheduled (quote future))
  149. ;;(setq org-agenda-todo-ignore-deadlines (quote far))
  150. (setq org-agenda-skip-scheduled-if-done t)
  151. (setq org-agenda-skip-deadline-if-done t)
  152. (setq org-agenda-show-all-dates nil)
  153. (setq org-deadline-warning-days 7)
  154. (setq org-agenda-custom-commands
  155. '(("w" "Agenda"
  156. ((agenda "" ((org-agenda-ndays 7)))
  157.  
  158. (todo "next"
  159. ((org-agenda-overriding-header "Next Actions")))
  160.  
  161. (todo "proj"
  162. ((org-agenda-overriding-header "Projects"))
  163. (org-agenda-sorting-strategy
  164. '(todo-state-down category-keep)))))
  165.  
  166. ("e" "Export"
  167. ((agenda "" ((org-agenda-ndays 7)))
  168.  
  169. (todo "next"
  170. ((org-agenda-overriding-header "Next Actions")))))
  171. ))
  172. #+end_src
  173.  
  174. Babel options
  175.  
  176. #+begin_src emacs-lisp
  177. (require 'ess-site)
  178. (setq org-confirm-babel-evaluate nil)
  179. #+end_src
  180.  
  181. Functionality options
  182.  
  183. #+begin_src emacs-lisp
  184. ;; taskjuggler options
  185. (setq org-export-taskjuggler-target-version 3.1)
  186. (setq org-export-taskjuggler-default-reports (quote ("include \"reports.tji\"")))
  187.  
  188. ;; export options
  189. ;; (setq org-export-html-validation-link "")
  190. ;; (setq org-export-latex-tag-markup "\\hfill\\textbf{%s}")
  191.  
  192. ;; booktabs tables
  193. ;; (setq org-export-latex-tables-hline "\\midrule")
  194. ;; (setq org-export-latex-tables-tstart "\\toprule")
  195. ;; (setq org-export-latex-tables-tend "\\bottomrule")
  196. #+end_src
  197.  
  198. * Keyboard shortcut definitions
  199.  
  200. Copy/paste with clipboard functionality.
  201.  
  202. #+begin_src emacs-lisp
  203. ;; get copy and paste to the clipboard
  204. (global-set-key "\C-w" 'clipboard-kill-region)
  205. (global-set-key "\M-w" 'clipboard-kill-ring-save)
  206. (global-set-key "\C-y" 'clipboard-yank)
  207. #+end_src
  208.  
  209. * Fill options
  210.  
  211. #+begin_src emacs-lisp
  212. (setq-default fill-column 90)
  213. (add-hook 'text-mode-hook 'turn-on-auto-fill)
  214.  
  215. ;; unfill region function
  216. (defun unfill-paragraph ()
  217. "Takes a multi-line paragraph and makes it into a single line of text."
  218. (interactive)
  219. (let ((fill-column (point-max)))
  220. (fill-paragraph nil)))
  221. #+end_src
  222.  
  223. * Sunrise commander
  224.  
  225. #+begin_src emacs-lisp
  226. ;; sunrise-commander
  227. (require 'sunrise-commander)
  228. (require 'dired-x)
  229. (setq dired-omit-files "^\\...+$")
  230. (require 'openwith)
  231. (openwith-mode t)
  232. #+end_src
  233.  
  234. * Misc
  235.  
  236. #+begin_src emacs-lisp
  237. ;; no backup files
  238. (setq make-backup-files nil)
  239. #+end_src
  240.  
  241. magit
  242.  
  243. #+begin_src emacs-lisp
  244. (require 'magit)
  245. #+end_src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement