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

Issue: hydrogen:clear-results does not clear dock #1067

Closed
dsanalytics opened this issue Oct 27, 2017 · 12 comments
Closed

Issue: hydrogen:clear-results does not clear dock #1067

dsanalytics opened this issue Oct 27, 2017 · 12 comments
Labels
enhancement 🌟 New feature ideas

Comments

@dsanalytics
Copy link

Issue: hydrogen:clear-results does not clear dock

Is there a way to clear the dock via keyboard shortcut? hydrogen:clear-results only clears outputs in code, if any, but does not clear the dock if dock is used for results. Thanks in advance for you help.

Windows 10 Home Premium 64bit
Atom 64bit v 1.21.1
Hydrogen 2.0.1

@BenRussert
Copy link
Member

This seems like a good idea to me. Adding store.kernel.outputStore.clear() to hydrogen:clear-results would allow you to do what you are asking with a custom binding in your keymaps file.

It should be an easy fix. Interested in making a pull request?

@dsanalytics
Copy link
Author

Can store.kernel.outputStore.clear() be mapped to a keyboard shortcut? If so, that would solve this PR-free.

@BenRussert
Copy link
Member

Can store.kernel.outputStore.clear() be mapped to a keyboard shortcut?

Not exactly. You would need a custom command in your init script and even then it would be a bit of a hack and could break if we changed something in the future.

I think it's a good point that clearing results should include the output area (I would like it to as a user as well). This change is also the simplest solution to get the custom keyboard shortcut to work so its win-win.

@BenRussert BenRussert added enhancement 🌟 New feature ideas good first issue Good for new contributors labels Oct 28, 2017
@BenRussert
Copy link
Member

@lgeiger I am tagging this as "good first issue", let me know if I am wrong about in case i've forgotten something that will come up 🤔.

@dsanalytics
Copy link
Author

dsanalytics commented Oct 30, 2017

Ben, once dock clear is successfully included in hydrogen:clear-results, what should my configs look like in order to combine clear results and execute cell in hydrogen in a single shortcut? See my starting point below - thx in advance.

init.coffee
atom.commands.add 'atom-text-editor', 'hydrogen:clear-results-run-cell', ->
???

keymap.cson
'.platform-win32 atom-text-editor:not([mini]), .platform-linux atom-text-editor:not([mini])':
'ctrl-alt-enter': 'hydrogen:clear-results-run-cell'

@BenRussert
Copy link
Member

I'm on mobile at the moment so I'll post a link with an example that is almost the same

See also : https://atom.io/docs/api/v1.21.1/CommandRegistry#instance-dispatch

Let me know how that goes!

@dsanalytics
Copy link
Author

Thanks Ben - I'll check it out.
Any ETA for this issue?

@BenRussert
Copy link
Member

@dsanalytics I sent a PR for this just now. If interested, check our CONTRIBUTING.md to see how to set up a dev version of hydrogen and try it out. I've found hacking on atom to be a really fun way to learn to code.

rgbkrk pushed a commit that referenced this issue Oct 31, 2017
@dsanalytics
Copy link
Author

Thank you gentlemen! Atom seems to be fast becoming my primary platform for DS!

@dsanalytics
Copy link
Author

How long does it usually take to get package update in Atom through Install in Settings? No huge rush - just asking to learn about the process.

@BenRussert
Copy link
Member

Good question. Anytime features/fixes are added to the development branch they need to be "shipped" to become available as a release on apm

We will ship soon I'm sure, but I really think you should get a development branch working since you seem to have the interest 😀

More on apm release specifics here

@wadethestealth wadethestealth removed the good first issue Good for new contributors label Jul 3, 2019
@kerajel
Copy link

kerajel commented Feb 14, 2020

Uhm is this still not implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature ideas
Projects
None yet
Development

No branches or pull requests

4 participants