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

Added cider-docview-select-buffer custom variable #1995

Closed
wants to merge 1 commit into from

Conversation

nahuel
Copy link
Contributor

@nahuel nahuel commented May 21, 2017

Added cider-docview-select-buffer custom variable to control if the documentation viewer popup will be autoselected after opening.

Added cider-docview-select-buffer custom variable to control if the documentation viewer popup will be autoselected after opening.
@@ -96,6 +96,11 @@
:group 'cider-docview-mode
:package-version '(cider . "0.7.0"))

(defcustom cider-docview-select-buffer t
Copy link
Member

Choose a reason for hiding this comment

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

That's not really related to cider-docview-mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what about changing group to cider-doc?

"Autoselect the documentation viewer after popup."
:type 'boolean
:group 'cider-docview-mode
:package-version '(cider . "0.7.0"))
Copy link
Member

Choose a reason for hiding this comment

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

And it wasn't introduced in CIDER 0.7. :-)

@bbatsov
Copy link
Member

bbatsov commented May 21, 2017

The name of the variable is misleading as it's not really related to docview mode at all. It's controlling whether the doc buffer would be selected or not. I'm curious why do you want this? You know pressing q will dispose of the buffer, right?

@nahuel
Copy link
Contributor Author

nahuel commented May 21, 2017

So maybe naming it as cider-doc-select-buffer?

When browsing code I find useful to map [f1] to cider-doc and press it over unknown functions to get a quick glance of their doc in an always opened secondary window. I switch quickly between functions docs, so if the window autoselects (the current behaviour) I must do extra steps to return to the code buffer. Pressing q will close the doc buffer but leaves the window opened and selected, and is also an extra step.

A better yet behavior for me is to have the doc window always opened and make it autorefresh with the documentation for the function at point, without pressing any key (and without autoselecting the doc window).

@bbatsov
Copy link
Member

bbatsov commented May 21, 2017

I see. That workflow is a bit odd and doesn't sound like something pleasant to me. I think you actually need #1982

@nahuel
Copy link
Contributor Author

nahuel commented May 21, 2017

the libs on #1982 open the documentation inside the code buffer, I like to get it always in the same separated emacs window as cider does with my described workflow.

@bbatsov
Copy link
Member

bbatsov commented May 21, 2017

the libs on #1982 open the documentation inside the code buffer, I like to get it always in the same separated emacs window as cider does with my described workflow.

Isn't it preferable not to need a dedicated buffer for this? Seems like a waste of space to me, but I might be missing something...

@nahuel
Copy link
Contributor Author

nahuel commented May 21, 2017

Is a matter of personal preference, I like to have an "static" layout, so my docs are always in the same place and not popping over the code buffer or opening/closing windows.

@bbatsov
Copy link
Member

bbatsov commented May 21, 2017

I see. Well, I'd make this consistent with:

(defcustom cider-auto-select-error-buffer t
  "Controls whether to auto-select the error popup buffer."
  :type 'boolean
  :group 'cider)

so cider-doc-auto-select-buffer maybe?

This should be reflected in the changelog as well.

(defcustom cider-docview-select-buffer t
"Autoselect the documentation viewer after popup."
:type 'boolean
:group 'cider-docview-mode
Copy link
Member

Choose a reason for hiding this comment

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

This should be cider-doc.

@nahuel nahuel closed this May 21, 2017
@nahuel nahuel deleted the patch-1 branch May 21, 2017 23:11
@nahuel
Copy link
Contributor Author

nahuel commented May 21, 2017

@bbatsov PR was autoclosed, but I fixed the code here in the updated aceab73

@bbatsov
Copy link
Member

bbatsov commented May 22, 2017

Feel free to open a new PR.

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