From unknown Mon Jun 16 23:48:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49009 <49009@debbugs.gnu.org> To: bug#49009 <49009@debbugs.gnu.org> Subject: Status: 27.1.90; files loaded with -l flag does not use file-truename as required by eval-after-load Reply-To: bug#49009 <49009@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:48:52 +0000 retitle 49009 27.1.90; files loaded with -l flag does not use file-truename= as required by eval-after-load reassign 49009 emacs submitter 49009 ctarbide@tuta.io severity 49009 normal tag 49009 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 13 18:28:17 2021 Received: (at submit) by debbugs.gnu.org; 13 Jun 2021 22:28:17 +0000 Received: from localhost ([127.0.0.1]:44527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsYaW-0004mf-Qv for submit@debbugs.gnu.org; Sun, 13 Jun 2021 18:28:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:57904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsY60-00042j-HL for submit@debbugs.gnu.org; Sun, 13 Jun 2021 17:56:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsY60-0007oh-5e for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 17:56:44 -0400 Received: from w1.tutanota.de ([81.3.6.162]:43424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsY5u-0002Tm-Cy for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 17:56:43 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id CA279FA0564 for ; Sun, 13 Jun 2021 21:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1623621395; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=0EI6g7q/5L+DBofv+VnBlxnkItZ+53RNKLq37fJn/I4=; b=Df4YnswcM8auTQZSOislkwev6Yz6WjQ0H2DxTZy6HS2PmPsQvyQa3riVoDodZAQu k8sGmq0aYtUnS9Uwsuhc4VOZ23tGDH1ndJubNJBUH9ij/3oFCvatUFtwD0UxpZhsXYB 3BIXAZOuEormCXNezNTNn0HzE/Z/g0cMN3Px3rZruprIpVqxZOTCy/FQCZzQWoyxuyK y6sg4JmE3VX79Rrt2rEs5ZeCA4ORR16iIIhWON/GILGsdYJdDJcYo7KnQKjqp2QU2wC 1LFfO4TrhTEoi6knPTTsV53pWUNRLdM5t4WazfYimvg9zwNhHXikYEyW3TChsco+Ebe xn+Fljp0CQ== Date: Sun, 13 Jun 2021 23:56:35 +0200 (CEST) From: ctarbide@tuta.io To: bug-gnu-emacs@gnu.org Message-ID: Subject: 27.1.90; files loaded with -l flag does not use file-truename as required by eval-after-load MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_284583_1116363381.1623621395814" Received-SPF: pass client-ip=81.3.6.162; envelope-from=ctarbide@tuta.io; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 13 Jun 2021 18:28:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) ------=_Part_284583_1116363381.1623621395814 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Consider: emacs -nw -Q -batch -L "`pwd`" -l test.el if the test.el file above is in a non-true path, e.g. a parent dir is a symlink, and test.el has an eval-after-load for itself, the eval-after-load form will not be evaluated, the reason is that startup.el does not usefile-= truename while loading file, the change below solved the issue: -=C2=A0 (file-ex (expand-file-name file))) +=C2=A0 (file-ex (file-truename (expand-file-name file)))) http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el#n2503 ------=_Part_284583_1116363381.1623621395814 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Consider:

emacs -nw -Q -batch -L "`pwd`" -l test.el

if the test.el file above is in a non-true path, e.g. a parent dir is a
symlink, and test.el has an eval-after-load for itself, the eval-after-load
form will not be evaluated, the reason is that startup.el does not use
file-truename while loading file, the change below solved the issue:

-  (file-ex (expand-file-name file)))
+  (file-ex (file-truename (expand-file-name file))))


------=_Part_284583_1116363381.1623621395814-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 09:38:23 2021 Received: (at 49009) by debbugs.gnu.org; 14 Jun 2021 13:38:23 +0000 Received: from localhost ([127.0.0.1]:45372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmnG-0006R3-U2 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 09:38:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmnE-0006Qo-Mz for 49009@debbugs.gnu.org; Mon, 14 Jun 2021 09:38:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JPpWIVeNpZb5fS7XkpRNip9L17UoSbEGnuftq8Vm2uY=; b=NTzf869Y4MULRato9OAQyPK4Qf StlXaA+QrkWiTd7bM1MKG/j7yJEg4o9mfkTEO3koZ4ML6VLd8MOD0IZkj6soZeM7tYDXoDKKAj6bP snfFF95tIxELU3D/bQ5Db1HCX8K+DTqcB+nY2W8+5W9r2D99lz2f/PM7zEiBW5ujFzoc=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsmn6-0001H6-GH; Mon, 14 Jun 2021 15:38:15 +0200 From: Lars Ingebrigtsen To: ctarbide@tuta.io Subject: Re: bug#49009: 27.1.90; files loaded with -l flag does not use file-truename as required by eval-after-load References: X-Now-Playing: 75 Dollar Bill's _I Was Real_: "Every Last Coffee or Tea" Date: Mon, 14 Jun 2021 15:38:12 +0200 In-Reply-To: (ctarbide@tuta.io's message of "Sun, 13 Jun 2021 23:56:35 +0200 (CEST)") Message-ID: <87im2gzhvf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: ctarbide@tuta.io writes: > if the test.el file above is in a non-true path, e.g. a parent dir is a > symlink, and test.el has an eval-after-load for itself, the eval-after-load > form will not be evaluated, the reason is that [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49009 Cc: 49009@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) ctarbide@tuta.io writes: > if the test.el file above is in a non-true path, e.g. a parent dir is a > symlink, and test.el has an eval-after-load for itself, the eval-after-load > form will not be evaluated, the reason is that startup.el does not use > file-truename while loading file, the change below solved the issue: > > - (file-ex (expand-file-name file))) > + (file-ex (file-truename (expand-file-name file)))) There's two of these, so here's the proposed patch, I think. This seems reasonable to me -- anybody else have any comments? I was wondering whether there may be edge cases where this may lead to unintended consequences... diff --git a/lisp/startup.el b/lisp/startup.el index ac319612e8..456c01efd1 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -2500,7 +2500,7 @@ command-line-1 (or argval (pop command-line-args-left)))) ;; Take file from default dir if it exists there; ;; otherwise let `load' search for it. - (file-ex (expand-file-name file))) + (file-ex (file-truename (expand-file-name file)))) (when (file-regular-p file-ex) (setq file file-ex)) (load file nil t))) @@ -2511,7 +2511,7 @@ command-line-1 (let* ((file (command-line-normalize-file-name (or argval (pop command-line-args-left)))) ;; Take file from default dir. - (file-ex (expand-file-name file))) + (file-ex (file-truename (expand-file-name file)))) (load file-ex nil t t))) ((equal argi "-insert") -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 09:39:00 2021 Received: (at control) by debbugs.gnu.org; 14 Jun 2021 13:39:00 +0000 Received: from localhost ([127.0.0.1]:45375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmns-0006Rz-8M for submit@debbugs.gnu.org; Mon, 14 Jun 2021 09:39:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmnq-0006Rk-H1 for control@debbugs.gnu.org; Mon, 14 Jun 2021 09:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nCIRgSV7/vnHDmvY+zCcT2dY95kx1k+GgX4j3YEpX9s=; b=U5colZTGAK2XwUZ4QAJFcgznnz 6/rYGxU1XKGqjAZTXmP9KLdP/+Ak0v17QwD54zzs5lTMPw8XtWDIfTuEWEZweAGczWDHGO98oAjlx IpECAIZ3owoqIeTab9DBGJZqTF25Qc21cLwF7lz9F+KZybZSRVXwOMMJ4TAcAlXnPdE4=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsmni-0001HJ-Pz for control@debbugs.gnu.org; Mon, 14 Jun 2021 15:38:52 +0200 Date: Mon, 14 Jun 2021 15:38:50 +0200 Message-Id: <87h7i0zhud.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49009 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 49009 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 49009 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 09:59:19 2021 Received: (at 49009) by debbugs.gnu.org; 19 Jun 2021 13:59:19 +0000 Received: from localhost ([127.0.0.1]:60209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lubVH-0001hl-HN for submit@debbugs.gnu.org; Sat, 19 Jun 2021 09:59:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lubVG-0001hY-Eq for 49009@debbugs.gnu.org; Sat, 19 Jun 2021 09:59:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7cvsFUTXb/pOiZueW5ntpW39Svm4OGyCzCEYSHwnp4c=; b=bKNZQg4bidp1yf6q+Z3363vvHR Xcu0GZpfiwONCUXFFeXa+HfbdDUOOq3WQl7xxVYx59RbUxIEWS1GBgVHVTgr6rMtQXjGVJLv4i9MO FPNWlv6jajwicyQkyBHdaPWXF8ZjQwrSfaLZFvmrUONWTqmpI3bP0ElvFH9z2SEHJ/Us=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lubV7-0003fO-RB; Sat, 19 Jun 2021 15:59:12 +0200 From: Lars Ingebrigtsen To: ctarbide@tuta.io Subject: Re: bug#49009: 27.1.90; files loaded with -l flag does not use file-truename as required by eval-after-load References: <87im2gzhvf.fsf@gnus.org> X-Now-Playing: Little Simz's _Grey Area_: "Boss" Date: Sat, 19 Jun 2021 15:59:09 +0200 In-Reply-To: <87im2gzhvf.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 14 Jun 2021 15:38:12 +0200") Message-ID: <87a6nmvtua.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > This seems reasonable to me -- anybody else have any comments? I was > wondering whether there may be edge cases where this may lead to > unintended consequences... Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49009 Cc: 49009@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > This seems reasonable to me -- anybody else have any comments? I was > wondering whether there may be edge cases where this may lead to > unintended consequences... There were no comments in five days, so I've pushed the patch to Emacs 28. I couldn't see any adverse effects, but if this breaks something for somebody, it should be reverted. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 09:59:25 2021 Received: (at control) by debbugs.gnu.org; 19 Jun 2021 13:59:25 +0000 Received: from localhost ([127.0.0.1]:60212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lubVM-0001i3-O6 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 09:59:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lubVK-0001hd-Vo for control@debbugs.gnu.org; Sat, 19 Jun 2021 09:59:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vh6Yin14HGQ/jfqW43XWQFkGoAtwmAOuJpi+yN8j+9k=; b=PkJlSl3m1K0C2U54QvP6XW60s2 I8m85LJdIcT9FVXiOKazgoAGPG6RYaGTYu85GV9TTP7oQTchBJxVOoTf2Le4RIFOtq1MAerNRAZcP 44yR9wp97zrc2HVgbcyn05GC02ZF9+grHG0pE+K7lyg4WUHqq2Ew3xwPofbB8XTRXLWQ=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lubVD-0003fY-FZ for control@debbugs.gnu.org; Sat, 19 Jun 2021 15:59:17 +0200 Date: Sat, 19 Jun 2021 15:59:15 +0200 Message-Id: <878s36vtu4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49009 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49009 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 49009 28.1 quit From unknown Mon Jun 16 23:48:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 18 Jul 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator