From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59795: 30.0.50; locate-user-emacs-file refer to relative path with --init-directory is passed as relative path Date: Sat, 03 Dec 2022 12:25:11 +0200 Message-ID: <83bkokeqd4.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6444"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59795-done@debbugs.gnu.org To: Tommaso Rossi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 03 11:26:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p1Piw-0001Tv-2Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Dec 2022 11:26:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1Pid-00018N-T4; Sat, 03 Dec 2022 05:26:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1Pic-000181-MC for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 05:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1Pic-0004Vi-E2 for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 05:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1Pic-0007f3-Aa for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 05:26:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Dec 2022 10:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59795 X-GNU-PR-Package: emacs Mail-Followup-To: 59795@debbugs.gnu.org, eliz@gnu.org, tommaso.rossi1@protonmail.com Original-Received: via spool by 59795-done@debbugs.gnu.org id=D59795.167006314529440 (code D ref 59795); Sat, 03 Dec 2022 10:26:02 +0000 Original-Received: (at 59795-done) by debbugs.gnu.org; 3 Dec 2022 10:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:51528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1PiK-0007em-LO for submit@debbugs.gnu.org; Sat, 03 Dec 2022 05:25:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1PiH-0007ed-FG for 59795-done@debbugs.gnu.org; Sat, 03 Dec 2022 05:25:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1PiB-0004O4-KI; Sat, 03 Dec 2022 05:25:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8mL3VylKodt36fMf2tIBWZtlw8Y3NyR+BybDVdtNJDY=; b=acQU4nUg4PmP 1zD5rvZuc6CJTwAXgqlWf2qUC8pJ3PjmCwq+S0IBYqK3Y/NIqeVYGtuoqCxm6HMurA7YfvRvM5gQk yCMcZ3x6h4SUp63r9MND5aTq/HrDxxw4nKWrZF4Bju+qd+98VxARkt1U3z81uzhqFPSLca/SdZ+ZL 9qxn3Al3rtOAXiu4nbO8eC8NPEI7Offvu6UdSI3UY/NdoBtU41L8rDsBtRsUZgt18hR41GBun/5gD xfqEEyZjwrnFPON1QtSegVVcxjXpFcwUA1MZlfzumLbVBmvN8dLriib8Ql3ZrZOP8F58i7I1FvBFV EfAU0nMU5JX3pSDOhZ1oWg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1PiA-0000Yt-5I; Sat, 03 Dec 2022 05:25:35 -0500 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249821 Archived-At: > Date: Fri, 02 Dec 2022 12:47:43 +0000 > From: Tommaso Rossi via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > When launching emacs with --init-directory option set to a relative path, I noticed that locate-user-emacs-file > refers to a relative path. > This means that every library that uses that function spawns files in visited directories instead that in the > init-directory. > > 1) Open shell in home (~) > 2) emacs -Q --init-directory .my-emacs.d > 3) C-x C-f ~/other-directory RET > 4) M-: (locate-user-emacs-file "some-file") RET > > result: ~/other-directory/.my-emacs.d/some-file > expected: ~/.my-emacs.d/some-file > > It happens both starting with -Q or not. > The problem does not happen when an absolute path is passed as --init-directory option argument. > > Perhaps the user-emacs-directory should be parsed as absolute path at startup? I made --init-directory=DIR be interpreted relative to the directory where Emacs is started. Thanks.