aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2018-06-15 00:40:53 -0700
committerPaul Eggert2018-06-15 00:41:24 -0700
commit63f1dc4f7c33cc7cc738dbfae3d8192ae448b2f6 (patch)
tree36844fdbaac000c790de1749ba73f95adc0ae8d1
parent0b1a2ae84afe840997c1444b1dc56909b542b011 (diff)
downloademacs-63f1dc4f7c33cc7cc738dbfae3d8192ae448b2f6.tar.gz
emacs-63f1dc4f7c33cc7cc738dbfae3d8192ae448b2f6.zip
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)
-rw-r--r--lisp/gnus/mail-source.el12
1 files 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."
301 :group 'mail-source 301 :group 'mail-source
302 :type 'number) 302 :type 'number)
303 303
304(defcustom mail-source-movemail-program nil 304(defcustom mail-source-movemail-program "movemail"
305 "If non-nil, name of program for fetching new mail." 305 "If non-nil, name of program for fetching new mail."
306 :version "22.1" 306 :version "26.2"
307 :group 'mail-source 307 :group 'mail-source
308 :type '(choice (const nil) string)) 308 :type '(choice (const nil) string))
309 309
@@ -682,12 +682,16 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
682 (setq errors (generate-new-buffer " *mail source loss*")) 682 (setq errors (generate-new-buffer " *mail source loss*"))
683 (let ((default-directory "/")) 683 (let ((default-directory "/"))
684 (setq result 684 (setq result
685 ;; call-process looks in exec-path, which
686 ;; contains exec-directory, so will find
687 ;; Mailutils movemail if it exists, else it will
688 ;; find "our" movemail in exec-directory.
689 ;; Bug#31737
685 (apply 690 (apply
686 'call-process 691 'call-process
687 (append 692 (append
688 (list 693 (list
689 (or mail-source-movemail-program 694 mail-source-movemail-program
690 (expand-file-name "movemail" exec-directory))
691 nil errors nil from to))))) 695 nil errors nil from to)))))
692 (when (file-exists-p to) 696 (when (file-exists-p to)
693 (set-file-modes to mail-source-default-file-modes)) 697 (set-file-modes to mail-source-default-file-modes))