From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.bugs 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 Message-ID: <147777.1700879515@alto> References: <2410849.1700617511@apps0.cs.toronto.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10973"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67361@debbugs.gnu.org, Eli Zaretskii To: Chris Siebenmann , Bill Wohler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 25 03:33:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r6iTu-0002cr-VJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Nov 2023 03:33:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6iTd-0005mV-K7; Fri, 24 Nov 2023 21:33:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6iTZ-0005Uz-Kz for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 21:32:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6iTZ-0008Il-Cs for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 21:32:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6iTd-0006ZO-T4 for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 21:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mike Kupfer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Nov 2023 02:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67361 X-GNU-PR-Package: emacs Original-Received: via spool by 67361-submit@debbugs.gnu.org id=B67361.170087954225170 (code B ref 67361); Sat, 25 Nov 2023 02:33:01 +0000 Original-Received: (at 67361) by debbugs.gnu.org; 25 Nov 2023 02:32:22 +0000 Original-Received: from localhost ([127.0.0.1]:37539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6iSz-0006Xu-Tl for submit@debbugs.gnu.org; Fri, 24 Nov 2023 21:32:22 -0500 Original-Received: from shell1.rawbw.com ([198.144.192.42]:35278 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6iSw-0006Xd-Qn for 67361@debbugs.gnu.org; Fri, 24 Nov 2023 21:32:20 -0500 Original-Received: from alto (135-180-173-181.dsl.dynamic.sonic.net [135.180.173.181] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 3AP2VtM9069976 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Nov 2023 18:32:01 -0800 (PST) (envelope-from kupfer@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-173-181.dsl.dynamic.sonic.net [135.180.173.181] (may be forged) claimed to be alto In-Reply-To: My message of "Wed, 22 Nov 2023 08:30:55 -0800." <11469.1700670655@alto> X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 29.1.90 Content-ID: <147776.1700879515.1@alto> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274904 Archived-At: Mike Kupfer wrote: > > > From: Chris Siebenmann > > > 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