ebzzry / ebzzry.github.io

Creative Commons Zero v1.0 Universal
8 stars 3 forks source link

Consider adding a prefix to wrap- functions in the smartparens article #4

Closed Fuco1 closed 6 years ago

Fuco1 commented 6 years ago

In https://ebzzry.io/en/emacs-pairs/#wrapping you show a macro for generating a bunch of wrap-* functions all at once.

Many people seem to copy the config at the bottom of your post but without the macro and they get confused because the functions do not exist.

https://github.com/Fuco1/smartparens/issues/931 https://github.com/Fuco1/smartparens/issues/899

I think either adding your own personal prefix or maybe adding sp-wrap-*... or maybe we could even simply include it in smartparens by default and be done with it :D What do you think?

ebzzry commented 6 years ago

Thanks for pointing that out. Let me handle that.

ebzzry commented 6 years ago

I copied the code snippet of the macro that defines the macros, from the middle part of the article, to the last part.

A preview of it is available here, while the Markdown source is available here. The main article here should reflect the changes soon.

Do you think that suffices?

Fuco1 commented 6 years ago

Maybe one cool thing to add would be some sort of docstring to the macro, so that when people see/copy it it is obvious that it's a function that does something... or at least there's some english people can read, since not everyone programs elisp they might not understand the significance.

Fuco1 commented 6 years ago

Someone recently posted the article on reddit so that's probably where the recent surge comes from. If you search github for some of the lines from that config there is hundreds of people using it... pretty good reach if I may say so :D Which makes it all so more annoying when things break hehe.

ebzzry commented 6 years ago

Maybe one cool thing to add would be some sort of docstring to the macro, so that when people see/copy it it is obvious that it's a function that does something... or at least there's some english people can read, since not everyone programs elisp they might not understand the significance.

That’s a good idea. I just added a docstring to the macro.

ebzzry commented 6 years ago

Which makes it all so more annoying when things break hehe.

That’s true.

Fuco1 commented 6 years ago

Thanks!

ebzzry commented 6 years ago

Thanks!

Anytime!