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#62974: 29.0.60; New buffers created with project-switch-to-buffer aren't in the project Date: Fri, 21 Apr 2023 08:43:33 +0300 Message-ID: <83pm7x4woq.fsf@gnu.org> References: <83ttxa4c3m.fsf@gnu.org> <1e68f5ff-63aa-4dc4-9a92-02f3e6d4641a@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24427"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 62974@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 21 07:44:24 2023 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 1ppjZI-0006BY-38 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Apr 2023 07:44:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppjYy-0000CM-AS; Fri, 21 Apr 2023 01:44:04 -0400 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 1ppjYw-0000CD-E5 for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 01:44:02 -0400 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 1ppjYw-00055X-62 for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 01:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppjYv-0004CX-Q1 for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 01:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Apr 2023 05:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62974 X-GNU-PR-Package: emacs Original-Received: via spool by 62974-submit@debbugs.gnu.org id=B62974.168205580816092 (code B ref 62974); Fri, 21 Apr 2023 05:44:01 +0000 Original-Received: (at 62974) by debbugs.gnu.org; 21 Apr 2023 05:43:28 +0000 Original-Received: from localhost ([127.0.0.1]:39093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppjYO-0004BS-Ao for submit@debbugs.gnu.org; Fri, 21 Apr 2023 01:43:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppjYL-0004BF-Mz for 62974@debbugs.gnu.org; Fri, 21 Apr 2023 01:43:26 -0400 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 1ppjYG-00053B-2a; Fri, 21 Apr 2023 01:43:20 -0400 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=E1XyOTtEbcOOZed+8HXXtCtojIJK27IyQsVqTDaqGOg=; b=ByqBUh4Np22W edItFlfmFbE0mwKainAvyTT5jz4HPdxKzIPcYBAJMDC09yFyErBiv0H/B7nlHdDjlXZoU797nzTk/ AdbkwhGdE8DScTspEOR7/sHdP03dBJw42or6kU1jTCW/weVPOZbBfS9+OKmPpoRnFp6UDBt266Sgk 5KMHGjiZ/X1QsGATKy/nyipPpU3TOteNmbr7+2sKY5G9652AhzOO/j1PoLMgRfX+RUQPQdnboa3xh LejVR5yPSHDDKlPFPwQzjtFeeiQ0YEgl+pfmVb3cwhtFkl03q1GQxPtHn1w123MJUkuJ8gBCCn/zk 6lGhKegvg7MuWMGOhpun/w==; 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 1ppjYE-0006IC-0r; Fri, 21 Apr 2023 01:43:19 -0400 In-Reply-To: <1e68f5ff-63aa-4dc4-9a92-02f3e6d4641a@gutov.dev> (message from Dmitry Gutov on Fri, 21 Apr 2023 02:55:47 +0300) 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:260367 Archived-At: > Date: Fri, 21 Apr 2023 02:55:47 +0300 > Cc: 62974@debbugs.gnu.org > From: Dmitry Gutov > > On 20/04/2023 21:55, Eli Zaretskii wrote: > >> From: Spencer Baugh > >> Date: Thu, 20 Apr 2023 14:37:26 -0400 > >> > >> > >> 1. emacs -Q (in a directory not in a project) > >> 2. Note current default-directory: some/dir > >> 3. C-x p b (so that it will prompt for a project) > >> 4. Select some project and RET > >> 5. Enter a nonexisting buffer name and RET > >> 6. The new buffer's default-directory is some/dir > >> > >> Expected behavior: > >> 6. The new buffer's default-directory is the project root of the project > >> you picked. > > ??Really? project.el changes the way Emacs creates new buffers? Is > > there a reason for such a deviation (if indeed there is a deviation)? > > Because otherwise my expectation would exactly what you see, because > > "C-x b" behaves like that. > > Perhaps the idea is that the newly created buffer will be considered as > belonging to the project right away? But if it is in a subdirectory of the root, it also belongs to the project, doesn't it? Exactly like the buffer from which this command is invoked, whose default-directory was a subdirectory of the root. No?