From 63f1dc4f7c33cc7cc738dbfae3d8192ae448b2f6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 15 Jun 2018 00:40:53 -0700 Subject: [PATCH] Improve movemail default * 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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index d2850f4cee3..abb5e2d1231 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -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)) -- 2.39.2