top  Index  Search  Changes  RSS  Login

howm wiki - snap.el.for-gnus Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

;;; Gnus

;;; snap://gnus-summary-mode/group/<20031101192305.AFA8C43EDC@hoge.fuga.piyo>

;;;   or

;;; snap://gnus-summary-mode/group/article-number



(defvar snap:gnus-snap-message-id t)



(defun snap-record:gnus-summary-mode ()
  (snap-encode:gnus-summary-mode

   (snap-encode:gnus-summary-mode
    
gnus-newsgroup-name
  

    
(if snap:gnus-snap-message-id
      

        
(mail-header-message-id (gnus-summary-article-header))
    

      
(gnus-summary-article-number))))



(defun snap-play:gnus-summary-mode (spell)
  

  
(unless (and (fboundp 'gnus-alive-p) (gnus-alive-p)) (gnus))
  

  
(require 'gnus-score)
  

  
(let* ((state (snap-decode:gnus-summary-mode spell))

(group (car state))

backend

;; cf. gnus-group-quick-select-group

;; gnus-visual

gnus-score-find-score-files-function

gnus-home-score-file

gnus-apply-kill-hook

gnus-summary-expunge-below)
    

    
(setq backend
  

  
(if (string-match "\\([^+]+\\).*:.+" group)
      

      
(match-string 1 group)
    

    
(symbol-name (car gnus-select-method))))
    

    
;; disable getting new message
    

    
(eval `(let ((,(intern (concat backend "-get-new-mail")) nil))
    

    
(gnus-group-read-group 0 t group)))
    

    
(gnus-summary-goto-article (cadr state) nil t)))



(defun snap-encode:gnus-summary-mode (group article)
  

  
(format "%s/%s" group article))



(defun snap-decode:gnus-summary-mode (spell)
  

  
(when (string-match "\\(.*\\)/\\([^/]*\\)" spell)
    

    
(list (match-string-no-properties 1 spell)
  

  
(match-string-no-properties 2 spell))))