From 28901522e94fc1ff281c11291dc4bed611b524b3 Mon Sep 17 00:00:00 2001 From: tfheen Date: Fri, 11 May 2012 19:00:37 +0000 Subject: [PATCH] Update gnus, emacs git-svn-id: file:///svn/tfheen/trunk/dotfiles@1535 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- emacs | 54 +++++++++++++++++++++++++++++-------------------- gnus | 64 +++++++++++++++++++++++++++++------------------------------ 2 files changed, 64 insertions(+), 54 deletions(-) diff --git a/emacs b/emacs index 1eafb8a..b664939 100644 --- a/emacs +++ b/emacs @@ -11,7 +11,7 @@ (setq vc-follow-symlinks t custom-file (expand-file-name "~/.emacs-custom")) -(cw/requiring-forms nil +(cw/requiring-forms nil (message "checking for local setup and loading..") (if (file-exists-p "/local/skel/all.emacs") (load "/local/skel/all.emacs" nil t t)) @@ -341,10 +341,13 @@ org-agenda-include-all-todo t org-tags-column (* -1 (- (frame-width) 10)) org-agenda-align-tags-to-column (- (frame-width) 10) - org-hide-leading-stars t + org-hide-leading-stars nil org-agenda-files '("~/svn/plans/todo.org") org-stuck-projects '("+LEVEL=2-neverstuck/-DONE" ("TODO" "NEXT" "NEXTACTION" "") ("APPOINTMENT") "") - org-clock-into-drawer nil)) + org-clock-out-when-done nil + org-clock-persist t + org-clock-into-drawer t) + (org-clock-persistence-insinuate)) (eval-after-load 'remember @@ -516,23 +519,23 @@ (setq tbl (cdr tbl)))))) -(defadvice current-time (after tfheen-floor-current-time activate disable) - (setq ad-return-value (seconds-to-time (* 900 (floor (time-to-seconds ad-return-value) 900))))) -(defadvice org-clock-in (around tfheen-round-clock activate) - (ad-enable-advice 'current-time 'after 'tfheen-floor-current-time) - (ad-activate 'current-time) - ad-do-it - (ad-disable-advice 'current-time 'after 'tfheen-floor-current-time) - (ad-activate 'current-time)) - -(defadvice current-time (after tfheen-ceiling-current-time activate disable) - (setq ad-return-value (seconds-to-time (* 900 (ceiling (time-to-seconds ad-return-value) 900))))) -(defadvice org-clock-out (around tfheen-round-clock activate) - (ad-enable-advice 'current-time 'after 'tfheen-ceiling-current-time) - (ad-activate 'current-time) - ad-do-it - (ad-disable-advice 'current-time 'after 'tfheen-ceiling-current-time) - (ad-activate 'current-time)) +;(defadvice current-time (after tfheen-floor-current-time activate disable) +; (setq ad-return-value (seconds-to-time (* 900 (floor (time-to-seconds ad-return-value) 900))))) +;(defadvice org-clock-in (around tfheen-round-clock activate) +; (ad-enable-advice 'current-time 'after 'tfheen-floor-current-time) +; (ad-activate 'current-time) +; ad-do-it +; (ad-disable-advice 'current-time 'after 'tfheen-floor-current-time) +; (ad-activate 'current-time)) + +;(defadvice current-time (after tfheen-ceiling-current-time activate disable) +; (setq ad-return-value (seconds-to-time (* 900 (ceiling (time-to-seconds ad-return-value) 900))))) +;(defadvice org-clock-out (around tfheen-round-clock activate) +; (ad-enable-advice 'current-time 'after 'tfheen-ceiling-current-time) +; (ad-activate 'current-time) +; ad-do-it +; (ad-disable-advice 'current-time 'after 'tfheen-ceiling-current-time) +; (ad-activate 'current-time)) (autoload 'vala-mode "vala-mode" "Major mode for editing Vala code." t) (add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode)) @@ -616,4 +619,13 @@ tag))) (concat "-" tag))) -(setq org-agenda-auto-exclude-function 'tfheen/org-auto-exclude-function) \ No newline at end of file +(setq org-agenda-auto-exclude-function 'tfheen/org-auto-exclude-function) + +(defun mw-to-mdwn () + (interactive) + (save-excursion + (replace-regexp "^==== \\(.*\\) ====" "#### \\1" nil (point-min) (point-max)) + (replace-regexp "^=== \\(.*\\) ===" "### \\1" nil (point-min) (point-max)) + (replace-regexp "^== \\(.*\\) ==" "## \\1" nil (point-min) (point-max)) + (replace-regexp "^= \\(.*\\) =" "# \\1" nil (point-min) (point-max)) + )) \ No newline at end of file diff --git a/gnus b/gnus index a36cbc6..98f81d9 100644 --- a/gnus +++ b/gnus @@ -20,6 +20,8 @@ (setq list (cdr list))) (car list))) +(cw/requiring-package (nnir) + (setq nnir-search-engine 'imap)) (cw/for-host "golem\\|vuizook\\|xoog" (setq gnus-select-method '(nnimap "err" @@ -27,12 +29,8 @@ (nnimap-stream gssapi) (nnimap-authenticator gssapi)))) -(cw/for-host "thosu" - (setq gnus-select-method '(nnimap "err" - (nnimap-stream shell)))) - (setq imap-shell-program - '("ssh -ax -C -oBatchMode=yes vuizook.err.no 'exec env MAIL_PLUGINS=crm114 MAIL_PLUGIN_DIR=/usr/lib/dovecot/modules/imap MAIL=$HOME/Maildir /usr/lib/dovecot/imap'") + '("ssh -ax -C -oBatchMode=yes vuizook.err.no 'exec env MAIL_PLUGINS=antispam MAIL_PLUGIN_DIR=/usr/lib/dovecot/modules/imap MAIL=$HOME/Maildir /usr/lib/dovecot/imap'") imap-gssapi-program '("imtest -m gssapi -u %l -s %s") nntp-rlogin-program "ssh") @@ -60,18 +58,22 @@ ) (cw/for-host "qurzaw" - (setq 'gnus-select-method '(nnimap "Varnish" + (setq gnus-select-method '(nnimap "Varnish" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-stream ssl) - (nnimap-authinfo-file "~/.imap-authinfo.gpg"))) - (add-to-list 'gnus-secondary-select-methods '(nnimap "Collabora" - (nnimap-address "mail.collabora.co.uk") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnimap-authinfo-file "~/.imap-authinfo.gpg"))) - (add-to-list 'gnus-secondary-select-methods '(nnimap "mail.err.no" - (nnimap-stream shell)))) + (nnimap-authinfo-file "~/.imap-authinfo.gpg") + (nnir-search-engine imap))) + (add-to-list 'gnus-secondary-select-methods + '(nnimap "mail.err.no" + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnimap-authinfo-file "~/.imap-authinfo.gpg"))) + (add-to-list 'gnus-secondary-select-methods + '(nntp "bofh" + (nntp-address "nntp.fnord.no") + (nntp-port-number 563) + (nntp-open-connection-function nntp-open-ssl-stream)))) (setq imap-ssl-program "stunnel -c -A ~/.cacerts.pem -v 2 -f -r %s:%p") @@ -89,8 +91,7 @@ nnmail-crosspost nil gnus-novice-user nil gnus-interactive-exit nil - message-default-charset 'iso-8859-1 - message-default-headers "Mail-Copies-To: never" + message-default-charset 'utf-8 message-send-mail-partially-limit nil) @@ -341,9 +342,9 @@ inserts \" characters." gnus-simplify-subject-fuzzy-regexp "^\\([Aa][Dd]: \\|[Ss][Vv]: \\|[Rr][Ee]: \\)+" mc-gpg-comment "Please see my GPG key at http://err.no/gpgkey.asc" gnus-simplify-ignored-prefixes "^\\([Aa][Dd]: \\|[Ss][Vv]: \\|[Rr][Ee]: \\)+" - message-yank-prefix "| " - message-yank-empty-prefix "| " - message-yank-cited-prefix "| " + message-yank-prefix "> " + message-yank-empty-prefix "> " + message-yank-cited-prefix "> " message-citation-line-function 'tfh-insert-citation-line message-cite-function 'tfheen-cite-function gnus-simplify-subject-functions '(gnus-simplify-subject gnus-simplify-subject-fuzzy) @@ -387,8 +388,6 @@ inserts \" characters." (let ((mode "err.no")) (if (string-match "qurzaw" system-name) (progn - (if (string-match "Collabora" (second (tfheen-gnus-get-current-select-method))) - (setq mode "Collabora")) (if (string-match "Varnish" (second (tfheen-gnus-get-current-select-method))) (setq mode "Varnish")))) mode)) @@ -406,19 +405,16 @@ inserts \" characters." (".*" (address (cond ((equal (tfheen-qurzaw-personality-mode) "Varnish") "tfheen@varnish-software.com") - ((equal (tfheen-qurzaw-personality-mode) "Collabora") "tollef.fog.heen@collabora.co.uk") (t "tfheen@err.no"))) ; (Organization "Private") (Bcc (concat "tfheen+outgoing" (char-to-string 64) (cond ((equal (tfheen-qurzaw-personality-mode) "Varnish") "varnish-software.com") - ((equal (tfheen-qurzaw-personality-mode) "Collabora") "collabora.co.uk") (t "err.no")))) (signature-file (cond - ((equal (tfheen-qurzaw-personality-mode) "Varnish") "~/.signature-rl") - ((equal (tfheen-qurzaw-personality-mode) "Collabora") "~/.signature-collabora") + ((equal (tfheen-qurzaw-personality-mode) "Varnish") "~/.signature-varnish") (t "~/.signature")))) ;; Du vil sikkert ha mer her enn det følgende: @@ -509,7 +505,7 @@ OBS: "))) "Hook to run when entering no.alt.gullkorn.submissions" (setq message-yank-prefix (if (string-equal gnus-newsgroup-name "nnml:drift.news.nag.submissions") - " " "| "))) + " " "> "))) (defun tfheen-cite-function () "Which cite function to use -- depend on which you are in" @@ -683,10 +679,10 @@ on multiple mail-followup-to headers" (defun tfheen-mark-as-spam () (interactive) - (let ((buf (get-buffer-create "*Spam mark*")) - (cacheid (tfheen-fetch-cacheid))) - (and cacheid - (start-process "spammark" buf "ssh" "-oBatchMode=yes" "vuizook" "spam" cacheid))) +; (let ((buf (get-buffer-create "*Spam mark*")) +; (cacheid (tfheen-fetch-cacheid))) +; (and cacheid +; (start-process "spammark" buf "ssh" "-oBatchMode=yes" "vuizook" "spam" cacheid))) (gnus-summary-move-article nil (if (stringp tfheen-spam-folder) tfheen-spam-folder (apply tfheen-spam-folder nil)) nil 'move) @@ -833,11 +829,13 @@ Argument REVERSE means reverse order." (setq message-sendmail-f-is-evil nil message-sendmail-envelope-from 'header) -(setq gnus-permanently-visible-groups "^in.2009.*") +(setq gnus-permanently-visible-groups "^in.2011.*" + gnus-extract-address-components 'mail-extract-address-components) ;;; (setq bbdb/send-auto-create-p 'prompt) ;;; (setq bbdb/send-prompt-for-create-p t) (setq imap-store-password t) +(setq mm-text-html-renderer 'w3m) -(cw/requiring-package (nnir) - (setq nnir-search-engine 'imap)) +(add-to-list 'gnus-button-alist + '("\\(Bug\\)?#\\([0-9][0-9][0-9][0-9]+\\)" 0 (>= gnus-button-message-level 0) debian-bug-web-bug 2)) -- 2.39.5