Skip to content
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

Make it possible to cider-find-var in another window #2759

Closed
wants to merge 1 commit into from

Conversation

joncol
Copy link
Contributor

@joncol joncol commented Nov 29, 2019

This fix makes it possible to use - prefix (M-- t) to jump to test definition in another window. Before this fix, pressing enter (or t) in the CIDER test report buffer always opened the definition of the failing test function in the same window as the test report.


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (make test)
  • All code passes the linter (make lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

@joncol joncol force-pushed the find-var-other-window branch from d952eca to f6a354a Compare November 29, 2019 17:20
This fix makes it possible to use `-` prefix (`M-- t`) to jump to test
definition in another window. Before this fix, pressing enter (or `t`)
in the CIDER test report buffer always opened the definition of the
failing test function in the same window as the test report.
@bbatsov
Copy link
Member

bbatsov commented Dec 1, 2019

Did you start experiencing this problem recently? It seems to me that changing the default here #2757 might have been a bad idea for such use cases.

@joncol
Copy link
Contributor Author

joncol commented Dec 1, 2019

Did you start experiencing this problem recently? It seems to me that changing the default here #2757 might have been a bad idea for such use cases.

Yes, I think it started showing up around that time. Not 100 % sure though. I at least think it used to work differently.

The specific case where it currently doesn't work as I want, is when standing in the test report buffer and navigating to the test definition. I almost never want the test report to be hidden then. I thought I'd change this by adding a custom binding to include the prefix (C-u - or M--) when in the test report mode, but maybe some other solution is better?

@joncol
Copy link
Contributor Author

joncol commented Dec 1, 2019

OK, after reading #2757 and using

(setq cider-jump-to-pop-to-buffer-actions
      '((display-buffer-reuse-window display-buffer-same-window)))

it works as I want.

I guess this PR can be closed then.

@bbatsov
Copy link
Member

bbatsov commented Dec 1, 2019

Let's keep it open for now until I restore the previous default value. When it was changed we didn't account the impact of the new default to cases like this one.

@bbatsov bbatsov closed this in 06f933b Jan 9, 2020
simon-katz added a commit to simon-katz/nomis-public-dev-setup that referenced this pull request Aug 20, 2020
This restores the behaviour I like, which was as things were for a while.

See:
- clojure-emacs/cider#2757
- clojure-emacs/cider#2759
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