unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* movemail location
@ 2018-06-09 17:02 Joseph Mingrone
  2018-06-09 17:23 ` Paul Eggert
  2018-06-09 17:30 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Joseph Mingrone @ 2018-06-09 17:02 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

Hello,

Starting with 26.1, we have configured the Emacs package on FreeBSD to use GNU Mailutils.  However, now that $PREFIX/libexec/emacs/26.1/amd64-portbld-freebsd11.1/movemail is not installed, we have received reports that Gnus, for example, gives an error about not finding movemail.  There are a few different workarounds like patching, creating a link, or asking users to set `mail-source-movemail-program'.  Am I missing a configuration option, so that we don't require any of these workarounds?

If not, then probably the easiest thing to do is simply create a link in $PREFIX/libexec/emacs/26.1/amd64-portbld-freebsd11.1/ to point to $PREFIX/bin/movemail.

Thanks,

Joseph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 17:02 movemail location Joseph Mingrone
@ 2018-06-09 17:23 ` Paul Eggert
  2018-06-09 17:30 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Eggert @ 2018-06-09 17:23 UTC (permalink / raw)
  To: Joseph Mingrone, emacs-devel

Joseph Mingrone wrote:

> probably the easiest thing to do is simply create a link in $PREFIX/libexec/emacs/26.1/amd64-portbld-freebsd11.1/ to point to $PREFIX/bin/movemail.

That sounds like a good workaround for 26.1 and FreeBSD. There should be a 
better experience out of the box, though. Please see the discussion in Bug#31737.

https://bugs.gnu.org/31737



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 17:02 movemail location Joseph Mingrone
  2018-06-09 17:23 ` Paul Eggert
@ 2018-06-09 17:30 ` Eli Zaretskii
  2018-06-09 19:03   ` Joseph Mingrone
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-06-09 17:30 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Date: Sat, 09 Jun 2018 14:02:50 -0300
> 
> Starting with 26.1, we have configured the Emacs package on FreeBSD to use GNU Mailutils.  However, now that $PREFIX/libexec/emacs/26.1/amd64-portbld-freebsd11.1/movemail is not installed, we have received reports that Gnus, for example, gives an error about not finding movemail.  There are a few different workarounds like patching, creating a link, or asking users to set `mail-source-movemail-program'.  Am I missing a configuration option, so that we don't require any of these workarounds?

Is movemail from Mailutils on PATH?  if so, how come Gnus doesn't find
it, it should find it when it invokes it through call-process.

Can you spot why this doesn't work?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 17:30 ` Eli Zaretskii
@ 2018-06-09 19:03   ` Joseph Mingrone
  2018-06-09 19:24     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Joseph Mingrone @ 2018-06-09 19:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Date: Sat, 09 Jun 2018 14:02:50 -0300

>> Starting with 26.1, we have configured the Emacs package on FreeBSD to use GNU Mailutils.  However, now that $PREFIX/libexec/emacs/26.1/amd64-portbld-freebsd11.1/movemail is not installed, we have received
>> reports that Gnus, for example, gives an error about not finding movemail.  There are a few different workarounds like patching, creating a link, or asking users to set `mail-source-movemail-program'.  Am I
>> missing a configuration option, so that we don't require any of these workarounds?

> Is movemail from Mailutils on PATH?  if so, how come Gnus doesn't find
> it, it should find it when it invokes it through call-process.

> Can you spot why this doesn't work?

Hello Eli,

Yes, movemail is in PATH.  I think the problem is explained in Robert's
first post of bug 31737 that Paul linked to.  That is, movemail is first
searched for in `mail-source-movemail-program', which is nil by default,
then under `exec-directory', where movemail is no longer installed.

Joseph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 19:03   ` Joseph Mingrone
@ 2018-06-09 19:24     ` Eli Zaretskii
  2018-06-09 19:39       ` Joseph Mingrone
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-06-09 19:24 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 09 Jun 2018 16:03:06 -0300
> 
> Yes, movemail is in PATH.  I think the problem is explained in Robert's
> first post of bug 31737 that Paul linked to.  That is, movemail is first
> searched for in `mail-source-movemail-program', which is nil by default,
> then under `exec-directory', where movemail is no longer installed.

Ah, ok.  So you are saying that instead of

  (expand-file-name "movemail" exec-directory)

gnus/mail-source.el should use just "movemail", is that right?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 19:24     ` Eli Zaretskii
@ 2018-06-09 19:39       ` Joseph Mingrone
  2018-06-10  2:31         ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Joseph Mingrone @ 2018-06-09 19:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 09 Jun 2018 16:03:06 -0300

>> Yes, movemail is in PATH.  I think the problem is explained in Robert's
>> first post of bug 31737 that Paul linked to.  That is, movemail is first
>> searched for in `mail-source-movemail-program', which is nil by default,
>> then under `exec-directory', where movemail is no longer installed.

> Ah, ok.  So you are saying that instead of

>   (expand-file-name "movemail" exec-directory)

> gnus/mail-source.el should use just "movemail", is that right?

Robert's suggestion [1] sounds reasonable.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31737#15

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-09 19:39       ` Joseph Mingrone
@ 2018-06-10  2:31         ` Eli Zaretskii
  2018-06-10  2:45           ` Joseph Mingrone
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-06-10  2:31 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 09 Jun 2018 16:39:55 -0300
> 
> > Ah, ok.  So you are saying that instead of
> 
> >   (expand-file-name "movemail" exec-directory)
> 
> > gnus/mail-source.el should use just "movemail", is that right?
> 
> Robert's suggestion [1] sounds reasonable.
> 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31737#15

And mine doesn't?  If so, could you say why?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-10  2:31         ` Eli Zaretskii
@ 2018-06-10  2:45           ` Joseph Mingrone
  2018-06-10 14:59             ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Joseph Mingrone @ 2018-06-10  2:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 09 Jun 2018 16:39:55 -0300

>> > Ah, ok.  So you are saying that instead of

>> >   (expand-file-name "movemail" exec-directory)

>> > gnus/mail-source.el should use just "movemail", is that right?

>> Robert's suggestion [1] sounds reasonable.

>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31737#15

> And mine doesn't?  If so, could you say why?

Let's make sure we are on the same page.

This is what Robert suggested.

"Perhaps gnus should check in 'exec-directory' first if
mail-source-movemail-program is nil, and then fall back to
'executable-find'? Or perhaps we should just forget about 'our' movemail
and require people to install Mailutils.

I think you are suggesting that Gnus simply specify the executable name,
movemail, and PATH will take care of finding it.  Is that correct?
Assuming that works, that also seems reasonable.  The only possible
drawback could be for users who specify a value for
`mail-source-movemail-program'.  Won't that value be ignored?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-10  2:45           ` Joseph Mingrone
@ 2018-06-10 14:59             ` Eli Zaretskii
  2018-06-10 15:20               ` Joseph Mingrone
  2018-06-14 22:34               ` Paul Eggert
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2018-06-10 14:59 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 09 Jun 2018 23:45:33 -0300
> 
> >> Robert's suggestion [1] sounds reasonable.
> 
> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31737#15
> 
> > And mine doesn't?  If so, could you say why?
> 
> Let's make sure we are on the same page.
> 
> This is what Robert suggested.
> 
> "Perhaps gnus should check in 'exec-directory' first if
> mail-source-movemail-program is nil, and then fall back to
> 'executable-find'? Or perhaps we should just forget about 'our' movemail
> and require people to install Mailutils.
> 
> I think you are suggesting that Gnus simply specify the executable name,
> movemail, and PATH will take care of finding it.  Is that correct?
> Assuming that works, that also seems reasonable.  The only possible
> drawback could be for users who specify a value for
> `mail-source-movemail-program'.  Won't that value be ignored?

Sorry, I should have been more explicit.  My suggestion is to replace
this:

		      (apply
		       'call-process
		       (append
			(list
			 (or mail-source-movemail-program
			     (expand-file-name "movemail" exec-directory))
			 nil errors nil from to)))))

with this:

		      (apply
		       'call-process
		       (append
			(list
			 (or mail-source-movemail-program "movemail")
			 nil errors nil from to)))))

Since call-process calls the moral equivalent of executable-find
internally, calling executable-find during initialization is
redundant: call-process will find movemail on exec-path; moreover,
Robert's suggestion will not work if movemail was installed or moved
after mail-source.el was loaded.

Did I succeed to explain myself this time?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-10 14:59             ` Eli Zaretskii
@ 2018-06-10 15:20               ` Joseph Mingrone
  2018-06-11  8:31                 ` Robert Pluim
  2018-06-14 22:34               ` Paul Eggert
  1 sibling, 1 reply; 12+ messages in thread
From: Joseph Mingrone @ 2018-06-10 15:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 09 Jun 2018 23:45:33 -0300

>> >> Robert's suggestion [1] sounds reasonable.

>> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31737#15

>> > And mine doesn't?  If so, could you say why?

>> Let's make sure we are on the same page.

>> This is what Robert suggested.

>> "Perhaps gnus should check in 'exec-directory' first if
>> mail-source-movemail-program is nil, and then fall back to
>> 'executable-find'? Or perhaps we should just forget about 'our' movemail
>> and require people to install Mailutils.

>> I think you are suggesting that Gnus simply specify the executable name,
>> movemail, and PATH will take care of finding it.  Is that correct?
>> Assuming that works, that also seems reasonable.  The only possible
>> drawback could be for users who specify a value for
>> `mail-source-movemail-program'.  Won't that value be ignored?

> Sorry, I should have been more explicit.  My suggestion is to replace
> this:

> 		      (apply
> 		       'call-process
> 		       (append
> 			(list
> 			 (or mail-source-movemail-program
> 			     (expand-file-name "movemail" exec-directory))
> 			 nil errors nil from to)))))

> with this:

> 		      (apply
> 		       'call-process
> 		       (append
> 			(list
> 			 (or mail-source-movemail-program "movemail")
> 			 nil errors nil from to)))))

> Since call-process calls the moral equivalent of executable-find
> internally, calling executable-find during initialization is
> redundant: call-process will find movemail on exec-path; moreover,
> Robert's suggestion will not work if movemail was installed or moved
> after mail-source.el was loaded.

> Did I succeed to explain myself this time?

Yes, this is clear and seems reasonable.

The way things work now, if a user configures using --with-mailutils=no,
then he will be guaranteed by default [1] to be using Emacs' own
movemail installed under exec-directory.  This will change with your
suggestion.  I think that's reasonable, but we were just pointing out
that the default behaviour will change.

[1] Since mail-source-movemail-program default to nil

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-10 15:20               ` Joseph Mingrone
@ 2018-06-11  8:31                 ` Robert Pluim
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Pluim @ 2018-06-11  8:31 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: Eli Zaretskii, emacs-devel

Joseph Mingrone <jrm@ftfl.ca> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>> Sorry, I should have been more explicit.  My suggestion is to replace
>> this:
>
>> 		      (apply
>> 		       'call-process
>> 		       (append
>> 			(list
>> 			 (or mail-source-movemail-program
>> 			     (expand-file-name "movemail" exec-directory))
>> 			 nil errors nil from to)))))
>
>> with this:
>
>> 		      (apply
>> 		       'call-process
>> 		       (append
>> 			(list
>> 			 (or mail-source-movemail-program "movemail")
>> 			 nil errors nil from to)))))
>
>> Since call-process calls the moral equivalent of executable-find
>> internally, calling executable-find during initialization is
>> redundant: call-process will find movemail on exec-path; moreover,
>> Robert's suggestion will not work if movemail was installed or moved
>> after mail-source.el was loaded.
>
>> Did I succeed to explain myself this time?
>
> Yes, this is clear and seems reasonable.
>
> The way things work now, if a user configures using --with-mailutils=no,
> then he will be guaranteed by default [1] to be using Emacs' own
> movemail installed under exec-directory.  This will change with your
> suggestion.  I think that's reasonable, but we were just pointing out
> that the default behaviour will change.

Ah, I just made the same comment in the bug.

*I* donʼt mind the default behaviour changing, but some people
might. Another option is just to remove movemail from emacs
completely, since installing Mailutils is easy enough *duck*

Robert



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: movemail location
  2018-06-10 14:59             ` Eli Zaretskii
  2018-06-10 15:20               ` Joseph Mingrone
@ 2018-06-14 22:34               ` Paul Eggert
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Eggert @ 2018-06-14 22:34 UTC (permalink / raw)
  To: Eli Zaretskii, Joseph Mingrone; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

On 06/10/2018 07:59 AM, Eli Zaretskii wrote:
> Did I succeed to explain myself this time?


Yes, and the suggestion seems good to me. OK to install the attached 
patch into the emacs-26 branch? The idea is to merge it into master 
after that.


[-- Attachment #2: 0001-Improve-movemail-default.patch --]
[-- Type: text/x-patch, Size: 1085 bytes --]

From 2ddd7e5b56ee229ffeb820bddd76918e8bdf5720 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 14 Jun 2018 15:32:49 -0700
Subject: [PATCH] Improve movemail default

Problem reported for FreeBSD by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-06/msg00262.html
Also see Bug#31737.
* lisp/gnus/mail-source.el (mail-source-movemail):
Take default movemail from $PATH, instead of insisting that
the default be in exec-directory.
---
 lisp/gnus/mail-source.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index d2850f4cee..54130132af 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -686,8 +686,7 @@ mail-source-movemail
 		       'call-process
 		       (append
 			(list
-			 (or mail-source-movemail-program
-			     (expand-file-name "movemail" exec-directory))
+			 (or mail-source-movemail-program "movemail")
 			 nil errors nil from to)))))
 	      (when (file-exists-p to)
 		(set-file-modes to mail-source-default-file-modes))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-14 22:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-09 17:02 movemail location Joseph Mingrone
2018-06-09 17:23 ` Paul Eggert
2018-06-09 17:30 ` Eli Zaretskii
2018-06-09 19:03   ` Joseph Mingrone
2018-06-09 19:24     ` Eli Zaretskii
2018-06-09 19:39       ` Joseph Mingrone
2018-06-10  2:31         ` Eli Zaretskii
2018-06-10  2:45           ` Joseph Mingrone
2018-06-10 14:59             ` Eli Zaretskii
2018-06-10 15:20               ` Joseph Mingrone
2018-06-11  8:31                 ` Robert Pluim
2018-06-14 22:34               ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).