GNU bug report logs -
#62974
29.0.60; New buffers created with project-switch-to-buffer aren't in the project
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Thu, 20 Apr 2023 18:38:01 UTC
Severity: normal
Found in version 29.0.60
Fixed in version 30.1
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Fri, Apr 21, 2023, 01:43 Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Fri, 21 Apr 2023 02:55:47 +0300
> > Cc: 62974 <at> debbugs.gnu.org
> > From: Dmitry Gutov <dmitry <at> gutov.dev>
> >
> > On 20/04/2023 21:55, Eli Zaretskii wrote:
> > >> From: Spencer Baugh<sbaugh <at> 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? 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.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 2 years and 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.