SystemCrafters / crafted-emacs

A sensible base Emacs configuration.
MIT License
739 stars 117 forks source link

dont enable electric-pair-mode unless requested #35

Closed erikLundstedt closed 1 year ago

erikLundstedt commented 2 years ago

at least i personally find it to get in the way most of the time

japhir commented 2 years ago

Perhaps enable it only in certain modes? I pretty much always use it and only dislike it when typing smileys or frowneys. (Is this a call to include frowneys.el? 😜)

erikLundstedt commented 2 years ago

im basicly saying it shouldnt be on by default only enabeling in some modes makes for an issue where there might be a mode no-one knows about that should have it

i felt it got in the way in fennel-mode(lisp dialect) and in elisp-mode which are places where you would think it would be the most usefull

japhir commented 2 years ago

You could do it for e.g. prog-mode, which then also works for all derived modes.

Interesting that particularly in a lisp it didn't work nicely. I have it on in org-mode, R, and email etc.. I never encountered any issues so I pulled it in.

Any other opinions on this?

erikLundstedt commented 2 years ago

i think it might be that i write the function-call and arguments first and add parens later sometimes i guess i never got used to it

jeffbowman commented 2 years ago

I have it on everywhere and find it useful. It works for me just fine in lisp modes. I prefer to have it turned on globally.

We might need to take a step back on things like this and evaluate how it fits with the principles of the project. Showing line numbers is another example where it should probably be left to the end user to configure it rather than provide one here.

Regardless, the user can always turn on/off things we decide here. Options for the user is to not use a module and only copy/paste the parts of the configuration they want into their own configuration, or use a module and then figure out how to turn off the bits they don't want. Sometimes that can be tricky to figure out. For example if they don't want doom-modeline, the user must figure out how to remove that from the after-init-hook, if they want a menu bar, they need to figure out how to update the default-frame-alist (or possibly just call menu-bar-mode), if they electric parens on (or off) they just need to figure out how to do that.

My suggestion is to see what people think, if there isn't a strong consensus (as there appears to not be here), then we use the Emacs defaults and don't provide anything further, in this case that means leaving electric-pair-mode off.

ajxn commented 2 years ago

I would go for hook it on in prog-mode, as most programming additions should. Maybe control when it starts with a customizing variable using defcustom.

Alternatively, this can be turned on in example-config.el so they users can copy that file to config.el and make their own desitions. And that will be made easier if there are some lines of code there, possible comment out.

Have added an #52 how one could do this more structured in Rational Emacs.

jeffbowman commented 1 year ago

Closing in anticipation of Crafted Emacs V2.