X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=.emacs;h=ed0fd4ca40aa60a8e5ebf9330a65f094d6df8896;hb=2be438d0b30ebd4a30fd6ef683bad4047d6530bf;hp=d28fe5472c6ced8c8c5f0563c622d77548687f1e;hpb=6396c1f855705d692d12284a0f573961828567c9;p=emacs.git diff --git a/.emacs b/.emacs index d28fe54..ed0fd4c 100644 --- a/.emacs +++ b/.emacs @@ -98,10 +98,11 @@ "~/projects/sysadmin/sndservers/sndservers.org" "~/projects/chaim/chaim.org" "~/projects/chaim/papers/gwas_paper_2012/gwas_paper.org" + "~/projects/reviews/reviews.org" "~/projects/fh/fh.org"))) (setq org-global-properties '(("Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00"))) -(setq org-columns-default-format "%40ITEM(Task) %TAGS %PRIORITY %TODO %13SCHEDULED %17Effort(Estimated Effort){:} %CLOCKSUM") +(setq org-columns-default-format "%40ITEM(Task) %TAGS %PRIORITY %TODO %13SCHEDULED %13DEADLINE %6Effort{:} %CLOCKSUM") (setq org-default-notes-file "~/projects/notes/notes.org") (setq org-capture-templates ;; mail-specific note template, identified by "m" @@ -134,6 +135,10 @@ (add-hook 'org-clock-out-hook 'bh/remove-empty-drawer-on-clock-out 'append) +; resolve clocks after 10 minutes of idle; use xprintidle +(setq org-clock-idle-time 10) +(setq org-clock-x11idle-program-name "xprintidle") + ; this is from http://doc.norang.ca/org-mode.html#Capture ; use C-M-r for org mode capture (global-set-key (kbd "C-M-r") 'org-capture) @@ -192,6 +197,9 @@ (setq my-org-protocol-flag t)) +;; org modules +(add-to-list 'org-modules 'org-habit) + ; this comes from http://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/ (defun open-mail-in-mutt (message) "Open a mail message in Mutt, using an external terminal. @@ -289,12 +297,13 @@ Argument DESCRIPTION MIME description." cperl-auto-newline nil cperl-auto-newline-after-colon nil cperl-continued-statement-offset 4 - cperl-brace-offset -4 + cperl-brace-offset -1 cperl-continued-brace-offset 0 cperl-label-offset -4 cperl-highlight-variables-indiscriminately t cperl-electric-lbrace-space nil - cperl-indent-parens-as-block t + cperl-indent-parens-as-block nil + cperl-close-paren-offset -1 cperl-tab-always-indent t) ;(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle"))) @@ -554,6 +563,7 @@ Argument DESCRIPTION MIME description." (?h . "*** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l paper]]"))) )) (define-key org-mode-map (kbd "C-c )") 'reftex-citation) + (define-key org-mode-map (kbd "C-c [") 'reftex-citation) (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search) (define-key org-mode-map (kbd "C-c 0") 'reftex-view-crossref) ) @@ -569,6 +579,8 @@ Argument DESCRIPTION MIME description." (shell-command (format "%s %s" (substitute-in-file-name "$HOME/bin/bibtex_to_paper") bibtexkey))) +(org-add-link-type "papers" 'open-research-paper) + ;; stolen from ;; http://www-public.it-sudparis.eu/~berger_o/weblog/2012/03/23/how-to-manage-and-export-bibliographic-notesrefs-in-org-mode/ @@ -592,6 +604,10 @@ Argument DESCRIPTION MIME description." (setq-default org-directory "/home/don/org-mode/") (setq-default org-mobile-inbox-for-pull "/home/don/org-mode/from-mobile.org") +;; org mode ical export +(setq org-icalendar-timezone "America/Los_Angeles") +(setq org-icalendar-use-scheduled '(todo-start event-if-todo)) +(setq org-icalendar-store-UID t) ;; org latex ;; stolen from http://kieranhealy.org/esk/kjhealy.html (require 'org-latex) @@ -633,6 +649,15 @@ Argument DESCRIPTION MIME description." ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) +(add-to-list 'org-latex-classes + '("letter" + "\\documentclass[11pt]{letter}" + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432 ;; but adapted to use latexmk 4.22 or higher. (defun my-auto-tex-cmd () @@ -672,10 +697,22 @@ Argument DESCRIPTION MIME description." (add-hook 'org-latex-after-initial-vars-hook 'my-auto-tex-parameters) +; support ignoring headers in org mode export to latex +; from http://article.gmane.org/gmane.emacs.orgmode/67692 +(defadvice org-latex-headline (around my-latex-skip-headlines + (headline contents info) activate) + (if (member "ignoreheading" (org-element-property :tags headline)) + (setq ad-return-value contents) + ad-do-it)) + ; debian stuff (setq-default debian-changelog-mailing-address "don@debian.org") (setq-default debian-changelog-full-name "Don Armstrong") +; ediff configuration +; don't use the multi-window configuration +(setq ediff-window-setup-function 'ediff-setup-windows-plain) + ; use iedit (require 'iedit) (define-key global-map (kbd "C-;") 'iedit-mode) @@ -752,6 +789,10 @@ want to use in the modeline *in lieu of* the original.") (setq flymake-mode-line mode-line) (force-mode-line-update))) +; load sql-indent when sql is loaded +(eval-after-load "sql" + '(load-library "sql-indent")) + ; fix up tmux xterm keys ; stolen from http://unix.stackexchange.com/questions/24414/shift-arrow-not-working-in-emacs-within-tmux (if (getenv "TMUX")