🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.editor.xemacs
Article #78

display raw non us-ascii message in VM

#78
From: 守岡 知彦 / MORIOKA Tomohiko
Date: Wed, 28 May 1997 00:00
300 lines
11466 bytes
--pgp-sign-Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: multipart/mixed;
 boundary="Multipart_Wed_May_28_22:03:31_1997-1"
Content-Transfer-Encoding: 7bit

--Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: text/plain; charset=ISO-2022-JP

  fj.editor.xemacs $B$N@_N)$r5-G0$7$F!"(BVM $B$N(B MIME $B5!G=$NBe$o$j$K(B SEMI $B$r(B
$B;H$&J}K!$r>R2p$7$^$9!#(B

  $B$=$s$J$3$H$7$F2?$,$&$l$7$$$+$H8@$($P!"(BSEMI $BMQ$N(B method $B$,;H$($k$N$G(B
PGP/MIME $B$H$+$,;H$($k$H$+!"(Btm $B$K47$l$??M$K$O(B SEMI $B$N(B user-interface $B$N(B
$BJ}$,$&$l$7$$$+$bCN$l$J$$$H$+$,$"$k$+$b$7$l$^$;$s$,!"$J$s$H$$$C$F$b!X@8!Y(B
$B$NHs(B us-ascii message $B$,$A$c$s$H(B decode $B$5$l$FFI$a$k$3$H$,Bg$-$$$H;W$$(B
$B$^$9!#6qBNE*$K$O!"Hs(B MIME message $B$rJQ?t(B default-mime-charset $B$G;XDj$5(B
$B$l$?(B charset $B$r;}$D(B text/plain message $B$H$7$F07$&$h$&$K$J$j$^$9!#(B


  $B$5$F!"$3$N(B program $B$O(B vm-mime+.el $B$H(B vm-semi.el $B$N#2$D$N(B part $B$+$i$J(B
$B$j$^$9!#(B

  vm-mime+.el $B$OD>@\(B SEMI $B$K4X78$N$J$$ItJ,$G!"?7$?$KJQ?t(B
vm-presentation-copy-function $B$r@_$1!"4X?t(B vm-make-presentation-copy$B$G(B
$B$3$l$rMxMQ$9$k$h$&$K$7$^$9!#(B

  vm-semi.el $B$O(B vm-mime+.el $B$G3HD%$5$l$?5!G=$r;H$C$F(B SEMI $B$H$N(B
interface $B$r<B8=$7$^$9!#!J4X?t$H$+JQ?t$r$$$8$l$P4JC1$K(B tm $BMQ$K=q$-49$((B
$B$i$l$k$H;W$$$^$9!K(B


  $B$3$l$r;H$&$K$O(B

	(eval-after-load "vm-mime" '(load "vm-mime+"))
	(require 'vm-semi)

$B$r(B ~/.vm $B$KF~$l$F$/$@$5$$!#(B


--Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: application/octet-stream; type=emacs-lisp
Content-Disposition: attachment; filename="vm-mime+.el"
Content-Transfer-Encoding: 7bit

;;; vm-mime+.el --- better fundamental for VM 6 to support MIME

;; Copyright (C) 1997 Free Software Foundation, Inc.

;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version: $Id: vm-mime+.el,v 1.2 1997/05/28 12:48:34 morioka Exp $
;; Keywords: VM, MIME, mail

;; This file is not part of VM

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;;    Please insert following line into ~/.vm:

;;	(eval-after-load "vm-mime" '(load "vm-mime+"))

;;; Code:

(defvar vm-presentation-copy-function
  (function
   (lambda (real-m)
     (erase-buffer)
     (insert-buffer-substring (vm-buffer-of real-m)
			      (vm-start-of real-m)
			      (vm-end-of real-m))
     ))
  "Function to make presentation-copy.")

(defun vm-make-presentation-copy (m)
  (let ((mail-buffer (current-buffer))
	b mm
	(real-m (vm-real-message-of m))
	(modified (buffer-modified-p)))
    (cond ((or (null vm-presentation-buffer-handle)
	       (null (buffer-name vm-presentation-buffer-handle)))
	   (setq b (generate-new-buffer (concat (buffer-name)
						" Presentation")))
	   (save-excursion
	     (set-buffer b)
	     (if (fboundp 'buffer-disable-undo)
		 (buffer-disable-undo (current-buffer))
	       ;; obfuscation to make the v19 compiler not whine
	       ;; about obsolete functions.
	       (let ((x 'buffer-flush-undo))
		 (funcall x (current-buffer))))
	     (setq mode-name "VM Presentation"
		   major-mode 'vm-presentation-mode
		   vm-message-pointer (list nil)
		   vm-mail-buffer mail-buffer
		   mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
					(vm-menu-support-possible-p)
					(vm-menu-mode-menu))
		   buffer-read-only t
		   mode-line-format vm-mode-line-format)
	     (cond ((vm-fsfemacs-19-p)
		    ;; need to do this outside the let because
		    ;; loading disp-table initializes
		    ;; standard-display-table.
		    (require 'disp-table)
		    (let* ((standard-display-table
			    (copy-sequence standard-display-table)))
		      (standard-display-european t)
		      (setq buffer-display-table standard-display-table))))
	     (if vm-frame-per-folder
		 (vm-set-hooks-for-frame-deletion))
	     (use-local-map vm-mode-map)
	     (and (vm-toolbar-support-possible-p) vm-use-toolbar
		  (vm-toolbar-install-toolbar))
	     (and (vm-menu-support-possible-p)
		  (vm-menu-install-menus)))
	   (setq vm-presentation-buffer-handle b)))
    ;; do this (widen) outside save-restricton intentionally.  since
    ;; we're using the presentation buffer, make the folder
    ;; buffer unpretty so maybe the user gets the idea.
    ;;(widen)
    ;; widening isn't enough.  users just complain that "I'm
    ;; looking at the wrong message."  Curse their miserable hides.
    ;; bury the buffer so they'll have a tough time finding it.
    (bury-buffer (current-buffer))
    (setq b vm-presentation-buffer-handle
	  vm-presentation-buffer vm-presentation-buffer-handle
	  vm-mime-decoded nil)
    (save-excursion
      (set-buffer (vm-buffer-of real-m))
      (save-restriction
	(widen)
	;; must reference this now so that headers will be in
	;; their final position before the message is copied.
	;; otherwise the vheader offset computed below will be
	;; wrong.
	(vm-vheaders-of real-m)
	(set-buffer b)
	(widen)
	(let ((buffer-read-only nil)
	      (modified (buffer-modified-p)))
	  (unwind-protect
	      (funcall vm-presentation-copy-function real-m)
	    (set-buffer-modified-p modified)))
	(setq mm (copy-sequence m))
	(vm-set-location-data-of mm (vm-copy (vm-location-data-of m)))
	(set-marker (vm-start-of mm) (point-min))
	(set-marker (vm-headers-of mm) (+ (vm-start-of mm)
					  (- (vm-headers-of real-m)
					     (vm-start-of real-m))))
	(set-marker (vm-vheaders-of mm) (+ (vm-start-of mm)
					   (- (vm-vheaders-of real-m)
					      (vm-start-of real-m))))
	(set-marker (vm-text-of mm) (+ (vm-start-of mm)
				       (- (vm-text-of real-m)
					  (vm-start-of real-m))))
	(set-marker (vm-text-end-of mm) (+ (vm-start-of mm)
					   (- (vm-text-end-of real-m)
					      (vm-start-of real-m))))
	(set-marker (vm-end-of mm) (+ (vm-start-of mm)
				      (- (vm-end-of real-m)
					 (vm-start-of real-m))))
	(setcar vm-message-pointer mm)))))

;;; vm-mime+.el ends here

--Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: application/octet-stream; type=emacs-lisp
Content-Disposition: attachment; filename="vm-semi.el"
Content-Transfer-Encoding: 7bit

;;; vm-semi.el --- SEMI interface for VM

;; Copyright (C) 1997 MORIOKA Tomohiko

;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version: $Id: vm-semi.el,v 1.2 1997/05/28 13:00:50 morioka Exp $
;; Keywords: VM, MIME, mail

;; This file is not part of VM

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;;    Please insert following line into ~/.vm:

;;	(require 'vm-semi)

;;; Code:

;;; @ for VM and vm-mime+
;;;

(setq vm-display-using-mime nil
      vm-auto-decode-mime-messages nil
      vm-mime-display-function (lambda ())
      )

(setq vm-presentation-copy-function
      (lambda (real-m)
	(let ((pbuf-name (buffer-name)))
	  (save-window-excursion
	    (set-buffer (vm-buffer-of real-m))
	    (save-restriction
	      (narrow-to-region (vm-start-of real-m) (vm-end-of real-m))
	      (mime-view-mode nil nil nil
			      (buffer-name) pbuf-name vm-mode-map)
	      )))))


;;; @ for SEMI
;;;

(set-alist 'mime-text-decoder-alist
	   'vm-mode
	   (function mime-text-decode-buffer))

(defun vm-semi-content-header-filter ()
  (goto-char (point-min))
  (decode-mime-charset-region (point-min)(point-max) default-mime-charset)
  (eword-decode-header)
  )

(set-alist 'mime-view-content-header-filter-alist
	   'vm-mode
	   (function vm-semi-content-header-filter))

(set-alist 'mime-view-quitting-method-alist
	   'vm-mode 'vm-quit)

(set-alist 'mime-view-over-to-previous-method-alist
	   'vm-mode 'vm-previous-message)

(set-alist 'mime-view-over-to-next-method-alist
	   'vm-mode 'vm-next-message)


;;; @ end
;;;

(provide 'vm-semi)

;;; vm-semi.el ends here

--Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: text/plain; charset=ISO-2022-JP

-- 
===$B!X4v@i2/$NJ,;R$KJ,$+$l$F$b(B ========================================
     $B7h$7$FK:$l$J$$!#(B    
     $B$3$N1'Ch$,=*$k$^$G!Y(B              $B<i2,(B $BCNI'(B (MORIOKA Tomohiko)
====================================== Email: <morioka@jaist.ac.jp> ==
# PGP public key: http://www-ks.jaist.ac.jp/~morioka/tomohiko/pgp.key

--Multipart_Wed_May_28_22:03:31_1997-1--

--pgp-sign-Multipart_Wed_May_28_22:03:31_1997-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP MESSAGE-----
Version: 2.6.3ia
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBM4wtKhnuUGV7wuH5AQGudAQAkzrFRCeM5/ffnzFa54TI0S0zoB7EqNWW
ZgB1e5DqyKMz2b//+Q6yC9xxJ+kODD4StFO3MfJWywgPaLJpW2SCHHQ8tOkcAUsF
eQvSyq9JQQaqke5mK3LUs120lvxu2qMmlHuVJ70FZR9dJ2504v/+xtU3ppxVpAqg
10lR0T/O+/w=
=Dodx
-----END PGP MESSAGE-----

--pgp-sign-Multipart_Wed_May_28_22:03:31_1997-1--
Technical Details
Message-ID: <s1c7mgjzr2q.fsf@is18e0s01.jaist.ac.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: ff358,b69b4a9e0df362cf,start
X-Google-Attributes: gidff358,public
X-Google-Thread: 1107f7,b69b4a9e0df362cf,start
X-Google-Attributes: gid1107f7,public
From: morioka@jaist.ac.jp (守岡 知彦 / MORIOKA Tomohiko)
Subject: display raw non us-ascii message in VM
Date: 1997/05/28
Message-ID: <s1c7mgjzr2q.fsf@is18e0s01.jaist.ac.jp>
X-Deja-AN: 244633143
Dnas-Posting-Host: is18e0s01
X-MUA: gnus-mime 0.22 (for SEMI), SEMI MIME-View 0.90
Followup-To: fj.editor.xemacs
X-Emacs: Emacs 19.34.94, MULE 3.0 (紅葉賀)
X-Face: %yc?f+O/cVKlH*K(H2X/6-d''suf|"1{S:Y0}_9$t@0G3:5M2:-Ck^[8+4^iSLeGc[Ey[WP PF]2M#Q9C'u~[=7TJP72J`PZdWvP=s-'-/LhFneC->=ILc~H#$lf2%hLL5U8?psIp`<[>d&@$Pm%~( A'"CJ.zuX@TXh\Ra4,b7M&`f"hexU-a4,#X\]Bfp'JI+MGUDRA%_$&UnWAem4}1R"4%uivgn;xFZ%" NS>)eCuFYNHc/:W^:{7H>bGQS],x5z[Cy~C;7j#:8y9q|"~9~UWjE<Vm_;)o<Q4S5NweLc(cl7-suY NF|_O*xodbmQavM
Organization: JAIST, Hokuriku / 北陸先端科学技術大学院大学
Newsgroups: fj.editor.xemacs,fj.editor.emacs