From 3ada1da89cd3a0adb723572074ed2913dabd0288 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 15 Apr 2001 20:59:02 +0000 Subject: [PATCH] Fix bug: toggling of raw headers and raw body should be more separate. --- v7/src/imail/imail-top.scm | 33 +++++++++++++++++---------------- v7/src/imail/todo.txt | 6 +----- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index a4ef1bc85..19674ea66 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.235 2001/04/11 01:09:16 cph Exp $ +;;; $Id: imail-top.scm,v 1.236 2001/04/15 20:58:44 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -1481,20 +1481,24 @@ With prefix argument, closes and buries only selected IMAIL folder." () (lambda () (let ((message (selected-message))) - (select-message (selected-folder) - message - #t - (if (get-property message 'RAW? #f) #f 'FULL-HEADERS))))) + (store-property! message 'RAW? + (case (get-property message 'RAW? #f) + ((#f) 'HEADERS-ONLY) + ((HEADERS-ONLY) #f) + ((BODY-ONLY) #t) + (else 'BODY-ONLY))) + (select-message (selected-folder) message #t)))) (define-command imail-toggle-message "Toggle between standard and raw formats for message." () (lambda () (let ((message (selected-message))) - (select-message (selected-folder) - message - #t - (not (get-property message 'RAW? #f)))))) + (store-property! message 'RAW? + (case (get-property message 'RAW? #f) + ((#f HEADERS-ONLY) #t) + (else #f))) + (select-message (selected-folder) message #t)))) (define-command imail-get-new-mail "Probe the mail server for new mail. @@ -1808,7 +1812,7 @@ Negative argument means search in reverse." ;;;; Message selection -(define (select-message folder selector #!optional force? raw?) +(define (select-message folder selector #!optional force?) (let ((buffer (imail-folder->buffer folder #t)) (message (cond ((message? selector) @@ -1839,10 +1843,7 @@ Negative argument means search in reverse." (with-read-only-defeated mark (lambda () (if message - (begin - (store-property! message 'RAW? - (if (default-object? raw?) #f raw?)) - (insert-message message #f 0 mark)) + (insert-message message #f 0 mark) (insert-string "[This folder has no messages in it.]" mark)))) (mark-temporary! mark)) @@ -2064,8 +2065,8 @@ Negative argument means search in reverse." (define (insert-message message inline-only? left-margin mark) (let ((raw? (get-property message 'RAW? #f))) - (insert-header-fields message raw? mark) - (cond ((and raw? (not (eq? raw? 'FULL-HEADERS))) + (insert-header-fields message (and raw? (not (eq? raw? 'BODY-ONLY))) mark) + (cond ((and raw? (not (eq? raw? 'HEADERS-ONLY))) (insert-message-body message mark)) ((folder-supports-mime? (message-folder message)) (insert-mime-message-body message mark inline-only? left-margin)) diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index 662d6f216..565a2f383 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,13 +1,9 @@ IMAIL To-Do List -$Id: todo.txt,v 1.116 2001/04/15 20:25:08 cph Exp $ +$Id: todo.txt,v 1.117 2001/04/15 20:59:02 cph Exp $ Bug fixes --------- -* M-x imail-toggle-header should not change other aspects of the - message presentation; it should toggle only the headers. Currently - it also affects the RAW/formatted flag too. - * When network connection gets wedged, Edwin locks up and can't be interrupted with C-g. This is fundamentally an Edwin problem, but it occurs much more frequently with IMAIL. See if there's a better -- 2.25.1