-
-
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
cider-jump with prefix to open buffer in other window? #1014
Comments
This would be easy to implement. Both The problem is with the usability. |
I said it before - PRs welcome. I agree that a lot of things need polish, but sadly have little time to deal with this ATM. On a related note - an alternative to the prefix would be alternative keybindings (like |
@EricGebhart awesome! 👍 Just opened another issue, involving the code you're touching now, if you want more to do :) Combine |
As far as I can tell, this means I now have to M-. (cider-jump) then hit return, into order to jump. This is hardly an improvement from just typing M-. - is there an alternative function I can bind to M-. ? |
It's a big improvement if you get proper completions (see #699). The list of default completions should include not just the symbol at point but also the surrounding function call, class or method. The actual completion list should ideally contain all symbols defined within a session. |
I'd still like a quick way of navigating to the symbol under the point, On 23 March 2015 at 19:28, Vitalie Spinu [email protected] wrote:
|
With #1036 we could use the extra binding to call a function that does not prompt. Jump-to-resource-or-var is currently mapped to both keybindings in that request. We could use the two bindings for one that prompts and one that doesn't. It would also be nice to get the other completion values for the one that prompts. One step at a time. |
So, if you had a choice. M-. or C-c M-. One that prompts and one that doesn't prompt. I would vote for M-. to prompt. But that's because I find the non-prompt version annoying. @danskarda might also be interested in this thread. |
If I had a choice, definitely M-. for the no-prompt version, as it was On 23 March 2015 at 21:26, Eric Gebhart [email protected] wrote:
|
Ok. I think we have to look into implementing a user option then, but that would make again an ugly code.
You are ignoring the time it takes to navigate to the symbol you need and then back to the point you were before the request.
All emacs works with prompt, and for good reasons (again see #699). So I hope we are not reverting this. |
You are citing your own comments here. All emacs works with prompt??? No it doesn't. For example, Ctrl-F doesn't bring up a prompt. It would be seriously annoying if it did, asking how many characters you wanted to move forward. I'm annoyed by this. It's seriously upset my development flow this evening, I just couldn't focus on writing code because this change forced me to look for a workaround, leading me to this issue. If you are going to mess about with fixing things, do it on new key-bindings and convince people to migrate. Key-bindings are dear to me, they are wired in to my muscle memory, some of them as long as 20+ years I've been using Emacs. I don't recall a change ever feeling so unwelcome. And sooner or later my experience will be repeated by possibly hundreds, maybe thousands of other clojure emacs devs that rely on the current 'feel' of nrepl-jump. So I think this is worth taking into consideration. If I'm alone here, then so be it, I'll hack a workaround. But my prediction is that others will jump on this thread and complain about it, because it's a real annoyance. People use CIDER to get real work done, it's a major annoyance when CIDER devs do something that pulls the rug from under your feet. |
Why not just have a user option for when to show the prompt? It seems like most people would just want all commands to consistently work in one of three ways:
I'll make a PR for this tomorrow if this sounds reasonable. |
Sounds reasonable. I can accept the new functionality is useful in the case where your point isn't on a symbol. But if it is, then asking for a confirmation is terribly annoying. nrepl-jump is such an important navigation command for the Clojure dev when you have big projects, it's not something like finding a file where a prompt is expected. So your 'dwim' option seems the most sensible compromise, the next most sensible is providing user options - but the caveat is that it's one more thing for devs to diverge on and that makes working on other people's emacs setups that little bit more uncomfortable. |
@chichli Are you proposing we have a setting for these three choices? |
It's also the norm in Emacs. :-) But yeah - I'm fine with having a config for this and I already suggested it. The previous default was a somewhat regrettable decision, but I guess it grew on people. @cichli Green light from me for the suggested change. |
Both you and @vspinu seem to think this is the case, but I don't think this is right. Emacs has two classes of jump commands:
All programming modes I use regularly have a variant of
I think we should add something covering 1) and keep the functionality in 2) intact (except for this request for a variant of Some examples of useful |
Sorry to correct you on this but
Just a guess, it started with slime and all others unfolded. Keeping it the default behavior in CIDER will enroot the problem further. if you have a slime background then it's really difficult for you to see the inefficiency of that paradigm. You can clearly see the problem if you are brand new to it. It's especially bad for documentation commands. I hate to sound repetitive, but let's think for a second, how do you navigate to the symbol? Probably C-n/C-p/M-f ... or isearch then M-.. Isn't it better to hit M-. first, type a couple of letters (ido assumed) then RET? Huge bonus - it keeps your working location intact! |
I use When reading source I've actually picked up the habit of moving the cursor along with my eyes to make it easier to jump when the work is delegated and I want to follow that code path. Clearly some bad habits have been ingrained as a consequence of always acting on point. |
Just my $0.02, but as a user of M-. primarily in the context of TAGS indexed C projects, I welcome being able to choose the target symbol at the prompt rather than only being able to jump to what I textually have at hand. An extra RET takes no time at all and I frankly don't understand the railing against it. |
I would vote strongly for @cichli's suggestion above, and feel @malcolmsparks' pain if not quite so viscerally. |
@malcolmsparks thanks for arguing so strongly about this, this is important for me as well. |
+1 @malcolmsparks this is essential for frictionless development. It sounds like a polarising topic, so the option to bind the default key to either behaviour at the choice of the user sounds like the most sensible approach. |
I also really dislike the new default.
Do you have a Slime background? I think you are strongly underestimating how disruptive it is to have to continually double-check a prompt when you are rapidly using I'd also like to request the re-enabling of the |
This controls more that just If you dislike it just change it - it's configurable for a reason. :-) |
Yes, I do. I've used it for over 5 years. That's the reason why much of the functionality in CIDER was initially modelled after SLIME. But CIDER is it's own application and follows its own path - the fact that something behaves in some way in SLIME doesn't make it the best/right way. There are plenty of people unhappy with some of SLIME's decisions (which eventually lead to the creation of the SLY project). As for the usability problems of the default - it's just one more keystroke. I program a lot in Emacs Lisp and I'm quite used to this as its the standard Emacs behavior for commands like |
If that's the way people think of them, why not preserve the behavior that people expect? The principle of least surprise would dictate that if there is a widely-held expectation, the software should meet it. What is gained by intentionally breaking that principle here?
Agreed, but there is no need to break an existing keybinding to add this new feature. Why not leave the old behavior in place, with |
You're assuming that most CIDER users are former SLIME users and that they actually enjoyed this particular SLIME behaviour. This may or may to be the case, but we have to concrete data to support such a claim. I accepted this change when it was suggested as the arguments in its favour were strong and sensible, not because I wanted to annoy anyone. People were given the ability to retain the old behaviour, so I don't see what more is there to discuss for such a trivial change.
We discussed this as well, but we're already short on (good) free keybindings and we actually have to compact the existing ones (by packing them into submaps). There are only some many keys on a keyboard. :-) P.S. We already added support for prefix args to the commands affected by the config - they invert the configured behaviour, which is a pretty good setup I think. |
[Fix #1014] Jump-to other window with prefix
Wanting to read the source of one of the functions I'm calling is the most common use-case for me with
cider-jump
. To view the call-site and the function definition side-by-side I now have to doM-.
C-x 3
C-x o
C-x b <RET>
. It would be nice if the jump would happen in the other window whencider-jump-to-var
was given a prefix.This might be cool for
cider-jump-to-resource
as wellThe text was updated successfully, but these errors were encountered: