Subject: bug#5441 closed by Glenn Morris <[email-masked]> (Re: bug#5441: 23.1.91; rmail error "Malformed quoted-printable text")

From: [email-masked] (Emacs bug Tracking System)
Date: Thu, 04 Feb 2010 05:11:01 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#5441: 23.1.91; rmail error "Malformed quoted-printable text"

It has been closed by Glenn Morris <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <[email-masked]> by
replying to this email.

-- 
5441: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5441
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5441: 23.1.91; rmail error "Malformed quoted-printable text"
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Thu, 04 Feb 2010 00:10:06 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

  * mail/rmail.el (rmail-show-message-1): Handle malformed
  quoted-printable text.  (Bug#5441)

Subject: 23.1.91; rmail error "Malformed quoted-printable text"
From: Kenichi Handa <[email-masked]>
To: [email-masked]
Date: Fri, 22 Jan 2010 10:35:26 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

While reading mails by rmail, I encountered "Malformed
quoted-printable text" error.  When I try to delete that
message by typing 'd', the same error was signaled.

The reason is that rmail-show-message-1 calls
mail-unquote-printable-region, and
mail-unquote-printable-region signals that error.  For a
workaround, I applied this patch to rmail-show-message-1,

=== modified file 'lisp/mail/rmail.el'
--- lisp/mail/rmail.el	2010-01-13 12:34:53 +0000
+++ lisp/mail/rmail.el	2010-01-22 01:05:47 +0000
@@ -2727,7 +2727,9 @@
 	    (insert-buffer-substring mbox-buf body-start end)
 	    (cond
 	     ((string= character-coding "quoted-printable")
-	      (mail-unquote-printable-region (point-min) (point-max)))
+	      (condition-case nil
+		  (mail-unquote-printable-region (point-min) (point-max))
+		(error nil)))
 	     ((and (string= character-coding "base64") is-text-message)
 	      (base64-decode-region (point-min) (point-max)))
 	     ((eq character-coding 'uuencode)

and successfully deleted the problematic messages.

But, I'm not sure that is the right fix.  Perhaps we should
attach some text or text-property to indicate this error.

---
Kenichi Handa
[email-masked]

In GNU Emacs 23.1.91.1 (i686-pc-linux-gnu, GTK+ Version 2.16.1)
 of 2010-01-15 on etlken
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-x o C-x b <return> C-s C-s C-a C-o <tab> ( c o n 
d i t i o n - c a s e SPC n i l C-a C-n <tab> C-M-n 
<return> <tab> ( e r r o r SPC n i l C-e ) C-M-a C-M-n 
q C-n C-n C-n C-M-x q C-/ C-g C-/ C-e C-M-p C-M-n ) 
C-M-x C-x C-s C-x o j n p d d q y C-x b R M <tab> <return> 
p n h p p n n n C-x o C-x b <return> C-p M-. <return> 
C-v C-x 1 C-v C-M-a C-u C-v C-u C-v C-x b <return> 
M-. <return> C-v C-l C-M-a C-x b <return> C-x b <return> 
C-M-e C-p C-p M-f M-f M-b C-SPC C-e C-b C-b C-b C-b 
C-b <escape> w C-a C-x b <return> C-a C-M-a C-v C-M-a 
C-v C-v C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n M-f M-f M-. <return> C-h f d e c o d e <tab> 
q u <tab> <backspace> <backspace> <tab> C-a C-k q u 
o <tab> d <tab> p r <tab> <tab> C-g C-v C-n C-n C-l 
C-x 2 M-. q u o t e d - p r i n t a b l e - d e c o 
d e - r e g i n <return> C-h f q u <tab> o <tab> d 
- p r <tab> t <backspace> d e <tab> r e <tab> C-a C-k 
C-g M-. C-y <return> C-v C-v C-v C-M-a C-M-n C-M-p 
C-x o C-M-a C-M-a C-M-e C-M-a C-v C-v C-v C-v C-x o 
C-v C-v C-v C-p C-p C-p C-p C-x o C-p C-p M-v C-x b 
R <backspace> r m <tab> <return> <escape> x r e p o 
r t <tab> <return>

Recent messages:
Saving file /usr/local/handa/RMAIL...
Wrote /usr/local/handa/RMAIL
Computing summary lines...done
Mark set [9 times]
Making completion list... [2 times]
Quit
byte-code: No tags containing quoted-printable-decode-regin
Making completion list...
Quit
Mark set [5 times]

Load-path shadows:
/usr/local/share/emacs/site-lisp/ndspell hides /usr/local/share/emacs/site-lisp/lookup/ndspell
/usr/local/share/emacs/site-lisp/ndeb hides /usr/local/share/emacs/site-lisp/lookup/ndeb
/usr/local/share/emacs/site-lisp/ndtp hides /usr/local/share/emacs/site-lisp/lookup/ndtp
/usr/local/share/emacs/site-lisp/sdicf hides /usr/local/share/emacs/site-lisp/lookup/sdicf
/usr/local/share/emacs/site-lisp/lookup hides /usr/local/share/emacs/site-lisp/lookup/lookup
/usr/local/share/emacs/site-lisp/ndkks hides /usr/local/share/emacs/site-lisp/lookup/ndkks
/usr/local/share/emacs/site-lisp/ndict hides /usr/local/share/emacs/site-lisp/lookup/ndict
/usr/local/share/emacs/site-lisp/ndcookie hides /usr/local/share/emacs/site-lisp/lookup/ndcookie
/usr/local/share/emacs/site-lisp/stem-english hides /usr/local/share/emacs/site-lisp/lookup/stem-english
/usr/local/share/emacs/site-lisp/ndsrd hides /usr/local/share/emacs/site-lisp/lookup/ndsrd
/usr/local/share/emacs/site-lisp/lookup-utils hides /usr/local/share/emacs/site-lisp/lookup/lookup-utils
/usr/local/share/emacs/site-lisp/lookup-vars hides /usr/local/share/emacs/site-lisp/lookup/lookup-vars
/usr/local/share/emacs/site-lisp/lookup-types hides /usr/local/share/emacs/site-lisp/lookup/lookup-types
/usr/local/share/emacs/site-lisp/ndic hides /usr/local/share/emacs/site-lisp/lookup/ndic
/usr/local/share/emacs/site-lisp/lookup-select hides /usr/local/share/emacs/site-lisp/lookup/lookup-select
/usr/local/share/emacs/site-lisp/lookup-content hides /usr/local/share/emacs/site-lisp/lookup/lookup-content
/usr/local/share/emacs/site-lisp/egg/leim-list hides /usr/local/work/emacs/stable/leim/leim-list
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp5 hides /usr/local/work/emacs/stable/lisp/pgg-pgp5
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-def hides /usr/local/work/emacs/stable/lisp/pgg-def
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-parse hides /usr/local/work/emacs/stable/lisp/pgg-parse
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp hides /usr/local/work/emacs/stable/lisp/pgg-pgp
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg hides /usr/local/work/emacs/stable/lisp/pgg
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sha1 hides /usr/local/work/emacs/stable/lisp/sha1
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hex-util hides /usr/local/work/emacs/stable/lisp/hex-util
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-gpg hides /usr/local/work/emacs/stable/lisp/pgg-gpg
~/gud/gdb-ui hides /usr/local/work/emacs/stable/lisp/progmodes/gdb-ui
~/gud/gud hides /usr/local/work/emacs/stable/lisp/progmodes/gud
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-digest hides /usr/local/work/emacs/stable/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-md5 hides /usr/local/work/emacs/stable/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl hides /usr/local/work/emacs/stable/lisp/net/sasl
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-cram hides /usr/local/work/emacs/stable/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-def hides /usr/local/work/emacs/stable/lisp/net/hmac-def
/usr/local/share/emacs/site-lisp/rmail-mime/mail/feedmail hides /usr/local/work/emacs/stable/lisp/mail/feedmail
/usr/local/share/emacs/site-lisp/rmail-mime/mail/smtpmail hides /usr/local/work/emacs/stable/lisp/mail/smtpmail
/usr/local/share/emacs/site-lisp/egg/its/greek hides /usr/local/work/emacs/stable/lisp/language/greek
/usr/local/share/emacs/site-lisp/egg/its/thai hides /usr/local/work/emacs/stable/lisp/language/thai
/usr/local/share/emacs/site-lisp/rmail-mime/mime/smime hides /usr/local/work/emacs/stable/lisp/gnus/smime
/usr/local/work/emacs/stable/lisp/language/thai-word hides ~/emacslisp/thai-word
/usr/local/work/emacs/stable/lisp/textmodes/tex-mode hides ~/emacslisp/tex-mode
/usr/local/work/emacs/stable/lisp/textmodes/table hides ~/emacslisp/table
/usr/local/work/emacs/stable/lisp/emacs-lisp/syntax hides ~/emacslisp/syntax
/usr/local/work/emacs/stable/lisp/progmodes/prolog hides ~/emacslisp/prolog

Features:
(shadow emacsbug descr-text nxml-uchnm rng-xsd xsd-regexp
rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc
xmltok log-edit pcvs-util vc vc-dispatcher image-mode
add-log info sh-script executable debug conf-mode dired
find-func pp help-fns novice ccl tabify man assoc rect grep
compile ja-dic mule-util kkc ja-dic-utl quail its/hira egg
egg-com egg-cnv egg-mlh menudiag its its-keydef egg-edep
make-mode browse-url lookup-entry lookup-content lookup-vse
ndtp lookup lookup-types lookup-utils lookup-vars evi
evi-mule ispell gnus-msg gnus-art mm-uu mml2015 epg-config
mm-view smime mel mime-def alist mcharset mcs-20 mcs-e20
path-util apel-ver product gnus-sum nnoo gnus-group
gnus-undo nnmail mail-source format-spec gnus-start
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems sort
supercite easy-mmode regi mail-extr message ecomplete rfc822
mml mml-sec password-cache mm-decode mm-bodies mm-encode
mailcap mailabbrev nnheader gnus-util netrc gmm-utils
wid-edit mailheader canlock hashcash sgml-mode dabbrev js
byte-opt bytecomp byte-compile json thingatpt etags imenu
newcomment cc-mode cc-fonts cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs php-mode derived
ansi-color shell comint ring iso-transl rmailmm mail-parse
rfc2231 japan-util vc-bzr sha1 hex-util parse-time vc-cvs
help-mode easymenu view multi-isearch rmailkwd time sendmail
regexp-opt rmail-sa rmailsum rmail mail-utils rfc2047
rfc2045 ietf-drums time-date qp mm-util mail-prsvr tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind font-render-setting gtk
x-toolkit x multi-tty emacs)