emacs - gnus
Last edited August 4, 2009
More by corporem »
Sections:
.gnus

 (eval-after-load "mail-source" '(require 'pop3))

;(setq mail-sources
;      '((file :path "/var/spool/mail/corporem")
;        (pop :server "pop.gmail.com"
;             :port 995
;             :user "tugrulyilmazer"
;             :password "pass"
;             :connection ssl
;             :leave t)
        ;(pop :server "pop.gmail.com"
;             :port 995
;             :user "debian.user.turkish"
;             :password "pass"
;             :connection ssl
;             :leave t)
;        ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq user-mail-address "corporem@corporem.org")
'(query-user-mail-address nil)

(setq gnus-verbose 10)
(setq gnus-verbose-backends 10)
(setq garbage-collection-messages nil)
(setq message-generate-headers-first '(References))

(setq gnus-read-active-file nil)
(setq gnus-check-new-newsgroups nil)
(setq gnus-nov-is-evil nil)
(setq gnus-save-newsrc-file t)

(setq user-full-name "M. Tuğrul Yılmazer")
(setq message-from-style 'angles)

;; Topic headings for groups.
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq-default truncate-lines nil)
(setq gnus-use-cache t)
(setq gnus-cacheable-groups ".*")
(setq-default truncate-lines nil)

(setq gnus-select-method '(nntp "news.anet.net.tr"))

(setq gnus-secondary-select-methods
      '((nnimap "corporem.org"
                (nnimap-address "mail.corporem.org")
                (nnimap-expunge-on-close ask))
        (nntp "Usenet"
              (nntp-address "news.readfreenews.net"))
        (nnml "gmail")
        ))

(defun fs-change-smtp ()
  "Change the SMTP server according to the current from line."
  (save-excursion
    (let ((from
           (save-restriction
             (message-narrow-to-headers)
             (message-fetch-field "from"))))
      (message "From is `%s', setting `smtpmail-smtp-server' to `%s'"
               from
               (cond
                ((string-match "corporem@corporem.org" from)
                 (message "Using mail.corporem.org")
                 (setq message-send-mail-function 'smtpmail-send-it)
                 (setq smtpmail-smtp-server "mail.corporem.org")
                 (setq user-mail-address "corporem@corporem.org")
                 (auto-fill-mode t)
                 (setq gnus-message-archive-group "nnimap+corporem.org:INBOX.Sent")
                 (setq smtpmail-default-smtp-server "mail.corporem.org")
                 (setq smtpmail-smtp-service 25)
                 (setq smtpmail-auth-credentials '(("mail.corporem.org" 25 "corporem@corporem.org" nil))))
              
;                ((string-match "tugrulyilmazer@gmail.com" from)
;                 (message "Using smtp.gmail.com")
;                 (setq message-send-mail-function 'smtpmail-send-it)
;                 (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))
;                 (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587 "tugrulyilmazer@gmail.com" nil)))
;                 (setq smtpmail-default-smtp-server "smtp.gmail.com")
;                 (setq smtpmail-smtp-server "smtp.gmail.com")
;                 (setq smtpmail-smtp-service 587))

                
;                ((string-match "corporem@gawab.com" from)
;                 (message "Using smtp.gawab.com")
;                 (setq message-send-mail-function 'smtpmail-send-it)
;                 (setq user-mail-address "corporem@gawab.com")
;                 (auto-fill-mode t)
;                 (setq smtpmail-smtp-server "smtp.gawab.com")
;                 (setq smtpmail-default-smtp-server "smtp.gawab.com")
;                 (setq smtpmail-smtp-service 25)
;                 (setq smtpmail-auth-login-username "corporem@gawab.com")
;                 (setq smtpmail-auth-credentials '(("smtp.gawab.com" 25 "corporem@gawab.com" nil))))
                
                (t
                 (error
                  (concat "Don't know which mail server to use for "
                          from))))))))
(add-hook 'message-setup-hook 'fs-change-smtp)

(setq gnus-posting-styles
      '(("nnimap.*Gawab$"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@gawab.com")
         (name "M.Tuğrul YILMAZER"))

;        ("nnml.*gmail"
;         (signature-file "~/imzalar/corporem.org")        
;         (address "tugrulyilmazer@gmail.com")
;         (name "M.Tuğrul YILMAZER"))        

        ("^nnimap.*corporem.org.*INBOX$"
         (signature-file "~/imzalar/corporem.org")
         ("X-Home-Page" "http://corporem.org")
         (organization "Corporem ORG")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))
   
       ("^is_"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))

        ("^programcilik"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))

        ("^internet"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))

        ("^binary"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))

        ("^os"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))

        ("^nntp"
         (signature-file "~/imzalar/corporem.org")
         (address "corporem@corporem.org")
         (name "M.Tuğrul YILMAZER"))
        ))

; Anet bu satir yuzunden acilmiyor
(add-hook 'nntp-server-opened-hook 'nntp-send-authinfo)

(gnus-add-configuration
 '(article
   (horizontal 1.0
               (vertical 45
                         (group 1.0))
               (vertical 1.0
                         (summary 0.35 point)
                         (article 1.0)))))
(gnus-add-configuration
 '(summary
   (horizontal 1.0
               (vertical 45
                         (group 1.0))
               (vertical 1.0
                         (summary 1.0 point)))))

(setq message-required-news-headers
      (nconc message-required-news-headers
             (list '(Face . (lambda ()
                              (gnus-face-from-file "~/face/tugrul.png"))))))

;;firefox'un linklerde kullanılması amaçlanıyor
(defun browse-url-firefox-new-tab (url &optional new-window)
  "Firefox yeni tabda aciliyor."
  (interactive (browse-url-interactive-arg "URL: "))
  (let ((cmd (shell-command-to-string
              (concat "firefox -a firefox -remote 'openURL("
                      url ",new-tab)' > /dev/null"))))
    (unless (string= "" cmd)
      (message "Firefox aciliyor...")
      (start-process (concat "firefox " url) nil "/bin/sh" "-c"
                     (concat "firefox " url "|| true"))
      (message "Starting Firefox...done"))))

(setq browse-url-browser-function 'browse-url-firefox-new-tab)

(setq gnus-summary-line-format "%U%R%(%[%10&user-date;: %-23,23f (%k)%]%B %s%)\n")
(setq gnus-user-date-format-alist
      '(((gnus-seconds-today) . "%k:%M")
        (604800 . "%a %k:%M")
        ((gnus-seconds-month) . "%a %d")
        ((gnus-seconds-year) . "%d %b")
        (t . "%Y-%m-%d")))

(setq nnimap-split-inbox '("INBOX"))
(setq nnimap-split-rule
      '(
        ("corporem.org"
         ("INBOX" (
                   ("INBOX.freebsd" "^\\(To\\|Cc\\).*freebsd@lists.enderunix.org")
                   ("INBOX.debian"    "^\\(To\\|Cc\\).*debian-user-turkish@lists.debian.org")
;                   ("INBOX.debianbugs"    "^\\(To\\|Cc\\).*@bugs.debian.org")
;                   ("INBOX.debiankernel"    "^\\(To\\|Cc\\).*debian-kernel@lists.debian.org")
;                   ("INBOX.debiansecurity"    "^\\(To\\|Cc\\).*debian-security@lists.debian.org")
;                   ("INBOX.php"        "^\\(To\\|Cc\\).*@lists.php.net")
                   ("INBOX.gnome"    "^\\(To\\|Cc\\).*@gnome.org")
                   ("INBOX.qmail"   "^\\(To\\|Cc\\).*qmail@lists.enderunix.org")
                   ("INBOX.linux"    "^\\(To\\|Cc\\).*@liste.linux.org.tr")
                   )))))

.emacs

 
(set-default-font "terminus-iso8859-9-24")
(menu-bar-mode 0)
(tool-bar-mode 0)


(setq-default semanticdb-default-save-directory "/tmp/")
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))

(auto-save-mode 0)
(scroll-bar-mode nil)
(column-number-mode t)

(set-background-color "black")
(set-foreground-color "green")

(setq auto-mode-alist (cons '("\\.jsp$" . java-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode)
                                   interpreter-mode-alist))

(autoload 'python-mode "python-mode" "Python editing mode." t)

(setq auto-mode-alist
      (append '(("\\.css$" . css-mode))
              auto-mode-alist))

(setq auto-mode-alist
      (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
            auto-mode-alist))
;(set-scroll-bar-mode 'top)
;(set-face-background 'mode-line "blue")
;(set-face-foreground 'mode-line "green")
(setq font-lock-maximum-decoration t)

(setq c-basic-indent 4)
(setq-default truncate-lines t)
(setq default-tab-width 4)
(setq tab-width 4)
;(setq indent-tabs-mode t)
;(setq-default indent-tabs-mode t)
(setq indent-tabs-mode nil)
(setq-default indent-tabs-mode nil)
(setq global-senator-minor-mode t)

(setq query-replace-highlight t)
(setq search-highlight t)
(setq backup-inhibited t)
(setq auto-save-interval 0)
(setq auto-save-timeout 0)
(setq auto-save-default nil)
(setq auto-save-list-file-name nil)
(setq user-mail-address "corporem@corporem.org")
(setq mail-host-address system-name)
(setq ispell-dictionary-alist ispell-local-dictionary-alist)
(setq flyspell-default-dictionary nil)

;(prefer-coding-system 'iso-8859-9)
;(prefer-coding-system 'utf-8)

(set-keyboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(set-input-method 'latin-5-postfix)
;(set-keyboard-coding-system 'iso-8859-9)
;(set-buffer-file-coding-system 'iso-8859-9)
;(setq auto-mode-alist nil)
;(setq magic-mode-alist nil)

(global-set-key (kbd "TAB") 'self-insert-command)
(global-set-key "\C-m" 'newline-and-indent)
(global-set-key "\M-g" 'goto-line)
(global-set-key "\M-7" 'buffer-menu)
(global-set-key "\M-8" 'fundamental-mode)
(global-set-key "\M-9" 'gnus-summary-delete-article)
(global-set-key "\M-s" 'shrink-window-horizontally)
(global-set-key "\M-n" 'enlarge-window-horizontally)
(global-font-lock-mode 1 t)

(put 'set-goal-column 'disabled nil)
(transient-mark-mode t)

(add-hook 'php-mode-hook
      '(lambda ()
         (c-set-style "stroustrup")))
(add-hook 'c-mode-hook
      '(lambda ()
         (c-set-style "stroustrup")))
(add-hook 'perl-mode-hook
      '(lambda ()
         (c-set-style "stroustrup")))
(add-hook 'c++-mode-hook
      '(lambda ()
         (c-set-style "stroustrup")))
(put 'upcase-region 'disabled nil)

Labels: emacs
The content on this page is provided by a Google Notebook user, and Google assumes no responsibility for this content.