all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Kupfer <kupfer@rawbw.com>
To: Chris Siebenmann <cks.emacsbugs-01@cs.toronto.edu>,
	Bill Wohler <wohler@newt.com>
Cc: 67361@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: 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	[thread overview]
Message-ID: <147777.1700879515@alto> (raw)
In-Reply-To: My message of "Wed, 22 Nov 2023 08:30:55 -0800." <11469.1700670655@alto>

Mike Kupfer wrote:

> > > From: Chris Siebenmann <cks.emacsbugs-01@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





  reply	other threads:[~2023-11-25  2:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22  1:45 bug#67361: 29.1; MH-E: creating a new folder can sometimes fail with a Lisp error Chris Siebenmann
2023-11-22 14:41 ` Eli Zaretskii
2023-11-22 16:30   ` Mike Kupfer
2023-11-25  2:31     ` Mike Kupfer [this message]
2023-11-25  3:18       ` Chris Siebenmann
2023-11-25  3:56         ` Mike Kupfer
2023-12-30 23:33           ` Bill Wohler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-31 16:49             ` Bill Wohler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-16  1:34               ` Bill Wohler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-16 12:24                 ` Eli Zaretskii
2024-01-17 16:47                   ` Bill Wohler via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=147777.1700879515@alto \
    --to=kupfer@rawbw.com \
    --cc=67361@debbugs.gnu.org \
    --cc=cks.emacsbugs-01@cs.toronto.edu \
    --cc=eliz@gnu.org \
    --cc=wohler@newt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.