Menu

#11 compose-mail fails for mh-e-user-agent

mh-e-6.0
closed-works-for-me
None
5
2013-02-23
2001-03-08
Bill Wohler
No

From: dever@squirm.hlo.dec.com (Dan Dever)
Subject: Bug in compose-mail with mh-e-user-agent
NEWSGROUPS: gnu.emacs.bug
Date: Wed, 7 Mar 2001 12:22:52 -0500

This bug report will be sent to the Free Software
Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers
do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (alphaev56-dec-osf4.0f, X toolkit)
of Wed Feb 21 2001 on pia002.hlo.dec.com

mh-e info:

version: $Id: mh-e.el,v 1.20 1998/05/03 07:34:07 rms
Exp $
Emacs: 20.7.1 on berkeley-unix OSF1 squirm.hlo.dec.com
V4.0 1229 alpha

MH info:

/usr/bin/mh/inc:
version: MH 6.7 #1[UCI] (morley.zk3.dec.com) of Mon Apr
12 12:50:29 EDT 1999
options: [SYS5DIR] [_BSD] [ISI] [MHRC] [WHATNOW] [MHE]
[BSD42] [BERK]
[BSD43] [LOCKF] [NETWORK] [BIND] [RPATHS]
[DPOP] [RPOP] [UK]
[FOLDPROT='"0700"'] [MSGPROT='"0600"']
[TYPESIG='void']
[POPSERVICE='"pop"'] [SPRINTF='int'] [SENDMTS]
[SMTP] [POP]
[X400]

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

C-x m (compose-mail) fails for me if mail-user-agent is
set to
mh-e-user-agent.

Example sequence:

Here are the entire contents of my .emacs file:
(setq mail-user-agent 'mh-e-user-agent)

I type C-x m. I get this error message:
Wrong type argument: char-or-string-p,
nil

The problem seems to be that mh-smail-batch (in
mh-comp.el)
calls mh-send with a subject equal to nil. Then
mh-send passes
this nil subject to mh-send-sub which passes it on to
mh-insert-fields, which finally tries to insert nil.
The insert
function wants a character or a string, not nil, and
issues the
error message above.

Here's a version of mh-smail-batch that seems to fix
the
problem. All I've done is replace subject with (or
subject "")
in the call to mh-send:

(defun mh-smail-batch (&optional to subject
other-headers &rest ignored)
"Set up a mail composition draft with the MH mail
system.
This function is an entry point to mh-e, the Emacs
front end
to the MH mail system. This function does not prompt
the user
for any header fields, and thus is suitable for use by
programs
that want to create a mail buffer.
Users should use `\\[mh-smail]' to compose mail."
(mh-find-path)
(let ((mh-error-if-no-draft t))
(mh-send (or to "") "" (or subject ""))))

Regards,
Dan (dever@segsrv.hlo.dec.com)

Recent input:
C-x m ESC x r e p o r t - e m a c s - b u g return

Recent messages:
For information about the GNU Project and its goals,
type C-h C-p.
Loading mh-comp...
Loading mh-comp...done
Composing a message...
Wrong type argument: char-or-string-p, nil
Auto-saving...
Wrong type argument: char-or-string-p, nil
Loading emacsbug...
Loading emacsbug...done

Discussion

  • Bill Wohler

    Bill Wohler - 2001-03-08

    Logged In: YES
    user_id=93690

    Appears to have already been fixed in 21.0.98. Can't
    reproduce.

     
  • Bill Wohler

    Bill Wohler - 2001-03-08
    • milestone: 102380 --> 102385
    • status: open --> closed-works-for-me
     
  • Eric Mumpower

    Eric Mumpower - 2001-10-10

    Logged In: YES
    user_id=346437

    I see the reported bug in FSF emacs 20.7, which, as far as
    I have been able to determine, is the most recent version
    of FSF emacs which has been released.

    Would it be reasonable to request either investigation of
    this bug under the most recent FSF emacs, or access to the
    source of the version of mh-e provided in "21.0.98"?

     
  • Bill Wohler

    Bill Wohler - 2001-11-11

    Logged In: YES
    user_id=93690

    This bug also seems to be fixed in the current mh-e sources
    and works in Emacs 20.7 as well.

     
  • Bill Wohler

    Bill Wohler - 2001-12-16
    • priority: 8 --> 5
     
  • Bill Wohler

    Bill Wohler - 2001-12-16
    • milestone: 102385 --> mh-e-6.0
     
  • Bill Wohler

    Bill Wohler - 2003-04-09
    • assigned_to: nobody --> wohler
     
  • Bill Wohler

    Bill Wohler - 2013-02-23
    • labels: General -->
     

Log in to post a comment.

MongoDB Logo MongoDB