all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 41858@debbugs.gnu.org
Subject: bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument
Date: Mon, 15 Jun 2020 01:46:53 +0300	[thread overview]
Message-ID: <874krdclk2.fsf@mail.linkov.net> (raw)
In-Reply-To: <87tuzd33i3.fsf@thornhill.no> (Theodor Thornhill's message of "Sun, 14 Jun 2020 18:29:28 +0000")

> 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'.





  parent reply	other threads:[~2020-06-14 22:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 18:29 bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument Theodor Thornhill
2020-06-14 18:46 ` Dmitry Gutov
2020-06-14 18:51 ` bug#41858: Add the patch as a .patch Theodor Thornhill
2020-06-14 22:46 ` Juri Linkov [this message]
2020-06-15  6:50   ` bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument Theodor Thornhill
2020-06-15 23:01     ` Juri Linkov
2020-06-18  9:57       ` Theodor Thornhill
2020-06-18 13:28         ` Eli Zaretskii
2020-06-18 18:00           ` Theodor Thornhill
2020-06-20  1:03             ` Dmitry Gutov
2020-06-15 13:05   ` Dmitry Gutov
2020-06-15 14:53     ` Theodor Thornhill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874krdclk2.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=41858@debbugs.gnu.org \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.