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

editorconfig binds still show up despite being commented in init.el #1312

Closed
cole-h opened this issue Apr 8, 2019 · 3 comments
Closed

editorconfig binds still show up despite being commented in init.el #1312

cole-h opened this issue Apr 8, 2019 · 3 comments
Labels
is:bug Something isn't working as intended module:config/default Pertains to Doom's :config default module re:elisp Personal configuration issues, conflicts or questions re:keybinds Changes to or discussion about Doom's keybinds re:ux Has to do with the user's experience

Comments

@cole-h
Copy link

cole-h commented Apr 8, 2019

Observed behavior

I'm back again! I found this issue by accidentally fat-fingering SPC f c which is present even when editorconfig is commented out in my private init.el. Running it gives Wrong type argument: commandp, editorconfig-find-current-editorconfig (which is to be expected because editorconfig isn't loaded).

Expected behavior

editorconfig and related binds/config settings should be feature-gated (don't know what else to call it when you use the featurep! macro to conditionally enable stuff) so that it gets removed when commented in init.el (uncommenting currently works as expected: downloads package, etc).

Steps to reproduce

(reproducable on both daemon and normal)

  1. Launch Doom Emacs
  2. SPC f c
  3. Error

System information

Click to expand
  • OS: gnu/linux (x86_64-pc-linux-gnu)
  • Emacs: 26.1 (Mar 17, 2019)
  • Doom: 2.0.9 (develop ffe297b)
  • Graphic display: t (daemon: t)
  • System features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
  • Details:
    env bootstrapper: envvar-file
    elc count: 0
    uname -a:  Linux Scadrial 5.0.6-arch1-1-custom #1 SMP Fri Apr 5 16:39:33 PDT 2019 x86_64 GNU/Linux
    modules:   (:feature eval (evil +everywhere) file-templates (lookup +docsets) :completion company ivy :ui doom doom-dashboard hl-todo modeline treemacs (popup +all +defaults) vc-gutter vi-tilde-fringe window-select :editor fold multiple-cursors rotate-text :emacs dired electric imenu vc :tools flycheck lsp magit :lang data emacs-lisp lua markdown (org +attach +babel +capture +export +present) (rust +lsp) (sh +zsh) :config default)
    packages:  (move-text aggressive-indent)
    exec-path: (~/bin ~/.local/bin/ ~/.go/bin ~/.cargo/bin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /usr/lib/emacs/26.1/x86_64-pc-linux-gnu/)
@hlissner hlissner added module:config/default Pertains to Doom's :config default module re:keybinds Changes to or discussion about Doom's keybinds labels Apr 8, 2019
@hlissner
Copy link
Member

hlissner commented Apr 8, 2019

This is an ongoing issue I haven't decided how to deal with. Most keybinds in the :config default module are bound unconditionally. I avoid feature-gating them to avoid:

  1. the performance impact: map! and general (the mechanisms through which I define leader keys) are relatively expensive for this purpose -- accounting for ~20% of Doom's startup time -- though I gradually chip away at its overhead through other means.
  2. the readability impact: the :config default module serves as one big reference for Doom's keybinds. Keybinds are arranged alphabetically and/or grouped by their purpose, rather than their origin. Feature gating commands will force me to ruin that arrangement and inflate the file's LOC. Documentation could serve as a solution for this, but I haven't gotten around to that (or figured out how to organize such a thing for so many keybinds).

I also avoid moving these keybinds into their respective modules so that keybinding schemes can be modularized (and be toggled if desired).

Long story short, I think commandp errors are the lesser evil.

I've looked into ways to get map! to ignore missing commands or replace them with stubs that emit more helpful errors, but these solutions have their own performance or UX issues.

@cole-h
Copy link
Author

cole-h commented Apr 8, 2019

For now, enabling the editorconfig section fixes the problem (or rather, avoids it) and there aren't really any downsides to doing so AFAICT, so I will do just that.

@hlissner hlissner added re:elisp Personal configuration issues, conflicts or questions status:resolved Issue was addressed internally labels Apr 8, 2019
@hlissner
Copy link
Member

hlissner commented Apr 8, 2019

Good to hear! In that case, I'll consider this resolved.

@hlissner hlissner closed this as completed Apr 8, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
@hlissner hlissner added is:bug Something isn't working as intended re:ux Has to do with the user's experience and removed status:resolved Issue was addressed internally labels Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:bug Something isn't working as intended module:config/default Pertains to Doom's :config default module re:elisp Personal configuration issues, conflicts or questions re:keybinds Changes to or discussion about Doom's keybinds re:ux Has to do with the user's experience
Projects
None yet
Development

No branches or pull requests

2 participants