unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27203: 25.2; rmail doesn't handle mime if rmail-mime-attachment-dirs-alist gives no valid destination
@ 2017-06-02 21:09 Ken Olum
  2017-06-03  0:43 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Olum @ 2017-06-02 21:09 UTC (permalink / raw)
  To: 27203; +Cc: kdo

The variable rmail-mime-attachment-dirs-alist gives a list of directories
based on content-type to use as the default detachment location.  If
this variable has no matching entry for the content type of something in
a message, or no directories associated with that type exist, rmail will
not decode the MIME at all.  It prints the message "MIME decoding
failed: (wrong-type-argument stringp nil)", but this is often
immediately overwritten by message of the form "Showing message 1...",
so that you don't even know that something has failed.

To reproduce:

emacs -Q
M-x rmail
set the variable rmail-mime-attachment-dirs-alist to nil or
  something like '((".*" "~/nosuchdirectory"))
Go to a new MIME message
See undecoded MIME
Look in *Messages* buffer for error message.

This happens because directory is set to nil in rmail-mime-insert-bulk.
It passes the nil to file-name-as-directory, causing the error.  The
simplest fix would be to set directory to something like "nodirectory"
when rmail-mime-insert-bulk fails to find an existing directory to use.

In GNU Emacs 25.2.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2017-05-29 built on neptune
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 16.04.2 LTS

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS
LUCID X11


Important settings:
  value of $LC_ALL: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: nil

Major mode: Messages

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
No previous nondeleted message
Showing message 2...
MIME decoding failed: (wrong-type-argument stringp nil)
Showing message 2...done

Load-path shadows:
None found.

Features:
(shadow sort mail-extr dabbrev emacsbug sendmail cl-extra rmailkwd
cus-edit cus-start cus-load wid-edit thingatpt rmailmm message dired
format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse
rfc2231 rmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode
easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 110595 13424)
 (symbols 48 21548 0)
 (miscs 40 132 166)
 (strings 32 20017 2892)
 (string-bytes 1 546266)
 (vectors 16 13328)
 (vector-slots 8 444689 5903)
 (floats 8 175 176)
 (intervals 56 479 145)
 (buffers 976 22)
 (heap 1024 16339 714))





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-03  0:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-02 21:09 bug#27203: 25.2; rmail doesn't handle mime if rmail-mime-attachment-dirs-alist gives no valid destination Ken Olum
2017-06-03  0:43 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).