GNU bug report logs - #31737
26.1.50; Gnus does not use mailutils movemail

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Wed, 6 Jun 2018 19:25:01 UTC

Severity: normal

Found in version 26.1.50

Fixed in version 26.2

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: m43cap <at> yandex.com, larsi <at> gnus.org, 31737 <at> debbugs.gnu.org
Subject: Re: bug#31737: 26.1.50; Gnus does not use mailutils movemail
Date: Thu, 14 Jun 2018 14:14:28 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Colin Baxter <m43cap <at> yandex.com>,  31737 <at> debbugs.gnu.org
>> Date: Wed, 13 Jun 2018 16:08:53 +0200
>> 
>> Eli, were you thinking that mail-source should duplicate the movemail
>> detection logic in rmail? Or should it just assume Mailutils movemail
>> and pass '--emacs'?
>
> The former.

Something like this? Testing definitely required by someone who uses
mailutils movemail for Gnus. Not sure this is emacs-26 material
anymore.

diff --git i/lisp/gnus/mail-source.el w/lisp/gnus/mail-source.el
index d2850f4cee..99dc40c843 100644
--- i/lisp/gnus/mail-source.el
+++ w/lisp/gnus/mail-source.el
@@ -301,7 +301,7 @@ mail-source-idle-time-delay
   :group 'mail-source
   :type 'number)
 
-(defcustom mail-source-movemail-program nil
+(defcustom mail-source-movemail-program "movemail"
   "If non-nil, name of program for fetching new mail."
   :version "22.1"
   :group 'mail-source
@@ -653,6 +653,12 @@ mail-source-delete-crash-box
 	     mail-source-delete-incoming
 	     mail-source-delete-old-incoming-confirm)))))))
 
+(defun mail-source-movemail-variant-p (variants)
+  "Return t if the current movemail variant is any of VARIANTS.
+See `rmail-movemail-variant-p' for details"
+  (let ((rmail-movemail-program mail-source-movemail-program))
+    (rmail-movemail-variant-p variant)))
+
 (defun mail-source-movemail (from to)
   "Move FROM to TO using movemail."
   (if (not (file-writable-p to))
@@ -682,13 +688,20 @@ mail-source-movemail
 	      (setq errors (generate-new-buffer " *mail source loss*"))
 	      (let ((default-directory "/"))
 		(setq result
+                      ;; call-proces looks in exec-path, which
+                      ;; contains exec-directory, so will find
+                      ;; Mailutils movemail if it exists, else it will
+                      ;; find "our" movemail in exec-directory.
+                      ;; Bug#31737
 		      (apply
 		       'call-process
 		       (append
 			(list
-			 (or mail-source-movemail-program
-			     (expand-file-name "movemail" exec-directory))
-			 nil errors nil from to)))))
+			 mail-source-movemail-program
+			 nil errors nil)
+                        (when (mail-source-movemail-variant-p 'mailutils)
+                          (list "--emacs"))
+                        (list from to)))))
 	      (when (file-exists-p to)
 		(set-file-modes to mail-source-default-file-modes))
 	      (if (and (or (not (buffer-modified-p errors))




This bug report was last modified 6 years and 143 days ago.

Previous Next


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