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

Add cider-jump-to-pop-to-buffer-actions #2757

Conversation

simon-katz
Copy link
Contributor

@simon-katz simon-katz commented Nov 25, 2019

Provide a means to control what window to use when jumping to a definition with cider-jump-to.

By default, always use current window. (FWIW, note that this matches the behaviour of M-. in .el files.)

Provide an option to use an existing window in current frame when there is one that
is showing the target buffer. This is the old behaviour, but note that it does
not work well with cider-pop-back (M-,).


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)

@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from 9c05c0f to 0edf098 Compare November 25, 2019 23:05
@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from 0edf098 to f19162e Compare November 25, 2019 23:17
cider-common.el Outdated Show resolved Hide resolved
cider-common.el Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cider-common.el Outdated Show resolved Hide resolved
@bbatsov
Copy link
Member

bbatsov commented Nov 26, 2019

Great work! I've left a few small comments, but I finally understand what the problem is (and why I never encountered it).

@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from f19162e to 9a8075d Compare November 26, 2019 13:07
@simon-katz
Copy link
Contributor Author

simon-katz commented Nov 26, 2019

I've pushed changes, and linting is complaining about this in a doc string:

A value of `((display-buffer-reuse-window display-buffer-same-window))`
means if target buffer is being displayed in the current frame use its
window, otherwise use the current window.

The complaint is: Lisp symbol `display-buffer-same-window' should appear in quotes.

Is this a bug in the linting?

EDIT: Maybe I should remove details from the doc string and point at the documentation instead.

@simon-katz simon-katz changed the title Add cider-jump-to-always-use-same-window Add cider-jump-to-pop-to-buffer-actions Nov 26, 2019
@bbatsov
Copy link
Member

bbatsov commented Nov 26, 2019

You can't have inlined code in the docstrings, just references to params and symbols. I guess you can either reword this or add a link to the manual.

@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from 9a8075d to 5e6a77f Compare November 26, 2019 14:05
@simon-katz
Copy link
Contributor Author

I've re-worded the doc string. Ready for re-review.

@simon-katz
Copy link
Contributor Author

simon-katz commented Nov 26, 2019

Whoops — I've reworded things incorrectly. Let me fix that…

EDIT …fixed — I've pointed at the documentation.

@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from 5e6a77f to 4f0f1e1 Compare November 26, 2019 14:14
Provide a means to control what window to use when jumping to a definition with
`cider-jump-to`.

By default, always use current window.

This fixes clojure-emacs#2499
@simon-katz simon-katz force-pushed the add-cider-jump-to-always-use-same-window branch from 4f0f1e1 to 5271b6e Compare November 26, 2019 14:22
@bbatsov bbatsov merged commit c48c873 into clojure-emacs:master Nov 26, 2019
@bbatsov
Copy link
Member

bbatsov commented Nov 26, 2019

Thanks!

@simon-katz simon-katz deleted the add-cider-jump-to-always-use-same-window branch November 26, 2019 14:37
@simon-katz
Copy link
Contributor Author

@bbatsov Thanks for your help.

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