conf
view .gnus @ 375:26aed4e65671
cleanup hgrc a bit
| author | Alexander Solovyov <alexander@solovyov.net> |
|---|---|
| date | Mon Jan 23 18:20:04 2012 +0200 |
| parents | f304ab9d4c4a |
| children |
line source
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 ;;
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 ;;;;;;;;;;;
15 ;;;;;;;;;;;
20 "Are we running window system?")
22 ;;;;;;;;;;
23 ;; Loading
24 ;;;;;;;;;;
25 (when (file-exists-p "~/.secrets.el")
26 (load "~/.secrets.el"))
28 ;;;;;;;;;;;
29 ;; Language
30 ;;;;;;;;;;;
38 ;;;;;;;;;;
40 ;;;;;;;;;;
44 (lambda ()
45 (setq fill-column 72)
46 (turn-on-auto-fill)))
50 ;; remove thouse ugly red line endings
51 (defun disable-trailing-whitespace ()
52 (setq show-trailing-whitespace nil))
57 (setq
58 ;; be verbose
59 gnus-novice-user nil
60 ;; where move expired messages
61 nnmail-expiry-target "nnml:expired"
79 message-insert-canlock nil
80 )
82 ;; User settings
83 (setq
84 user-name "piranha"
85 user-full-name "Alexander Solovyov"
86 user-mail-address "piranha@piranha.org.ua"
87 message-alternative-emails
88 (regexp-opt '("asolovyov@rainboo.com" "alexander.solovyov@gmail.com" "alexander.solovyov@willowcode.com"))
89 )
94 ;; Send mail via SMTP
95 ;(setq
96 ; gnus-local-domain "piranha.org.ua"
97 ; smtpmail-default-smtp-server "viii.ntu-kpi.kiev.ua"
98 ; smtpmail-local-domain "viii.ntu-kpi.kiev.ua"
99 ; smtpmail-default-smtp-server "localhost"
102 ;)
108 '((".*"
109 (gnus-show-threads t)
110 (gnus-use-scoring nil)
111 ; (display . all)
112 )))
114 ;; Show text before html
115 (eval-after-load "mm-decode"
120 ;;;;;;;
122 ;;;;;;;
131 '("From:"
132 "^Newsgroups:"
133 "^Reply-To:"
134 "^Subject:"
135 ; "^Message-ID:"
136 "^Date:"
137 "^To:"
138 "^Cc:"
139 "^Posted-To:"
140 "^Mail-Copies-To:"
141 "^Resent-From:"
142 "^X-Sent:"
143 ; "^User-Agent:"
144 ; "^Content-Type:"
145 "^X-Newsreader:"
146 "^NNTP-Posting-Host:"
147 "^Followup-To:"
148 ))
150 ;; message forwarding
151 (setq
152 message-forward-as-mime nil
153 message-forward-ignored-headers "^Content-Transfer-Encoding:\\|^X-\\|^References\\|^Xref\\|^In-Reply-To\\|^Received\\|^NNTP\\|^Return-Path\\|^Sender\\|^Approved\\|^User-Agent\\|^List-\\|^Error-To\\|^FL-\\|^Precedence\\|^Gnus-\\|^Path\\|^Cancel-Lock\\|^Face")
156 ;;;;;;;
157 ;; Mail
158 ;;;;;;;
160 (setq mail-sources nil)
161 (setq gnus-secondary-select-methods
169 ;; (nnimap-address "imap.gmail.com")
170 ;; (nnimap-authinfo-file "~/.imap-authinfo")
171 ;; (nnimap-server-port 993)
172 ;; (nnimap-stream ssl)
173 ;; ; (nnimap-list-pattern ("INBOX" ".*"))
174 ;; )))
176 (defun prh:mail-date (u) (concat u (format-time-string ".%Y.%m" (current-time))))
177 (defun prh:mail-date2 (u) (concat u (format-time-string ".%Y" (current-time))))
182 ; ("\\(To\\|Cc\\)" ".*hostels.*@ntu-kpi\\.kiev\\.ua.*" "hostels")
183 ; ("\\(To\\|Cc\\)" ".*all-admins@ntu-kpi\\.kiev\\.ua.*" "hostels")
184 ; ("\\(To\\|Cc\\)" ".*humor@xcp\\.kiev\\.ua.*" (: prh:mail-date2 "humor"))
185 ; ("From" ".*daily@security\\.nnov\\.ru.*" "security")
186 ; ("\\(To\\|Cc\\)" ".*anime_kpi@yahoogroups.com.*" "anime_kpi")
187 ; ("From" ".*Alexander Solovyov \\[Moderator\\].*" "moder")
188 ; ("From" ".*Nikita Gubenko \\[CoModerator\\].*" "moder")
189 ; ("List-Id" ".*c-p-c.googlegroups.com.*" "cpc")
190 ; ("List-Id" ".*newstalk.news.ntu-kpi.kiev.ua.*" "news-talk")
191 ; ("List-Id" ".*exim-users.exim.org.ua.*" "exim")
192 ; ("List-Id" ".*eth0.googlegroups.com.*" "eth0")
193 ; ("List-Id" ".*users.lists.eth0.net.ua.*" "eth0-public")
194 ; ("List-Id" ".*sudoers.lists.eth0.net.ua.*" "eth0-sudoers")
195 ; ("List-Id" ".*ik22.lists.eth0.net.ua.*" "ik22")
196 ; ("From" ".*@livejournal.com.*" "lj")
197 ; ("From" ".*root@eth0.net.ua.*" "root")
198 ; ("Subject" ".*\\*\\*\\*SPAM\\*\\*\\*.*" "spam")
199 ; (any ".*" (: prh:mail-date "inbox"))
200 ; ))
203 ;; save messages
205 ; (if (message-news-p) (concat "nnimap+piranha.org.ua:sent-news" (format-time-string ".%Y.%m" (current-time)))
210 (if (message-news-p) (prh:archive-mailbox-date "nnimap+mail:sent-news")
211 (prh:archive-mailbox-date "nnimap+mail:sent-mail"))))
213 ;;;;;;;;;;;;
214 ;; Threading
215 ;;;;;;;;;;;;
225 ;; summary buffer formatting
226 (setq gnus-thread-sort-functions
251 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
260 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
265 ; ((and (< level 3) (zerop unread)) . my-group-face-2)
266 ; ((< level 3) . my-group-face-3)
267 ; ((zerop unread) . my-group-face-4)
268 ; (t . my-group-face-5))))
270 ;; always show MIME buttons
271 (setq gnus-inhibit-mime-unbuttonizing t)
274 ;;;;;;
275 ;; PGG
276 ;;;;;;
280 "Encrypt the current region." t)
284 "Sign the current region." t)
288 "Insert the ASCII armored public key." t)
299 ;; Automcatically sign when sending mails
302 ;; Enough explicit settings
303 (setq pgg-passphrase-cache-expiry 300)
304 ;(setq pgg-default-user-id prh::primary-key)
306 ;; regexp of groups from which new messages are mime signed by default
307 ;(setq my-sign-mime-group-regexp "^\\(INBOX.\\|\\)mail.work")
309 ;; hook to setup message
310 ;(defun my-mml-secure-message-sign-mime ()
311 ; (when (string-match
312 ; my-sign-mime-group-regexp
313 ; gnus-newsgroup-name)
314 ; (mml-secure-message-sign-smime)))
316 ;; plug this into message-setup-hook
319 ;; Automatic decryption/verification of gpg/pgp parts
321 ;; Tells Gnus to inline the part
322 (eval-after-load "mm-decode"
324 ;; Tells Gnus how to display the part when it is requested
325 (eval-after-load "mm-decode"
333 (eval-after-load "mm-decode"
334 (quote (setq mm-automatic-display (remove "application/pgp-signature"
335 mm-automatic-display))))
337 ;;;;;;;
338 ;; BBDB
339 ;;;;;;;
341 (when (file-directory-p "~/var/bbdb/lisp")
354 (function (lambda()
365 ;; number of lines in pop-up bbdb window
366 bbdb-pop-up-target-lines 2
367 bbdb-north-american-phone-numbers-p nil
368 bbdb-default-country "Ukraine")
372 ;;* Gnus soll im Article View eine dreigeteilte Ansicht haben:
373 ;;* |----------------------------|
374 ;;* | Summary |
375 ;;* |----------------------------|
376 ;;* | | |
377 ;;* | Article | *BBDB* |
378 ;;* |___________________|________|
379 ;(gnus-add-configuration
392 ;;;;;;;;;;;;;
394 ;;;;;;;;;;;;;
422 "Returns the song now playing"
427 (insert-file-contents now-playing-file)
428 (goto-char (point-max))
429 (newline))))
431 ;; Random citation line
432 (setq random-sig-directory "~/.sigs")
433 (defun prh:random-cite ()
435 (interactive)
436 (when (file-exists-p random-sig-directory)
437 (let* ((files (directory-files random-sig-directory t ""))
438 (file (nth (random (length files)) files)))
439 (when file
440 (save-excursion
441 (goto-char (point-max))
442 (insert-file-contents file))))))
444 ;; This function is especially useful for message mode
445 (defun prh:intelligent-fill-paragraph ()
447 (interactive)
448 (beginning-of-line)
449 (newline)
450 (let ((a (point)))
451 (end-of-line)
452 (if (search-backward-regexp
464 ;;;;;;;;;;
466 ;;;;;;;;;;
469 'message-setup-hook
477 )))
479 ;; for normal working of C-c C-c, instead of award overrides
480 (add-hook
482 '(lambda ()
493 ;;;;;;;;;;;;;;;;;;
495 ;;;;;;;;;;;;;;;;;;
498 "compile itself if ~/.gnus"
