Mike Kupfer
2014-04-28 00:30:27 UTC
---
** [bugs:#474] error if mh-x-face-file is nil**
**Status:** unread
**Milestone:** Unassigned
**Created:** Mon Apr 28, 2014 12:30 AM UTC by Mike Kupfer
**Last Updated:** Mon Apr 28, 2014 12:30 AM UTC
**Owner:** Mike Kupfer
The docstring for mh-x-face-file says that you can set it to nil to disable the creation of an X-Face header in outgoing mail. But if you actually do that, you get an error. The debugger says
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-exists-p(nil)
mh-insert-x-face()
mh-compose-and-send-mail("draft-1" "" nil nil "" "" "" nil nil #<window-configuration>)
mh-send-sub("" "" "" #<window-configuration>)
mh-send("" "" "")
call-interactively(mh-send)
ad-Orig-mh-smail()
mh-smail()
call-interactively(mh-smail record nil)
command-execute(mh-smail record)
execute-extended-command(nil "mh-smail")
call-interactively(execute-extended-command nil nil)
Originally observed in MH-E 8.3.1, and confirmed (by looking at the source) that the same issue exists in MH-E 8.5. Emacs 24.3 (and maybe 23.4; I can't remember what Ubuntu 12.04 ships).
The fix looks simple enough:
(defun mh-insert-x-face ()
"Append X-Face, Face or X-Image-URL field to header.
If the field already exists, this function does nothing."
(when (and mh-x-face-file <--- ensure mh-x-face-file is non-nil
(file-exists-p mh-x-face-file)
(file-readable-p mh-x-face-file))
Or would it be better to check using (stringp mh-x-face-file)?
---
Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
** [bugs:#474] error if mh-x-face-file is nil**
**Status:** unread
**Milestone:** Unassigned
**Created:** Mon Apr 28, 2014 12:30 AM UTC by Mike Kupfer
**Last Updated:** Mon Apr 28, 2014 12:30 AM UTC
**Owner:** Mike Kupfer
The docstring for mh-x-face-file says that you can set it to nil to disable the creation of an X-Face header in outgoing mail. But if you actually do that, you get an error. The debugger says
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-exists-p(nil)
mh-insert-x-face()
mh-compose-and-send-mail("draft-1" "" nil nil "" "" "" nil nil #<window-configuration>)
mh-send-sub("" "" "" #<window-configuration>)
mh-send("" "" "")
call-interactively(mh-send)
ad-Orig-mh-smail()
mh-smail()
call-interactively(mh-smail record nil)
command-execute(mh-smail record)
execute-extended-command(nil "mh-smail")
call-interactively(execute-extended-command nil nil)
Originally observed in MH-E 8.3.1, and confirmed (by looking at the source) that the same issue exists in MH-E 8.5. Emacs 24.3 (and maybe 23.4; I can't remember what Ubuntu 12.04 ships).
The fix looks simple enough:
(defun mh-insert-x-face ()
"Append X-Face, Face or X-Image-URL field to header.
If the field already exists, this function does nothing."
(when (and mh-x-face-file <--- ensure mh-x-face-file is non-nil
(file-exists-p mh-x-face-file)
(file-readable-p mh-x-face-file))
Or would it be better to check using (stringp mh-x-face-file)?
---
Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.