ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Igor Anikeev <insider@t-k.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Xemacs Mailcrypt и GPG проблема
Date: 13 May 2003 23:38:14 +0400
Message-ID: <m3bry663ix.fsf@insider.home> (raw)
In-Reply-To: <m37k8upw2e.fsf@pc313.belcaf.minsk.by>

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

Смотрел из KMaila - говорит, что подпись просто классная, а вот текст:
"~~~~~~~", ну, как и в прошлый раз.  Приаттачены {init,custom}.el .emacs
и

[-- Attachment #2: gnus --]
[-- Type: text/plain, Size: 6029 bytes --]


;  -*- emacs-lisp -*-

;=============
; Your personal settings
(setq user-mail-address "insider@t-k.ru") 
(setq user-full-name "Igor Anikeev")
		  
			     
;=============
;; Your newsserver
(setq
        gnus-inhibit-startup-message t
        gnus-use-sc t
        gnus-use-trees nil
        gnus-select-method '(nntp "insider.home"))


;; Mail Configuration
(setq gnus-secondary-select-methods
	'((nnml "private")))
	
(setq nnmail-split-methods
    '(("personal" "^To:.*insider@t-k.ru")
      ("altlinux.community" "^List-Id: <community.altlinux.ru>")
      ("altlinux.talkroom"  "^List-Id: <talk-room.altlinux.ru>")
      ("altlinux.legal" "^List-Id: <legal.lrn.ru>")
      ("altlinux.ruby" "^List-Id: Ruby usage and development around it <ruby.altlinux.ru>")
      ("sf.net" "^From:.*SourceForge.net")
      ("netbeans.discuss-ru" "^From: nbdiscuss_ru-help@netbeans.org")
      ("netbeans.announce" "^list-post: <mailto:nbannounce@netbeans.org>")
      ("netbeans.openide" "^list-post: <mailto:dev@openide.netbeans.org>")
      ("netbeans.ui" "^list-post: <mailto:nbui@netbeans.org>")
      ("netbeans.users" "^list-post: <mailto:nbusers@netbeans.org>")
      ("other" "")))	
	

(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "127.0.0.1")

;; wrap messages at 72
(add-hook 'message-mode-hook
    (lambda()
	(setq fill-column 72)
	(turn-on-auto-fill)))
	
	
;; locally store sent mail and news
(setq gnus-message-archive-group
    '((if (message-news-p)
	"nnml:Send-News"
       "nnml:Send-Mail")))	
       
       
(add-hook 'message-send-hook 'my-message-add-content)
(defun my-message-add-content ()
    (message-add-header "Keywords: 5525434"))
    

(add-hook
 'message-setup-hook
 '(lambda ()
    ;; Add X-Comment-To: field. We need From: field from original
    ;; letter. How to get right?
    (if message-reply-buffer
        (let ((cur-buffer (current-buffer)) from-field)
          (save-excursion
            (set-buffer message-reply-buffer)
            (if (string-match "^From:" (buffer-string))
                (progn
                  (setq from-start (+ (match-end 0) 1))
                  (goto-char from-start)
                  (end-of-line)
                  (setq from-field (buffer-substring from-start (point))))))
          (if from-field
              (save-excursion
                (goto-char (point-min))
                (insert "X-Comment-To: " (Make-Comment-To from-field) "\n"))))
      )))

(defun Make-Comment-To (from)
  (if (string-match " *<.*> *" from)
      (concat (substring from 0 (match-beginning 0)) (substring from
                                                                (match-end 0)))


   (if (string-match "\(.*\)" from)
       (substring from (+ (match-beginning 0) 1) (- (match-end 0) 1))
     from
     )
   )
 )
   

;
;From: Ivan Crivoruchko <Ivan_Crivoruchko@f470.n5030.z2.fidonet.org>
;========================<CUT>========================

(defun sc-break-cited-line ()
  "Break cited line. Do it correctly."
  (interactive)
  (delete-horizontal-space)
  (newline)
  (forward-line -1)
  (let ((cited (looking-at (sc-cite-regexp))))
    (forward-line)
    (if cited (progn (sc-cite-line) (just-one-space)))))

(defun sc-header-hello-attributed-writes ()
  "Insert Hi, sc-firstneme, then sc-header-attributed-writes"
  (insert
   (concat "\nHi, " (sc-mail-field "sc-firstname") "!\n\n"))
  (my-header-line-generator)
;  (sc-header-attributed-writes)
  )

(defun sc-install-rewrite-header-fn (new-fn)
  "Install new header rewrite function and make it preffered"
  (setq sc-preferred-header-style (length sc-rewrite-header-list))
  (setq sc-rewrite-header-list
        (append sc-rewrite-header-list `((,new-fn)))))

(defun ic-cite-message ()
  (sc-cite-original)
  (local-set-key "\C-m" 'sc-break-cited-line))

(setq message-cite-function 'ic-cite-message)

(setq mail-citation-hook 'ic-cite-message)
;(add-hook 'mail-citation-hook 'ic-cite-message)

(add-hook 'sc-load-hook (lambda ()
                          (sc-install-rewrite-header-fn
                           'sc-header-hello-attributed-writes)
                          (setq sc-confirm-always-p nil)))

(setq news-reply-header-hook nil)

;========================<CUT>========================

(setq sc-preferred-attribution-list
      '( "initials" "x-attribution" "firstname" "sc-lastchoice" ))

;;; sc hack by Bor.
(defun sc-add-citation-level-m ()
  "Add citation level to cited string"
  (interactive)
  (if (looking-at (sc-cite-regexp))
      (if (re-search-forward
           (concat sc-citation-leader-regexp sc-citation-root-regexp)
           )
          (insert sc-citation-delimiter)
        )
    (sc-cite-line)
    )
  )

; Cool mailcrypting stuff
(load-library "mailcrypt")
(mc-setversion "gpg")
(autoload 'mc-install-write-mode "mailcrypt" nil t)
(autoload 'mc-install-read-mode "mailcrypt" nil t)
(add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
(add-hook 'message-mode-hook 'mc-install-write-mode)
(add-hook 'news-reply-mode-hook 'mc-install-write-mode)
;; If you have more than one key, specify the one to use
(setq mc-gpg-user-id "Igor Anikeev")
;; Always sign encrypted messages
(setq mc-pgp-always-sign t)
;; How long should mailcrypt remember your passphrase
(setq mc-passwd-timeout 600)
;; Automagically sign all messages
(add-hook 'message-send-hook 'will-you-sign)
(defun will-you-sign ()
        (load-library "mc-toplev")
        (interactive)
        (if (y-or-n-p "Do you want to sign this message? ")
                (mc-sign-message)))



;; Gnus Demon
(gnus-demon-add-rescan)

;;
;; News auto rescan
;;

(setq gnus-use-demon t)
(gnus-demon-init)
(gnus-demon-add-rescan)

(defun avk-scan-new-messages ()
  "Scan for new mail and news every 15 minutes."
  (when (gnus-alive-p)
    (save-excursion
      (set-buffer gnus-group-buffer)
      (gnus-group-get-new-news))))

(gnus-demon-add-handler 'avk-scan-new-messages 5 2)
(gnus-demon-add-handler 'gnus-group-save-newsrc 10 1)


[-- Attachment #3: .emacs --]
[-- Type: text/plain, Size: 219 bytes --]



(require 'pc-selections)

;; mouse wheel for X

(autoload 'mwheel-install "mwheel" "Enable mouse wheel support.")
(mwheel-install)

;; Make all "yes or no" prompts show "y or n" instead
(fset 'yes-or-no-p 'y-or-n-p)


[-- Attachment #4: init.el --]
[-- Type: application/emacs-lisp, Size: 836 bytes --]

[-- Attachment #5: custom --]
[-- Type: application/emacs-lisp, Size: 332 bytes --]

[-- Attachment #6: Type: text/plain, Size: 30 bytes --]

 .gnus


-- 
Take care,
Igor.

      reply	other threads:[~2003-05-13 19:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13 17:11 Igor Anikeev
2003-05-13 17:59 ` Sergey Bolshakov
2003-05-13 19:38   ` Igor Anikeev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bry663ix.fsf@insider.home \
    --to=insider@t-k.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git