bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument


From: Juri Linkov
Subject: bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument
Date: Mon, 15 Jun 2020 01:46:53 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Right now 'project-shell' opens a new buffer every time it is invoked.
> Now I have to find it in the buffer list.  Putting previous behaviour
> on universal argument will in addition enable this workflow
>
> - Edit some file in some project.
> - 'M-x project-shell'
> - 'C-u M-x project-shell'
> - Now emacs is split it two, with two separate shell processes
>
> In addition, I let default name be *'project-root-dir'-shell* to
> signify this shell buffer to be unique from other shell buffers
> invoked by 'M-x shell'.

Thanks, it's a nice idea to prepend the project root dir name
to the shell buffer name.

Formerly, I tried to do something like this using 'uniquify',
but after creating more shell buffers in the same project,
it begins to generate inappropriately long names.

So eventually I arrived to the following line for the init file:

  (add-hook 'shell-mode-hook 'rename-uniquely)

that just appends a number to the buffer name,
so your patch won't affect my usage at all,
I'll continue getting new shell buffers every time
after 'M-x project-shell'.

Regarding the C-u argument, I don't know maybe someone might want
to use it.  But shouldn't the C-u argument of 'project-shell' be
more compatible with the C-u argument of 'shell' in its behaviour?

Another possible point for better consistency between them
is to use 'pop-to-buffer' (like in 'shell') instead of
'switch-to-buffer-other-window'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]