From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5062 Path: main.gmane.org!not-for-mail From: =?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= / MORIOKA Tomohiko Newsgroups: gmane.emacs.gnus.general Subject: Re: Question on tm + sgnus header toggling Date: Thu, 08 Feb 1996 02:42:38 JST Sender: morioka@jaist.ac.jp Message-ID: <199602071742.CAA08078@melon.jaist.ac.jp> References: <9602061937.AA0696@mortgage.berkeley.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.42) Content-Type: multipart/mixed; boundary="Multipart_Thu_Feb__8_02:42:35_1996-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035145718 31658 80.91.224.250 (20 Oct 2002 20:28:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:28:38 +0000 (UTC) Cc: tm-eng@chamonix.jaist.ac.jp, ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.7.3/8.6.9) with SMTP id KAA09177 for ; Wed, 7 Feb 1996 10:51:02 -0800 Original-Received: from melon.jaist.ac.jp (melon.jaist.ac.jp [150.65.1.6]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Wed, 7 Feb 1996 18:43:13 +0100 Original-Received: by melon.jaist.ac.jp (8.6.9+2.4Wb3/2.8Wb); Thu, 8 Feb 1996 02:42:39 +0900 X-MUA: mh-e 5.0.2 + tm-mh-e 7.47, tm-view 7.41 X-Emacs: Mule 2.3 =?ISO-2022-JP?B?KBskQkt2RSYyVhsoQik=?= based on 19.30 Original-To: Richard Stanton In-reply-to: Your message of "Tue, 06 Feb 1996 11:37:59 PST." <9602061937.AA0696@mortgage.berkeley.edu> Xref: main.gmane.org gmane.emacs.gnus.general:5062 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5062 --Multipart_Thu_Feb__8_02:42:35_1996-1 Content-Type: text/plain; charset=US-ASCII >>>>> In <9602061937.AA0696@mortgage.berkeley.edu> >>>>> Richard Stanton wrote: Richard> It seems that playing with variables like Richard> gnus-visible-headers makes quite a lot of difference to gnus' Richard> toggling behavior, and I'm wondering if maybe all my problems Richard> are just due to my not setting up sgnus/tm properly. I changed about header toggling. Because September Gnus already does not delete regions in header when pressing `t' so tm-gnus can use original function. For `W t' it deletes regions so tm-gnus uses `tm-gnus/summary-toggle-header' instead of `gnus-summary-toggle-header'. Please try following: --Multipart_Thu_Feb__8_02:42:35_1996-1 Content-Type: application/octet-stream; type=emacs-lisp Content-Disposition: attachment; filename="tm-sgnus.el" Content-Transfer-Encoding: 7bit ;;; ;;; tm-sgnus.el --- tm-gnus module for September Gnus ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko ;;; MURATA Masahiro ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/09/24 ;;; Version: $Revision: 7.38 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). ;;; ;;; 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 This program. If not, write to the Free Software ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; ;;; Code: (require 'tl-str) (require 'tl-list) (require 'tl-misc) (require 'tm-view) (require 'gnus) (require 'tm-gd5) (eval-when-compile (require 'cl)) ;;; @ version ;;; (defconst tm-gnus/RCS-ID "$Id: tm-sgnus.el,v 7.38 1996/02/06 08:53:27 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) ;;; @ variables ;;; (defvar tm-gnus/automatic-mime-preview t "*If non-nil, show MIME processed article. This variable is set to `gnus-show-mime'.") (setq gnus-show-mime tm-gnus/automatic-mime-preview) ;;; @ command functions ;;; (defun tm-gnus/view-message (arg) "MIME decode and play this message." (interactive "P") (let ((gnus-break-pages nil)) (gnus-summary-select-article t t) ) (pop-to-buffer gnus-original-article-buffer t) (let (buffer-read-only) (if (text-property-any (point-min) (point-max) 'invisible t) (remove-text-properties (point-min) (point-max) gnus-hidden-properties) )) (mime/viewer-mode nil nil nil gnus-original-article-buffer gnus-article-buffer) ) (defun tm-gnus/summary-scroll-down () "Scroll down one line current article." (interactive) (gnus-summary-scroll-up -1) ) (defun tm-gnus/summary-toggle-header (&optional arg) (interactive "P") (if tm-gnus/automatic-mime-preview (let* ((hidden (save-excursion (set-buffer gnus-article-buffer) (text-property-any (goto-char (point-min)) (search-forward "\n\n") 'invisible t) )) (mime-viewer/redisplay t) ) (gnus-summary-select-article hidden t) ) (gnus-summary-toggle-header arg)) ) (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message)) (define-key gnus-summary-mode-map "\e\r" (function tm-gnus/summary-scroll-down)) (substitute-key-definition 'gnus-summary-toggle-header 'tm-gnus/summary-toggle-header gnus-summary-mode-map) ;;; @ for tm-view ;;; (set-alist 'mime-viewer/content-header-filter-alist 'gnus-original-article-mode (function tm-gnus/content-header-filter)) (set-alist 'mime-viewer/code-converter-alist 'gnus-original-article-mode (function tm-gnus/code-convert-region-to-emacs)) (defun mime-viewer/quitting-method-for-sgnus () (if (not gnus-show-mime) (mime-viewer/kill-buffer)) (delete-other-windows) (gnus-article-show-summary) (if (or (not gnus-show-mime) (null gnus-have-all-headers)) (gnus-summary-select-article nil t) )) (call-after-loaded 'tm-view (lambda () (set-alist 'mime-viewer/quitting-method-alist 'gnus-original-article-mode (function mime-viewer/quitting-method-for-sgnus)) (set-alist 'mime-viewer/show-summary-method 'gnus-original-article-mode (function mime-viewer/quitting-method-for-sgnus)) )) ;;; @ for tm-partial ;;; (defun tm-gnus/partial-preview-function () (tm-gnus/view-message (gnus-summary-article-number)) ) (call-after-loaded 'tm-partial (lambda () (set-atype 'mime/content-decoding-condition '((type . "message/partial") (method . mime-article/grab-message/partials) (major-mode . gnus-original-article-mode) (summary-buffer-exp . gnus-summary-buffer) )) (set-alist 'tm-partial/preview-article-method-alist 'gnus-original-article-mode 'tm-gnus/partial-preview-function) )) ;;; @ article filter ;;; (defun tm-gnus/article-reset-variable () (setq tm-gnus/automatic-mime-preview nil) ) (add-hook 'gnus-article-prepare-hook 'tm-gnus/article-reset-variable) (defun tm-gnus/preview-article () (make-local-variable 'tm:mother-button-dispatcher) (setq tm:mother-button-dispatcher (function gnus-article-push-button)) (let ((mime-viewer/ignored-field-regexp "^:$")) (mime/viewer-mode nil nil nil gnus-original-article-buffer gnus-article-buffer) ) (setq tm-gnus/automatic-mime-preview t) (run-hooks 'tm-gnus/article-prepare-hook) ) (setq gnus-show-mime-method (function tm-gnus/preview-article)) (defun tm-gnus/article-decode-encoded-word () (tm-gnus/code-convert-region-to-emacs (point-min)(point-max) mime/default-coding-system) (mime/decode-message-header) (run-hooks 'tm-gnus/article-prepare-hook) ) (setq gnus-decode-encoded-word-method (function tm-gnus/article-decode-encoded-word)) ;;; @ for tm-edit ;;; (defun tm-gnus/forward-insert-buffer (buffer) (save-excursion (save-restriction (if gnus-signature-before-forwarded-message (goto-char (point-max)) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$")) (forward-line 1)) ;; Narrow to the area we are to insert. (narrow-to-region (point) (point)) ;; Insert the separators and the forwarded buffer. (mime-editor/insert-tag "message" "rfc822") (insert-buffer-substring buffer) ;; Delete any invisible text. (goto-char (point-min)) (let (beg) (while (setq beg (next-single-property-change (point) 'invisible)) (goto-char beg) (delete-region beg (or (next-single-property-change (point) 'invisible) (point-max)))))))) (call-after-loaded 'mime-setup (lambda () (cond ((string-match "XEmacs" emacs-version) (require 'gnus-msg) (fset 'gnus-forward-insert-buffer 'tm-gnus/forward-insert-buffer) ) (t (eval-after-load "gnus-msg" '(fset 'gnus-forward-insert-buffer 'tm-gnus/forward-insert-buffer) ) )))) ;;; @ for BBDB ;;; (defun tm-gnus/bbdb-setup () (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook) (progn (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record) (add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record) ))) (add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t) (tm-gnus/bbdb-setup) (call-after-loaded 'bbdb (lambda () (require 'tm-bbdb) )) ;;; @ end ;;; (provide 'tm-sgnus) ;;; tm-sgnus.el ends here --Multipart_Thu_Feb__8_02:42:35_1996-1 Content-Type: text/plain; charset=US-ASCII -- ---------------------------------------------------------------------- Morioka Tomohiko (`Morioka' is my family name, `Tomohiko' is my personal name.) ------- I protest resumption of French and Chinese nuclear testing.--- --Multipart_Thu_Feb__8_02:42:35_1996-1--