From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix MH-E mail composition with GNU Mailutils Date: Sat, 30 Jun 2018 12:00:40 -0700 Message-ID: <18700.1530385240@alto> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: blaine.gmane.org 1530385137 13488 195.159.176.226 (30 Jun 2018 18:58:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 18:58:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 30 20:58:53 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZL58-0003L8-9r for ged-emacs-devel@m.gmane.org; Sat, 30 Jun 2018 20:58:50 +0200 Original-Received: from localhost ([::1]:47712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZL7D-0008AQ-IV for ged-emacs-devel@m.gmane.org; Sat, 30 Jun 2018 15:00:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZL76-0008AA-4E for emacs-devel@gnu.org; Sat, 30 Jun 2018 15:00:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZL72-0002Ke-W6 for emacs-devel@gnu.org; Sat, 30 Jun 2018 15:00:52 -0400 Original-Received: from shell1.rawbw.com ([198.144.192.42]:15477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZL72-0002Hz-HR for emacs-devel@gnu.org; Sat, 30 Jun 2018 15:00:48 -0400 Original-Received: from alto (96-95-200-133-static.hfc.comcastbusiness.net [96.95.200.133]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id w5UJ0eDt019053 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 30 Jun 2018 12:00:46 -0700 (PDT) (envelope-from mkupfer@alum.berkeley.edu) X-Authentication-Warning: shell1.rawbw.com: Host 96-95-200-133-static.hfc.comcastbusiness.net [96.95.200.133] claimed to be alto X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 26.1.50 Content-ID: <18699.1530385240.1@alto> X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 198.144.192.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226849 Archived-At: Currently, trying to compose a message using MH-E with Mailutils fails: no composition buffer is created, and the user gets an obscure error message about deleting a non-empty directory. This has been broken for awhile (i.e., it's not a regression in 26.1), but the fix is pretty simple. Is this okay for emacs-26? diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index a9f809cfa1..aa22df8b18 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -925,8 +925,10 @@ mh-bare-components (list "-form" mh-comp-formfile))) (setq new (make-temp-file "comp.")) (rename-file (concat temp-folder "/" "1") new t) - (delete-file (concat temp-folder "/" ".mh_sequences")) - (delete-directory temp-folder) + ;; The temp folder could contain various metadata files. Rather + ;; than trying to enumerate all the known files, just do a + ;; recursive delete on the directory. + (delete-directory temp-folder t) new)) (defun mh-read-draft (use initial-contents delete-contents-file) thanks, mike