GNU bug report logs - #67361
29.1; MH-E: creating a new folder can sometimes fail with a Lisp error

Previous Next

Package: emacs;

Reported by: Chris Siebenmann <cks.emacsbugs-01 <at> cs.toronto.edu>

Date: Wed, 22 Nov 2023 08:26:03 UTC

Severity: normal

Found in version 29.1

Done: Bill Wohler <wohler <at> newt.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 67361 <at> debbugs.gnu.org (full text, mbox):

From: Mike Kupfer <kupfer <at> rawbw.com>
To: Chris Siebenmann <cks.emacsbugs-01 <at> cs.toronto.edu>,
 Bill Wohler <wohler <at> newt.com>
Cc: 67361 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#67361: 29.1;
 MH-E: creating a new folder can sometimes fail with a Lisp error
Date: Fri, 24 Nov 2023 18:31:55 -0800
Mike Kupfer wrote:

> > > From: Chris Siebenmann <cks.emacsbugs-01 <at> cs.toronto.edu>
> > > Date: Tue, 21 Nov 2023 20:45:11 -0500
> > > 
> > > Under some conditions, creating a new (N)MH folder in MH-E can fail with
> > > a Lisp error of 'Wrong type argument: stringp, nil'. This happens if for
> > > some reason you have loaded/required mh-speed.el but have not created a
> > > speedbar.
> 
> This sounds familiar.  I don't use the speedbar, but I sometimes hit
> this issue and find that (boundp 'mh-speed-folder-map) returns t.  I
> thought there was an open bug for this already, but I'm not finding it.
> I'll look some more over the holiday weekend.

I'm sure I've run into this problem in the past, but I can't find any
record of it.  Not in debbugs.gnu.org, not in the SourceForge bug
tracker, not in my email archives.  Hmph.

Still, I agree with Chris's root cause analysis:

> I believe the root cause of this problem is that mh-prompt-for-folder
> calls mh-speed-add-folder if 'mh-speed-folder-map is bound:
> 	(when (boundp 'mh-speed-folder-map)
> 	  (mh-speed-add-folder folder-name))
> 
> However, mh-speed-add-folder requires that speedbar-buffer exists, as it
> starts with:
> 	(with-current-buffer speedbar-buffer
> 	  ....)

The same issue appears in 2 other places:

  - mh-kill-folder, calling mh-speed-invalidate-map
  - mh-index-new-folder, calling mh-speed-add-folder

I'm not entirely sure how I have ended up with mh-speed-folder-map bound
in the past.  It might be from trying to get the help information for
something that's defined in mh-speed.el--that seems to cause mh-speed to
be loaded, which causes mh-speed-folder-map to be initialized.

Using mh-speed-folder-map as the test for whether the speedbar is active
seems broken to me.  Unfortunately, I don't use the speedbar, and I
don't understand the MH-E speedbar code all that well.  So I'm not sure
what the right test is.  There's a function mh-speed-flists-active-p,
but its docstring says

  "Check if speedbar is running with message counts enabled."

Bill, is there a mode where the speedbar is running *without* message
counts enabled?  Or can we just replace 

    (when (boundp 'mh-speed-folder-map)

with

    (if (mh-speed-flists-active-p)

?

mike




This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.