Skip to content

Comint adds *'s to name: #191

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

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

dpsutton
Copy link
Contributor

docstring of make-comint:
The name of the buffer is made by surrounding NAME with `*'s.

Otherwise you end up in a fundamental mode buffer unconnected to the
process.

docstring:
The name of the buffer is made by surrounding NAME with `*'s.

Otherwise you end up in a fundamental mode buffer unconnected to the
process.
@@ -766,7 +768,7 @@ process buffer for a list of commands.)"
(inf-clojure--prompt-repl-type))))
(message "Starting Clojure REPL via `%s'..." cmd)
(with-current-buffer (apply #'make-comint
"inf-clojure" (car cmdlist) nil (cdr cmdlist))
process-buffer-name (car cmdlist) nil (cdr cmdlist))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that's needed? At first I thought so myself, but you might have noticed that I just reverted it, before you added it. :D I don't think that the process name has to be unique or derived from the buffer name. After all - it was always the same until now and this worked just fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without this change inf-clojure would make a fundamental mode buffer I end up in a fundamental buffer named *inf-clojure build-your-own-logic-engine* and the correct inf-clojure repl buffer is hidden and named **inf-clojure build-your-own-logic-engine**
image

Copy link
Contributor Author

@dpsutton dpsutton Mar 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prior to this change the string "inf-clojure" was passed in, and the buffer name we used was "*inf-clojure*" for this reason

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. that's from IELM:

image

Seems to me there's no need for the names to match, but I might be missing something. I no longer remember comint's APIs well. :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, you're right. That's the only place where we pass the buffer name anyways. :D I wonder what I was thinking when I deleted this. :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suspect that's the disambiguation that they do when they do match. ie, the same name goes in and it adds a 1 on the end. I suspect the best thing to do is actually start up the repl and then rename it repl-projec-name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably right, I didn't dwell on this much. I was also thinking of making the naming template configurable in case someone wants different names by default.

@bbatsov bbatsov merged commit 1e99b82 into clojure-emacs:master Mar 22, 2021
@bbatsov
Copy link
Member

bbatsov commented Mar 22, 2021

Redundant, my ass 9841b38 😆

@dpsutton
Copy link
Contributor Author

thansk @bbatsov and all the docstring tweaks and cleanup is much appreciated!

@bbatsov
Copy link
Member

bbatsov commented Mar 22, 2021

You're welcome! In the morning I felt inspired and I decided to do a bit of work on inf-clojure myself. Your PR about the default REPL reminded me that there's still plenty of low-hanging fruit that we can easily tackle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants