From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jskud@Jskud.com Newsgroups: gmane.emacs.bugs Subject: paths.el not reloaded; impacts integrity of any distribution Date: Wed, 24 Jan 2007 20:02:11 -0800 Message-ID: <200701250402.l0P42BsA005400@echo.jskud.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1169702779 25966 80.91.229.12 (25 Jan 2007 05:26:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Jan 2007 05:26:19 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 25 06:26:05 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H9x7d-0001hF-0k for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jan 2007 06:26:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9x7b-0004HS-Iu for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jan 2007 00:26:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9voj-0006Z9-IH for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2007 23:02:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9voh-0006Yv-QP for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2007 23:02:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9voh-0006Ys-Lt for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2007 23:02:27 -0500 Original-Received: from jskud.com ([63.105.29.2] helo=echo.jskud.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9vof-0004Fv-Iv for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2007 23:02:26 -0500 Original-Received: from echo.jskud.com (localhost.localdomain [127.0.0.1]) by echo.jskud.com (8.12.8/8.12.8) with ESMTP id l0P42CxR005404 for ; Wed, 24 Jan 2007 20:02:12 -0800 Original-Received: (from Jskud@localhost) by echo.jskud.com (8.12.8/8.12.8/Submit) id l0P42BsA005400; Wed, 24 Jan 2007 20:02:11 -0800 X-detected-kernel: Linux 2.4-2.6 X-Mailman-Approved-At: Thu, 25 Jan 2007 00:25:52 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15548 Archived-At: This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit) of 2006-04-07 on turbosphere.fedoralegacy.org configured using `configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc --with-pop --with-sound' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I installed Emacs and when invoked, Emacs had the wrong value for the sendmail-program on my machine. It should have had /usr/sbin/sendmail. It had fakemail. As a result, the outgoing mail headers were corrupted. A more detailed description of the original problem, and a limited workaround, are included below; but it does not really identify or address the underlying problem. I determined that paths.el is not reloaded on Emacs invocation. I conclude that the root cause of a stale path variable is that paths.el, initially loaded by loadup.el, is not reloaded for the current machine environment -- the values set by paths.el are saved when emacs is dumped, and reloaded when emacs is invoked. Therefore, if the current machine environment does not match the build environment, values that were determined and dumped might be wrong when reloaded and run. A possible work-around/solution is to re-load paths.el in site-start.el, so that the paths are fresh and correct for the current environment. The following (as yet unposted) submission is a description of the path that lead me here. Note that the suggested work around is very (too) focused -- reloading paths.el seems like a better choice. > From Jskud Wed Jan 24 08:56:28 -0800 2007 > From: Jskud@Jskud.com > To: fedora-legacy-list@redhat.com > Subject: emacs RH9&FC1 upgrade: botched mail headers, missing subject lines > > I updated my RH9 Emacs installation with > > 0:emacs-21.2-34.legacy.i386=emacs-21.2-34.legacy.i386.rpm > 0:emacs-leim-21.2-34.legacy.i386=emacs-leim-21.2-34.legacy.i386.rpm > 0:emacs-el-21.2-34.legacy.i386=emacs-el-21.2-34.legacy.i386.rpm > > I use Emacs mail, and found my outgoing mail headers often were botched. > In particular, the result was a missing subject line. > > I then upgraded to the latest FC1 Emacs versions > > 0:emacs-21.3-9.2.legacy.i386=emacs-21.3-9.2.legacy.i386.rpm > 0:emacs-leim-21.3-9.2.legacy.i386=emacs-leim-21.3-9.2.legacy.i386.rpm > 0:emacs-el-21.3-9.2.legacy.i386=emacs-el-21.3-9.2.legacy.i386.rpm > > and had the same problem. > > Instead of this > > From Jskud Tue Jan 23 22:44:44 -0800 2007 > From: <> > To: <
> > Subject: <> > > I would get something like this > > From Jskud Tue Jan 23 22:44:44 2007 > To: <
> > > From: <> > To: <
> > Subject: <> > > I tracked it down, and found that the sendmail-program variable is > erroneously set to fakemail. > > I suspect that when emacs was built, it calculated and stored the value > of sendmail-program as determined by the build environment. And that > did not include /usr/sbin/sendmail. > > A workaround is to add the following lines to your .emacs file. > > ;; HACK to fix FC1 21.3 distribution, > ;; which leaves sendmail-program set to broken fakemail > ;; -- this code snippet stolen from paths.el > (defconst sendmail-program > (cond > ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") > ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") > ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") > (t "fakemail")) ;In ../etc, to interface to /bin/mail. > "Program used to send messages.") > > FYI. /Jskud Recent input: [[not-relevant]] Recent messages: [[not-relevant]] Thanks for a great tool. Hope this helps make it better. /Jskud