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)
This commit is contained in:
parent
0b1a2ae84a
commit
63f1dc4f7c
1 changed files with 8 additions and 4 deletions
|
@ -301,9 +301,9 @@ number."
|
||||||
:group 'mail-source
|
:group 'mail-source
|
||||||
:type 'number)
|
:type 'number)
|
||||||
|
|
||||||
(defcustom mail-source-movemail-program nil
|
(defcustom mail-source-movemail-program "movemail"
|
||||||
"If non-nil, name of program for fetching new mail."
|
"If non-nil, name of program for fetching new mail."
|
||||||
:version "22.1"
|
:version "26.2"
|
||||||
:group 'mail-source
|
:group 'mail-source
|
||||||
:type '(choice (const nil) string))
|
: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*"))
|
(setq errors (generate-new-buffer " *mail source loss*"))
|
||||||
(let ((default-directory "/"))
|
(let ((default-directory "/"))
|
||||||
(setq result
|
(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
|
(apply
|
||||||
'call-process
|
'call-process
|
||||||
(append
|
(append
|
||||||
(list
|
(list
|
||||||
(or mail-source-movemail-program
|
mail-source-movemail-program
|
||||||
(expand-file-name "movemail" exec-directory))
|
|
||||||
nil errors nil from to)))))
|
nil errors nil from to)))))
|
||||||
(when (file-exists-p to)
|
(when (file-exists-p to)
|
||||||
(set-file-modes to mail-source-default-file-modes))
|
(set-file-modes to mail-source-default-file-modes))
|
||||||
|
|
Loading…
Add table
Reference in a new issue