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 seeing is believing layer #3436

Closed
wants to merge 4 commits into from
Closed

Add seeing is believing layer #3436

wants to merge 4 commits into from

Conversation

brandoncc
Copy link
Contributor

No description provided.

@TheBB
Copy link
Collaborator

TheBB commented Oct 17, 2015

Sorry, but this use-package call isn't very up to scratch. :init runs before loading and :config runs after loading, but since you load the package in :init, everything ends up running at the same time, causing this package to be loaded on startup. Remove the require and make the keybindings in :init instead of :config.

@nixmaniack
Copy link
Contributor

I believe seeing-is-believing belongs to ruby layer instead separate layer.

@brandoncc
Copy link
Contributor Author

@TheBB Thank you for the feedback. I have a better understanding of use-package now. I had not used it at all before I got this working, and the only way I could make it work was to do it the way I had it. require is no longer necessary now that I am using only init. I did not understand why it was necessary, but that is precisely because of my defer.

@nixmaniack I didn't put it there because it is a tool that not everybody uses, should I still put it there? I should put some sort of condition on it to only init if the executable is present I assume? If so, could you point me in the right direction to learn about that and where exactly the condition should be?

@nixmaniack
Copy link
Contributor

@brandoncc Not sure about the best way, others should correct me.

You should look at ruby-layer's packages.el and how each package is initialised. use-package has conditional loading which you can make use of with (executable-find "seeing-is-believing") for loading only if binary is found.

@brandoncc
Copy link
Contributor Author

Ah, I did read that conditional loading section but I didn't see anything
about an executable (I still don't but I will try it with the code you
provided). I was using the ruby layer as my example when I was building it
actually, I just wasn't looking at the most relevant section I guess.
Thanks for the help.

On Sat, Oct 17, 2015 at 9:28 AM, Muneeb Shaikh notifications@github.com
wrote:

@brandoncc https://github.com/brandoncc Not sure about the best way,
others should correct me.

You should look at ruby-layer's packages.el and how each package is
initialised. use-package has conditional loading
https://github.com/jwiegley/use-package#conditional-loading which you
can make use of with (executable-find "seeing-is-believing") for loading
only if binary is found.


Reply to this email directly or view it on GitHub
#3436 (comment).

@brandoncc
Copy link
Contributor Author

@TheBB I believe I have addressed the issues. Please take a look.

@dcluna
Copy link
Contributor

dcluna commented Dec 7, 2015

@brandoncc 👍 This is cool

(evil-leader/set-key-for-mode 'enh-ruby-mode "msb" 'seeing-is-believing-run)
(evil-leader/set-key-for-mode 'ruby-mode "msc" 'seeing-is-believing-clear)
(evil-leader/set-key-for-mode 'enh-ruby-mode "msc" 'seeing-is-believing-clear)))
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Lisp convention does not allow trailing parentheses like this one. Can you move it to the end of the previous line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, but the PR is out of date and can't be merged. I don't use spacemacs anymore so I won't be fixing that unfortunately. Anybody else is welcome to.

…lieving-layer

# Conflicts:
#	layers/+lang/ruby/README.org
#	layers/+lang/ruby/packages.el
@brandoncc
Copy link
Contributor Author

@TheBB I fixed the merge issues on this.

@dennissivia
Copy link

I am happy somebody is already working on this. Would be great to have this being part of spacemacs,
especially since I believe it is still not an elpa package.

@Compro-Prasad
Copy link
Contributor

Compro-Prasad commented May 28, 2018

According to comment by @brandoncc what should be done this PR @sdwolfz @syl20bnr ?

|-----------------+----------------------------------|
| ~<SPC> m s b~ | Run seeing is believing |
| ~<SPC> m s c~ | Clear seeing is believing output |

Copy link
Owner

Choose a reason for hiding this comment

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

Need to find other key bindings, these one are reserved for REPL interactions.
Can those two functions be unified together into a toggle ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This ain't changing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't used spacemacs in quite a while. Someone else is welcome to find better bindings, but I doubt I will ever do it.

@sdwolfz
Copy link
Collaborator

sdwolfz commented Aug 11, 2018

Thank you ❤️!
And congratulations on your first Spacemacs PR 🎉!

I rebased with latest develop and updated the code in 6302748. For keybindings I used SPC m @ since the @ kind of looks like an eye 😺. At first this tool did not seem like it would be very usefully, more like a gimmick, but it hit me that this can be used effectively for writing data processing scripts and it's cleaner that using a shell.

Cherry-picked into develop branch, you can safely delete your branch.

@sdwolfz sdwolfz closed this Aug 11, 2018
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.

9 participants