-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Projectile to spawn extra process buffers (shell/eshell/term/vterm/ielm) with the prefix ARG #1486
Allow Projectile to spawn extra process buffers (shell/eshell/term/vterm/ielm) with the prefix ARG #1486
Conversation
If `projectile-run-vterm` is called with a prefix ARG it will generate a new buffer in the style of `generate-new-buffer-name` (e.g '*vterm my-proj<2>*') and switch to it.
I'm fine with the proposed changed. It needs a changelog entry, through. One small problem is that this introduces a small inconsistency with other similar commands that don't support the prefix arg. Might be a good idea to unify the eshell, term and vterm commands. |
projectile.el
Outdated
@@ -775,6 +775,12 @@ just return nil." | |||
"Get the symbol at point and strip its properties." | |||
(substring-no-properties (or (thing-at-point 'symbol) ""))) | |||
|
|||
(defun projectile-generate-prompt-name (cmd make-new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think cmd
is a bit misleading here - it's actually just a basename. I'd also use process/comint-buffer
instead of prompt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with (defun projectile-generate-process-name (process make-new)
because I tried a bunch of different wordings and couldn't decide. Feel free to push a commit atop or let me know what you think reads best and I can also do the change.
Overall your changes look good to me. I've added a bit of small feedback here and there. Once you address it I'll merge the PR. |
Thanks! P.S. Naming is hard! 😆 |
Hey! Thanks for projectile. As a disclaimer I don't write very much Lisp (yet).
Rationale
I need to fire multiple terminals in the projects I work on. One to run the server and follow the logs, maybe an interactive console and some other bits & bobs sometimes so add a mechanism to override the default behaviour and spawn new vterm buffers as needed.
Summary
Going to copy and paste my commit if that's OK:
Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
make test
)M-x checkdoc
warningsThanks!