]> git.donarmstrong.com Git - emacs.git/blobdiff - .emacs
I actually do not want cperl-indent-parens-as-block because I hate that code style
[emacs.git] / .emacs
diff --git a/.emacs b/.emacs
index 98063beef144eb8ef9dd46eb997895dfba28e6e9..5fe719e7df4f3b2c956cdbf4110edee178664398 100644 (file)
--- a/.emacs
+++ b/.emacs
 (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)
   "Delete frame at remember finalization"
   (progn (if my-org-protocol-flag (delete-frame))
          (setq my-org-protocol-flag nil)))
+(defadvice org-capture-refile (around delete-frame-after-refile activate)
+  "Delete frame at remember refile"
+  (if my-org-protocol-flag
+      (progn
+        (setq my-org-protocol-flag nil)
+        ad-do-it
+        (delete-frame))
+    ad-do-it)
+  )
 (defadvice org-capture-kill (after delete-frame-at-end activate)
   "Delete frame at remember abort"
   (progn (if my-org-protocol-flag (delete-frame))
@@ -280,12 +293,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")))
 
@@ -663,6 +677,14 @@ 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")
@@ -743,6 +765,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")