From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh 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 07:46:14 -0400 Message-ID: References: <83ttxa4c3m.fsf@gnu.org> <1e68f5ff-63aa-4dc4-9a92-02f3e6d4641a@gutov.dev> <83pm7x4woq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ee2ddb05f9d7341a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15008"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , 62974@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 21 13:47:28 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 1pppEe-0003gT-CE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Apr 2023 13:47:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pppEM-0005H9-QX; Fri, 21 Apr 2023 07:47:10 -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 1pppEF-0005Gq-BX for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 07:47:05 -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 1pppEE-0002hv-8G for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 07:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pppED-0000iz-Tv for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 07:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Apr 2023 11:47: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.16820775932749 (code B ref 62974); Fri, 21 Apr 2023 11:47:01 +0000 Original-Received: (at 62974) by debbugs.gnu.org; 21 Apr 2023 11:46:33 +0000 Original-Received: from localhost ([127.0.0.1]:39500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pppDk-0000iG-DI for submit@debbugs.gnu.org; Fri, 21 Apr 2023 07:46:32 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:35965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pppDi-0000i2-KK for 62974@debbugs.gnu.org; Fri, 21 Apr 2023 07:46:31 -0400 Original-Received: from mail-yb1-f200.google.com ([209.85.219.200]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.96) id 1pppDd-001XWj-0f for 62974@debbugs.gnu.org; Fri, 21 Apr 2023 07:46:25 -0400 Original-Received: by mail-yb1-f200.google.com with SMTP id 3f1490d57ef6-b8f39b41c7aso2606912276.1 for <62974@debbugs.gnu.org>; Fri, 21 Apr 2023 04:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1682077585; x=1684669585; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kEClD26abGnzM8NMSyAKgG7I0aVmoSALbT5nCPy/KRA=; b=oKe72//SvjZn7HcyaeTKxhTBTV4OKs/1uXWJETVm/tYPOJKRXR58Mg73MGMh/acMzP DRVBiCTFIO8ExF4vZdUIh2L7ud5FUfbFi02sC3NvcNtL0rPETt/igI70osa8S0IMY3IY tfpuOD0mFZBuGDybR2EySN4lfPDpy+TLNSHJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682077585; x=1684669585; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kEClD26abGnzM8NMSyAKgG7I0aVmoSALbT5nCPy/KRA=; b=INO05BCnv+3N/Z6WDi1GcDWA4UVUUVsaBpbCRPfJu6WWXeMZnEpzRcbs36IgF+NaOS gtMxFEH70qERB45XMFdV0Po2NWFSuYcXg0ITRCmJVn0tRyjFKH9cnNaaft8RkwRpLn0k IWN+0MIAYLk4nFcdBNATotVSyHTUtRfivLZlkW6n5nKwVq8vAYz4r+h6aPpoA0AKlAMZ Ontdj05QavQ+AD3SUDklhG945YSpd2chz51/nbJMlleDOekzlj/UBv2DlwtE3ZGb8KIl xQLmbw6UZYf9GQKevGxV2KUmfw9+fZS/2jOrmGhT0SGxwNA4fDyCayFcKe67qyVPMW8a q4Ng== X-Gm-Message-State: AAQBX9dQtn/ucPxlkTPC8qj557mqy4H6fPlxbay7M6Ozn0f64zTCUOQj sG5TuygcrF1RyoMHSWAvpIFISA8YrnG/1ow1494QP+cvu2fx7yeSv5gmxA9iJaUqRYmo+znYEtZ 5z6+N+BLJ82clpcI75NrcGaAlkxCJdg== X-Received: by 2002:a25:3144:0:b0:b8f:219f:a02e with SMTP id x65-20020a253144000000b00b8f219fa02emr2287439ybx.54.1682077585081; Fri, 21 Apr 2023 04:46:25 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4B4MurtORUuEBayXe92lt36SwN+N+4eUmg36hS0J5NqPpihgp8dQTyoy5qOX7bPkBozKzOg9GTIj++XQ9owk= X-Received: by 2002:a25:3144:0:b0:b8f:219f:a02e with SMTP id x65-20020a253144000000b00b8f219fa02emr2287429ybx.54.1682077584855; Fri, 21 Apr 2023 04:46:24 -0700 (PDT) In-Reply-To: <83pm7x4woq.fsf@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:260378 Archived-At: --000000000000ee2ddb05f9d7341a Content-Type: text/plain; charset="UTF-8" On Fri, Apr 21, 2023, 01:43 Eli Zaretskii wrote: > > 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? > That's fine, I wouldn't want to change that behavior, the behavior I'd want to change is when invoking the command from a buffer which is not in a project, or by invoking it after C-x p p to switch projects. > --000000000000ee2ddb05f9d7341a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Apr 21, 2023, 01:43 Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Fri, 21 Apr 2023 02:55:47 +0300
> Cc: 62974@debbugs.gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> On 20/04/2023 21:55, Eli Zaretskii wrote:
> >> From: Spencer Baugh<sbaugh@janestreet.com>
> >> 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?=C2=A0 project.el changes the way Emacs creates new buff= ers?=C2=A0 Is
> > there a reason for such a deviation (if indeed there is a deviati= on)?
> > Because otherwise my expectation would exactly what you see, beca= use
> > "C-x b" behaves like that.
>
> Perhaps the idea is that the newly created buffer will be considered a= s
> 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?=C2=A0 Exactly like the buffer from which this comm= and
is invoked, whose default-directory was a subdirectory of the root.
No?

That's fine, I wouldn't want to change that behavior, the behavi= or I'd want to change is when invoking the command from a buffer which = is not in a project, or by invoking it after C-x p p to switch projects.
--000000000000ee2ddb05f9d7341a--