Skip to content

Commit

Permalink
Various updates
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wiegley committed Jan 19, 2013
1 parent 60bf04b commit 6fc4a60
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 40 deletions.
120 changes: 91 additions & 29 deletions init.el
Expand Up @@ -1157,6 +1157,16 @@
:config :config
(progn (progn
(use-package preview) (use-package preview)
(use-package ac-math)

(defun ac-latex-mode-setup ()
(nconc ac-sources
'(ac-source-math-unicode ac-source-math-latex
ac-source-latex-commands)))

(add-to-list 'ac-modes 'latex-mode)
(add-hook 'latex-mode-hook 'ac-latex-mode-setup)

(info-lookup-add-help :mode 'latex-mode (info-lookup-add-help :mode 'latex-mode
:regexp ".*" :regexp ".*"
:parse-rule "\\\\?[a-zA-Z]+\\|\\\\[^a-zA-Z]" :parse-rule "\\\\?[a-zA-Z]+\\|\\\\[^a-zA-Z]"
Expand Down Expand Up @@ -1529,7 +1539,12 @@ iflipb-next-buffer or iflipb-previous-buffer this round."
(if (string-match "^\\(.+?\\)-[0-9._-]+$" pat) (if (string-match "^\\(.+?\\)-[0-9._-]+$" pat)
(setq pat (match-string 1 pat))) (setq pat (match-string 1 pat)))
(or (gethash pat mark-files-cache) (or (gethash pat mark-files-cache)
(ignore (puthash pat t mark-files-cache)))))) (ignore (puthash pat t mark-files-cache)))))

(defun dired-mark-similar-version ()
(interactive)
(setq mark-files-cache (make-hash-table :test #'equal))
(dired-mark-sexp '(mark-similar-versions name))))


:config :config
(progn (progn
Expand Down Expand Up @@ -1793,40 +1808,45 @@ The output appears in the buffer `*Async Shell Command*'."
:nick "johnw" :nick "johnw"
:password (funcall :password (funcall
(plist-get (plist-get
(car (auth-source-search :host "192.168.9.135" (car (auth-source-search
:user "johnw/freenode" :host "192.168.9.135"
:type 'netrc :user "johnw/freenode"
:port 6697)) :type 'netrc
:port 6697))
:secret))) :secret)))
(erc :server "192.168.9.135" (erc :server "192.168.9.135"
:port 6697 :port 6697
:nick "johnw" :nick "johnw"
:password (funcall :password (funcall
(plist-get (plist-get
(car (auth-source-search :host "192.168.9.135" (car (auth-source-search
:user "johnw/welltyped" :host "192.168.9.135"
:type 'netrc :user "johnw/welltyped"
:port 6697)) :type 'netrc
:port 6697))
:secret))) :secret)))
(erc :server "192.168.9.135" (when nil
:port 6697 (erc :server "192.168.9.135"
:nick "johnw" :port 6697
:password (funcall :nick "johnw"
(plist-get :password (funcall
(car (auth-source-search :host "192.168.9.135" (plist-get
:user "johnw/oftc" (car (auth-source-search
:type 'netrc :host "192.168.9.135"
:port 6697)) :user "johnw/oftc"
:secret)))) :type 'netrc
:port 6697))
:secret)))))
(erc-tls :server "irc.freenode.net" (erc-tls :server "irc.freenode.net"
:port 6697 :port 6697
:nick "johnw" :nick "johnw"
:password (funcall :password (funcall
(plist-get (plist-get
(car (auth-source-search :host "irc.freenode.net" (car (auth-source-search
:user "johnw" :host "irc.freenode.net"
:type 'netrc :user "johnw"
:port 6667)) :type 'netrc
:port 6667))
:secret))) :secret)))


(erc :server "irc.well-typed.com" (erc :server "irc.well-typed.com"
Expand All @@ -1845,10 +1865,11 @@ The output appears in the buffer `*Async Shell Command*'."
:nick "johnw" :nick "johnw"
:password (funcall :password (funcall
(plist-get (plist-get
(car (auth-source-search :host "bitlbee" (car (auth-source-search
:user "johnw" :host "bitlbee"
:type 'netrc :user "johnw"
:port 6667)) :type 'netrc
:port 6667))
:secret)))) :secret))))


;; (add-hook 'after-init-hook 'im) ;; (add-hook 'after-init-hook 'im)
Expand Down Expand Up @@ -2035,6 +2056,44 @@ FORM => (eval FORM)."
(use-package fetchmail-mode (use-package fetchmail-mode
:commands fetchmail-mode) :commands fetchmail-mode)


;;;_ , flycheck

(use-package flycheck
:load-path ("site-lisp/flycheck/deps/dash.el"
"site-lisp/flycheck/deps/s.el")
:init
(progn
(flycheck-declare-checker ghc
"Haskell checker using ghc"
:command '("ghc" "-fno-code" "-v0" source-inplace)
:error-patterns
'(((concat "^\\(?1:.*?\\):\\(?2:[0-9]+\\):\\(?3:[0-9]+\\):[ \t\n\r]*"
"\\(?4:\\(.\\|[ \t\n\r]\\)+?\\)\\(^[^ \t\n\r]\\|\\'\\)") error))
:modes 'haskell-mode)

(flycheck-declare-checker haskell-hdevtools
"Haskell checker using hdevtools"
:command '("hdevtools" "check" "-g" "-fno-code" source-inplace)
:error-patterns
'(((concat "^\\(?1:.*?\\):\\(?2:[0-9]+\\):\\(?3:[0-9]+\\):[ \t\n\r]*"
"\\(?4:\\(.\\|[ \t\n\r]\\)+?\\)\\(^[^ \t\n\r]\\|\\'\\)") error))
:modes 'haskell-mode)

(flycheck-declare-checker haskell-hlint
"Haskell checker using hlint"
:command '("hlint" "check" "-g" "-fno-code" source-inplace)
:error-patterns
'(((concat "^\\(?1:.*?\\):\\(?2:[0-9]+\\):\\(?3:[0-9]+\\):[ \t\n\r]*"
"\\(?4:\\(.\\|[ \t\n\r]\\)+?\\)\\(^[^ \t\n\r]\\|\\'\\)") error))
:modes 'haskell-mode)

(flycheck-declare-checker bash
"Bash checker"
:command '("bash" "--norc" "--noprofile" "-n" source)
:error-patterns '(("^\\(?1:.*\\): line \\(?2:[0-9]+\\): \\(?4:.*\\)$" error))
:modes 'sh-mode
:predicate '(eq sh-shell 'bash))))

;;;_ , flyspell ;;;_ , flyspell


(use-package ispell (use-package ispell
Expand Down Expand Up @@ -2099,7 +2158,7 @@ FORM => (eval FORM)."
(use-package grep-ed) (use-package grep-ed)


(grep-apply-setting 'grep-command "egrep -nH -e ") (grep-apply-setting 'grep-command "egrep -nH -e ")
(if t (if nil
(grep-apply-setting 'grep-find-command '("gf -e " . 7)) (grep-apply-setting 'grep-find-command '("gf -e " . 7))
(grep-apply-setting (grep-apply-setting
'grep-find-command 'grep-find-command
Expand Down Expand Up @@ -2691,6 +2750,8 @@ FORM => (eval FORM)."
(progn (progn
(setenv "GIT_PAGER" "") (setenv "GIT_PAGER" "")


(unbind-key "M-s" magit-mode-map)

(add-hook 'magit-log-edit-mode-hook (add-hook 'magit-log-edit-mode-hook
#'(lambda () #'(lambda ()
(set-fill-column 72) (set-fill-column 72)
Expand Down Expand Up @@ -3194,7 +3255,8 @@ FORM => (eval FORM)."
;; (add-hook 'sage-startup-after-prompt-hook 'sage-view-disable-inline-output) ;; (add-hook 'sage-startup-after-prompt-hook 'sage-view-disable-inline-output)
(add-hook 'sage-startup-after-prompt-hook 'sage-view-disable-inline-plots t) (add-hook 'sage-startup-after-prompt-hook 'sage-view-disable-inline-plots t)
;; to enable some combination of features ;; to enable some combination of features
))
(bind-key "C-c Z" 'sage)))


;;;_ , selectkey ;;;_ , selectkey


Expand Down
8 changes: 8 additions & 0 deletions lisp/fetchmail-ctl.el
Expand Up @@ -93,6 +93,14 @@
(funcall func))) (funcall func)))
(get-buffer name))))) (get-buffer name)))))


(defun get-buffer-and-call-func (name func)
(let ((buf (get-buffer name)))
(if (and buf
(or (not (get-buffer-process buf))
(not (eq 'run (process-status (get-buffer-process buf))))))
(kill-buffer buf))
(get-buffer-or-call-func name func)))

(defun switch-to-fetchmail () (defun switch-to-fetchmail ()
(interactive) (interactive)
(let ((fetchmail-buf (let ((fetchmail-buf
Expand Down
2 changes: 1 addition & 1 deletion lisp/haskell-config
Submodule haskell-config updated 1 files
+82 −0 helm-hoogle.el
4 changes: 0 additions & 4 deletions lisp/helm-commands.el
Expand Up @@ -38,10 +38,6 @@
(type . file)) (type . file))
"Search for files in the current Git project.") "Search for files in the current Git project.")


(eval-after-load "helm-files"
'(add-to-list 'helm-for-files-preferred-list
'helm-c-source-git-files))

(defvar helm-c-source-zsh-history (defvar helm-c-source-zsh-history
'((name . "Zsh History") '((name . "Zsh History")
(candidates . helm-c-zsh-history-set-candidates) (candidates . helm-c-zsh-history-set-candidates)
Expand Down
4 changes: 2 additions & 2 deletions org-settings.el
Expand Up @@ -6,10 +6,10 @@
'(org-M-RET-may-split-line (quote ((headline) (default . t)))) '(org-M-RET-may-split-line (quote ((headline) (default . t))))
'(org-adapt-indentation nil) '(org-adapt-indentation nil)
'(org-agenda-auto-exclude-function (quote org-my-auto-exclude-function)) '(org-agenda-auto-exclude-function (quote org-my-auto-exclude-function))
'(org-agenda-custom-commands (quote (("h" "Current Hotlist" tags "HOT&TODO=\"PROJECT\"" ((org-agenda-overriding-header "Current Hotlist"))) ("H" "Non-Hot Projects" tags "-HOT&TODO=\"PROJECT\"" ((org-agenda-overriding-header "Non-Hot Projects"))) ("A" "Priority #A tasks" agenda "" ((org-agenda-ndays 1) (org-agenda-overriding-header "Today's priority #A tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))))) ("b" "Priority #A and #B tasks" agenda "" ((org-agenda-ndays 1) (org-agenda-overriding-header "Today's priority #A and #B tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\=.*\\[#C\\]"))))) ("E" "Errands (next 7 days)" tags "Errand&TODO<>\"DONE\"&TODO<>\"CANCELED\"&STYLE<>\"habit\"&SCHEDULED<\"<+7d>\"" ((org-agenda-overriding-header "Errands (next 7 days)"))) ("Z" "Agenda (next 7 days)" agenda "" ((org-agenda-ndays 7) (org-agenda-overriding-header "Agenda (next 7 days)"))) ("r" "Uncategorized items" tags "CATEGORY=\"Inbox\"&LEVEL=2" ((org-agenda-overriding-header "Uncategorized items"))) ("W" "Waiting/delegated tasks" tags "TODO=\"WAITING\"|TODO=\"DELEGATED\"" ((org-agenda-overriding-header "Waiting/delegated tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))))) ("z" "Computer-related tasks" tags "AREA=\"Computer\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Computer-related tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp) (quote regexp) "\\* \\(DEFERRED\\|SOMEDAY\\)"))) (org-agenda-sorting-strategy (quote (priority-down))))) ("u" "Unscheduled tasks" tags "AREA<>{Work\\|Computer\\|Statements}&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Unscheduled tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp) (quote regexp) "\\* \\(DEFERRED\\|SOMEDAY\\)"))) (org-agenda-sorting-strategy (quote (priority-down))))) ("U" "Deferred tasks" tags "TODO=\"DEFERRED\"" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Deferred tasks:"))) ("Y" "Someday tasks" tags "TODO=\"SOMEDAY\"" ((org-agenda-overriding-header "Someday tasks:"))) ("w" "Unscheduled work-related tasks" tags "AREA=\"Work\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-overriding-header "Unscheduled work-related tasks") (org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp)))))) ("v" "All work-related tasks" tags "AREA=\"Work\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-overriding-header "Work-related tasks") (org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-sorting-strategy (quote (category-up priority-down todo-state-up alpha-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\* \\(DEFERRED\\|SOMEDAY\\)"))))) ("l" "Ledger tasks" tags-todo "TODO<>{SOMEDAY\\|DEFERRED}" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\=.*\\[#C\\]"))))) ("L" "Ledger tasks not in Bugzilla" tags "TODO<>{DONE\\|TESTED\\|CLOSED\\|CANCELED\\|WONTFIX\\|WORKSFORME\\|INVALID\\|DUPLICATE\\|NOTE}&LEVEL=2" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "[^(]#[0-9]+\\]"))))) ("G" "Ledger tasks (all)" alltodo "" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))))) ("N" "Ledger tasks (all, alphabetical)" alltodo "" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks, alphabetical:") (org-agenda-sorting-strategy (quote (alpha-up))))) ("n" "Notes" tags "TODO=\"NOTE\"" ((org-agenda-files (quote ("~/Documents/Tasks/archive-2009.txt" "~/Documents/Tasks/archive-2010.txt" "~/Documents/Tasks/archive-2011.txt" "~/Documents/Tasks/archive.txt" "~/Documents/Tasks/notes.txt"))) (org-agenda-overriding-header "Notes") (org-agenda-sorting-strategy (quote (time-down))))) ("S" "Assembly Action Items" tags-todo "TODO<>\"PROJECT\"" ((org-agenda-files (quote ("~/Documents/Tasks/assembly.txt"))) (org-agenda-overriding-header "Assembly Action Items") (org-agenda-sorting-strategy (quote (alpha-up time-up)))))))) '(org-agenda-custom-commands (quote (("h" "Current Hotlist" tags "HOT&TODO=\"PROJECT\"" ((org-agenda-overriding-header "Current Hotlist"))) ("H" "Non-Hot Projects" tags "-HOT&TODO=\"PROJECT\"" ((org-agenda-overriding-header "Non-Hot Projects"))) ("A" "Priority #A tasks" agenda "" ((org-agenda-ndays 1) (org-agenda-overriding-header "Today's priority #A tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))))) ("b" "Priority #A and #B tasks" agenda "" ((org-agenda-ndays 1) (org-agenda-overriding-header "Today's priority #A and #B tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\=.*\\[#C\\]"))))) ("E" "Errands (next 7 days)" tags "Errand&TODO<>\"DONE\"&TODO<>\"CANCELED\"&STYLE<>\"habit\"&SCHEDULED<\"<+7d>\"" ((org-agenda-overriding-header "Errands (next 7 days)"))) ("Z" "Agenda (next 7 days)" agenda "" ((org-agenda-ndays 7) (org-agenda-overriding-header "Agenda (next 7 days)"))) ("r" "Uncategorized items" tags "CATEGORY=\"Inbox\"&LEVEL=2" ((org-agenda-overriding-header "Uncategorized items"))) ("W" "Waiting/delegated tasks" tags "TODO=\"WAITING\"|TODO=\"DELEGATED\"" ((org-agenda-overriding-header "Waiting/delegated tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))))) ("z" "Computer-related tasks" tags "AREA=\"Computer\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Computer-related tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp) (quote regexp) "\\* \\(DEFERRED\\|SOMEDAY\\)"))) (org-agenda-sorting-strategy (quote (priority-down))))) ("u" "Unscheduled tasks" tags "AREA<>{Work\\|Computer\\|Statements}&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Unscheduled tasks: ") (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp) (quote regexp) "\\* \\(DEFERRED\\|SOMEDAY\\)"))) (org-agenda-sorting-strategy (quote (priority-down))))) ("U" "Deferred tasks" tags "TODO=\"DEFERRED\"" ((org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-overriding-header "Deferred tasks:"))) ("Y" "Someday tasks" tags "TODO=\"SOMEDAY\"" ((org-agenda-overriding-header "Someday tasks:"))) ("w" "Unscheduled work-related tasks" tags "AREA=\"Work\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-overriding-header "Unscheduled work-related tasks") (org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote timestamp)))))) ("v" "All work-related tasks" tags "AREA=\"Work\"&TODO<>\"\"&TODO<>{DONE\\|CANCELED\\|NOTE\\|PROJECT}" ((org-agenda-overriding-header "Work-related tasks") (org-agenda-files (quote ("~/Documents/Tasks/todo.txt"))) (org-agenda-sorting-strategy (quote (todo-state-up category-up priority-down alpha-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\* \\(SOMEDAY\\)"))))) ("l" "Ledger tasks" tags-todo "TODO<>{SOMEDAY\\|DEFERRED}" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "\\=.*\\[#C\\]"))))) ("L" "Ledger tasks not in Bugzilla" tags "TODO<>{DONE\\|TESTED\\|CLOSED\\|CANCELED\\|WONTFIX\\|WORKSFORME\\|INVALID\\|DUPLICATE\\|NOTE}&LEVEL=2" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) "[^(]#[0-9]+\\]"))))) ("G" "Ledger tasks (all)" alltodo "" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks:") (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))))) ("N" "Ledger tasks (all, alphabetical)" alltodo "" ((org-agenda-files (quote ("~/src/ledger/plan/TODO"))) (org-agenda-overriding-header "Ledger tasks, alphabetical:") (org-agenda-sorting-strategy (quote (alpha-up))))) ("n" "Notes" tags "TODO=\"NOTE\"" ((org-agenda-files (quote ("~/Documents/Tasks/archive-2009.txt" "~/Documents/Tasks/archive-2010.txt" "~/Documents/Tasks/archive-2011.txt" "~/Documents/Tasks/archive.txt" "~/Documents/Tasks/notes.txt"))) (org-agenda-overriding-header "Notes") (org-agenda-sorting-strategy (quote (time-down))))) ("S" "Assembly Action Items" tags-todo "TODO<>\"PROJECT\"" ((org-agenda-files (quote ("~/Documents/Tasks/assembly.txt"))) (org-agenda-overriding-header "Assembly Action Items") (org-agenda-sorting-strategy (quote (alpha-up time-up))))))))
'(org-agenda-deadline-leaders (quote ("!D!: " "D%02d: "))) '(org-agenda-deadline-leaders (quote ("!D!: " "D%02d: ")))
'(org-agenda-default-appointment-duration 60) '(org-agenda-default-appointment-duration 60)
'(org-agenda-files (quote ("~/src/vps/INSTALL.org" "~/Documents/Tasks/todo.txt" "~/Documents/Tasks/assembly.txt" "~/src/ledger/plan/TODO"))) '(org-agenda-files (quote ("~/Documents/Tasks/assembly.txt" "~/src/vps/INSTALL.org" "~/Documents/Tasks/todo.txt" "~/src/ledger/plan/TODO")))
'(org-agenda-fontify-priorities t) '(org-agenda-fontify-priorities t)
'(org-agenda-include-diary t) '(org-agenda-include-diary t)
'(org-agenda-log-mode-items (quote (closed clock state))) '(org-agenda-log-mode-items (quote (closed clock state)))
Expand Down
2 changes: 1 addition & 1 deletion override/gnus
Submodule gnus updated from 9806f1 to 334934

0 comments on commit 6fc4a60

Please sign in to comment.