-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Bugfix/fix cider selector problem #2711
Bugfix/fix cider selector problem #2711
Conversation
- If the selector is run outside of an active sesman-session, it will still find the REPL when the REPL selector is chosen (based on the last cider REPL mode). - If the selector is run while a window is visible, it will switch to that window (focus) as opposed to giving a "No such buffer" message.
@@ -139,7 +145,8 @@ is chosen. The returned buffer is selected with | |||
|
|||
(def-cider-selector-method ?r | |||
"Current REPL buffer." | |||
(cider-current-repl)) | |||
(or (cider-current-repl) |
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.
The docstring probably needs to be adjusted, as now this does something different.
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.
updated
Might also be a good idea to expand a bit the documentation for |
"Return the most recently visited buffer, deriving its `major-mode' from MODE. | ||
Only considers buffers that are not already visible." | ||
CONSIDER-VISIBLE-P will allow handling of visible windows as well. | ||
First pass only considers buffers that are not already visible. |
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 we can probably simplify the logic and consider all buffers right away. I've mostly copied this code from SLIME back in the day and I didn't think much about it. Treating differently hidden/visible buffers seems weird to me.
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 had thought about that, and on one of the commits actually implemented as such, but that had a side-effect of removing the ability to use cider-selector to flip-flop between the latest 2 buffers of the same type (to change from a clojure-mode buffer to the last visited but not shown clojure-mode buffer - not using the second pass would change this operation into a noop essentially).
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.
Got it. Well, I guess it really depends on what do we consider the purpose of this command to be - for me it was always to jump to a source buffer from some special buffer and vice versa. Of course, there's also the question of how people are actually using something and what do they consider useful. :D
That's why I was thinking we should extend the documentation of cider-selector
in general so people would know how it's supposed to be used.
This fixes :
#2707
Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
make test
)make lint
) which is based onelisp-lint
and includescheckdoc
, check-declare, packaging metadata, indentation, and trailing whitespace checks.Thanks!
If you're just starting out to hack on CIDER you might find this section of its
manual extremely useful.