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 19:56:59 -0800 Message-ID: <160446.1700884619@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="2119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67361@debbugs.gnu.org To: Chris Siebenmann , Bill Wohler , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 25 04:58:24 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 1r6joG-0000Sk-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Nov 2023 04:58:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6jny-0003wv-90; Fri, 24 Nov 2023 22:58:07 -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 1r6jnr-0003wY-BQ for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 22:58:00 -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 1r6jnq-0008VF-4g for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 22:57:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6jnu-0000OW-Kb for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 22:58:02 -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 03:58:02 +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.17008846451473 (code B ref 67361); Sat, 25 Nov 2023 03:58:02 +0000 Original-Received: (at 67361) by debbugs.gnu.org; 25 Nov 2023 03:57:25 +0000 Original-Received: from localhost ([127.0.0.1]:37583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6jnJ-0000Ng-2O for submit@debbugs.gnu.org; Fri, 24 Nov 2023 22:57:25 -0500 Original-Received: from shell1.rawbw.com ([198.144.192.42]:52966 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6jnF-0000NW-MU for 67361@debbugs.gnu.org; Fri, 24 Nov 2023 22:57:24 -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 3AP3uxJc086095 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Nov 2023 19:57:04 -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: Your message of "Fri, 24 Nov 2023 22:18:16 -0500." <2935352.1700882296@apps0.cs.toronto.edu> X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 29.1.90 Content-ID: <160445.1700884619.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:274909 Archived-At: Chris Siebenmann wrote: > I believe that if the speedbar is active (which I believe is when > speedbar-buffer is non-nil) and you're in MH-E, the speedbar will be > showing your MH folder hierarchy instead of anything else. But I'm not > 100% sure of this. I've lightly tested the patch below and not seen any problems. What do you guys think about it? mike diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -108,7 +108,7 @@ (window-config mh-previous-window-config)) (mh-set-folder-modified-p t) ; lock folder to kill it (mh-exec-cmd-daemon "rmf" 'mh-rmf-daemon folder) - (when (boundp 'mh-speed-folder-map) + (when (and (boundp 'speedbar-buffer) speedbar-buffer) (mh-speed-invalidate-map folder)) (mh-remove-from-sub-folders-cache folder) (mh-set-folder-modified-p nil) ; so kill-buffer doesn't complain diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -1569,7 +1569,7 @@ (save-excursion (mh-exec-cmd-quiet nil "rmf" chosen-name)) (mh-exec-cmd-quiet nil "folder" "-create" "-fast" chosen-name) (mh-remove-from-sub-folders-cache chosen-name) - (when (boundp 'mh-speed-folder-map) + (when (and (boundp 'speedbar-buffer) speedbar-buffer) (mh-speed-add-folder chosen-name)) chosen-name)) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -795,7 +795,7 @@ (message "Creating %s" folder-name) (mh-exec-cmd-error nil "folder" folder-name) (mh-remove-from-sub-folders-cache folder-name) - (when (boundp 'mh-speed-folder-map) + (when (and (boundp 'speedbar-buffer) speedbar-buffer) (mh-speed-add-folder folder-name)) (message "Creating %s...done" folder-name)) (new-file-flag