Subject: Re: bug#76595: 29.4; Problem getting RMAIL to detect a change to the value of `rmail-movemail-program'.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 01 Mar 2025 15:47:44 +0200

> Date: Wed, 26 Feb 2025 15:37:59 -0500
> From:  <[email-masked]>
> Cc: [email-masked]
> 
> > Date: Wed, 26 Feb 2025 21:33:04 +0200
> > From: Eli Zaretskii <[email-masked]>
> > 
> > > From: <[email-masked]>
> > > 
> > > Emacs Maintainers,
> > > 
> > >   There is a problem with getting Emacs/Rmail to use the
> > > Mailutils version of ‘movemail’ if the value of
> > > ‘rmail-movemail-program’ is set after Rmail has been
> > > started.
> > 
> > To avoid these complications, either customize rmail-movemail-program
> > in your init file, so it is already set to the value 'mailutils' when
> > you start Rmail, or simply remove the version of 'movemail' that came
> > with Emacs, so that the only 'movemail' Rmail can find is that from
> > Mailutils.
> > 
> 
> Thank you for your response.
> 
> Yes, I understand how to resolve the problem (having spent a
> considerable amount of time tracking it down while assuming
> that I had made numerous mistakes).  The reason I sent in
> the report is that there is an error in Emacs, either in the
> documentation of how to use ‘movemail’ or in the rmail.el
> file, depending on what the maintainers want to change.
> 
> The problem as it is now is that the behavior of Emacs and
> the requirements for using movemail are not sufficiently
> well documented.  Either or both could be fixed.  If the
> code is not going to be changed, then the Emacs manual
> should be updated to document that a change to
> ‘rmail-movemail-program’ may not take effect until Emacs is
> restarted.
> 
> This is necessary so that new users of Rmail do not
> encounter the problem that I described in the problem
> report.  
> 
> A better solution might be to change the manual to say that
> M-x rmail [RET] is required after changing
> ‘rmail-movemail-program’, and to change (defun rmail ...) to
> (re-)initialize ‘rmail-movemail-variant-in-use’ to nil, but
> that is a choice for you maintainers.
> 
> Possibly, the following code could be moved into (defun
> rmail ...), also:
> 
> ;; Call for effect, to set rmail-movemail-program (if not set by the
> ;; user), and rmail-movemail-variant-in-use. Used by various functions.
> ;; I'm not sure if M-x rmail is the only entry point to this package.
> ;; If so, this can be moved there.
> (rmail-movemail-variant-p)

Thanks, I decided to document how to customize this variable safely.

I'm therefore closing this bug.