From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33055: 27.0.50; load-prefer-newer loads wrong file Date: Wed, 17 Oct 2018 01:44:52 +0300 Organization: LINKOV.NET Message-ID: <87r2gpmryz.fsf@mail.linkov.net> References: <87k1mibzlo.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1539729909 16852 195.159.176.226 (16 Oct 2018 22:45:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2018 22:45:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33055@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 17 00:45:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCY5I-0004DU-QZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Oct 2018 00:45:05 +0200 Original-Received: from localhost ([::1]:60483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCY7P-000225-38 for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Oct 2018 18:47:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCY7I-00021n-PN for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:47:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCY7D-0006dM-Lk for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:47:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCY7D-0006d6-Hh for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCY7D-0006an-7K for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Oct 2018 22:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33055 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33055-submit@debbugs.gnu.org id=B33055.153972999125286 (code B ref 33055); Tue, 16 Oct 2018 22:47:02 +0000 Original-Received: (at 33055) by debbugs.gnu.org; 16 Oct 2018 22:46:31 +0000 Original-Received: from localhost ([127.0.0.1]:54094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCY6g-0006Zm-S7 for submit@debbugs.gnu.org; Tue, 16 Oct 2018 18:46:31 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:40706 helo=pdx1-sub0-mail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCY6e-0006Zb-GT for 33055@debbugs.gnu.org; Tue, 16 Oct 2018 18:46:30 -0400 Original-Received: from pdx1-sub0-mail-a7.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTP id D29417F689; Tue, 16 Oct 2018 15:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=OwaqmbRKCPyIMptlALAxHNRsVRU=; b= zSqk0TZEEAjGbk4KFDccnRtE0d1qHgW7a3gG9muxrI0ihjnvDOJllo+7Bf2/ZbSW Ej9qFaFvJHbtY6S2QzgT8kXidJYPoL1FB+NFTe+JI5E9DrsAZ100B8wBICiETWfK lJE6rE2/nlK0I996JvSlys7e+TRmqHSGxrQkLWoyaog= Original-Received: from localhost.linkov.net (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTPSA id 8843D7F668; Tue, 16 Oct 2018 15:46:26 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a7 In-Reply-To: (Glenn Morris's message of "Mon, 15 Oct 2018 19:37:47 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfedugddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdrlhhinhhkohhvrdhnvghtpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehrghhmsehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151328 Archived-At: > Perhaps it would be cleaner for the load statement to use the precise > filename that it wants to load (ie, explicitly add the .el suffix)? In a new patch I used the same variable names as in the function smtpmail-send-it that creates these files. But now I realized this fix might be needed for emacs-26. Maybe, Eli knows for sure? diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 8bc3cc78d9..8607f9fa9c 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -404,21 +404,22 @@ smtpmail-send-queued-mail (with-temp-buffer ;; Get index, get first mail, send it, update index, get second ;; mail, send it, etc... - (let ((file-msg "") + (let (file-data file-elisp (qfile (expand-file-name smtpmail-queue-index-file smtpmail-queue-dir)) result) (insert-file-contents qfile) (goto-char (point-min)) (while (not (eobp)) - (setq file-msg (buffer-substring (point) (line-end-position))) - (load file-msg) + (setq file-data (buffer-substring (point) (line-end-position))) + (setq file-elisp (concat file-data ".el")) + (load file-elisp) ;; Insert the message literally: it is already encoded as per ;; the MIME headers, and code conversions might guess the ;; encoding wrongly. (with-temp-buffer (let ((coding-system-for-read 'no-conversion)) - (insert-file-contents file-msg)) + (insert-file-contents file-data)) (let ((smtpmail-mail-address (or (and mail-specify-envelope-from (mail-envelope-from)) user-mail-address))) @@ -428,8 +429,8 @@ smtpmail-send-queued-mail (current-buffer))) (error "Sending failed: %s" result)) (error "Sending failed; no recipients")))) - (delete-file file-msg) - (delete-file (concat file-msg ".el")) + (delete-file file-data) + (delete-file file-elisp) (delete-region (point-at-bol) (point-at-bol 2))) (write-region (point-min) (point-max) qfile))))