]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve movemail default
authorRobert Pluim <rpluim@gmail.com>
Fri, 15 Jun 2018 07:40:53 +0000 (00:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 15 Jun 2018 07:41:24 +0000 (00:41 -0700)
* lisp/gnus/mail-source.el (mail-source-movemail-program):
Change default to "movemail".
(mail-source-movemail): Pass just mail-source-movemail-program to
call-process instead of fully specifying it relative to
exec-directory.  Ensures that we will find Mailutils movemail if
it is installed.  (Bug#31737)

lisp/gnus/mail-source.el

index d2850f4cee328d468b5c5dcd84a0005767b2f45f..abb5e2d1231b6260c7502dbc3f198969b193d22a 100644 (file)
@@ -301,9 +301,9 @@ number."
   :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"
+  :version "26.2"
   :group 'mail-source
   :type '(choice (const nil) string))
 
@@ -682,12 +682,16 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
              (setq errors (generate-new-buffer " *mail source loss*"))
              (let ((default-directory "/"))
                (setq result
+                     ;; call-process 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))
+                        mail-source-movemail-program
                         nil errors nil from to)))))
              (when (file-exists-p to)
                (set-file-modes to mail-source-default-file-modes))