modular-config.el icon indicating copy to clipboard operation
modular-config.el copied to clipboard

Add a modular-config-create-module command

Open alex-a-soto opened this issue 4 years ago • 1 comments

SidharthArya, Thank you for your time and for creating this package. I appreciate it.

Background I'm in the process of transitioning from Doom to my configuration and using modular-config to achieve this. As I'm abstracting my configuration into separate loadable modules, I realize that I'm often creating a new module in the modular-config-default directory and appending #!/usr/bin/emacs --script to the top of the file. While this process of manually creating a module works, I feel that it adds some level of friction.

Proposal: Create a new function called modular-config-create-module

  1. modular-config-create-module would prompt the user for the name of the module.
  2. The module is created in the modular-config-default directory.
  3. The current buffer switches to the created module.
  4. The created module would be a new file that contains #!/usr/bin/emacs --script in the first line.

Thank you for your time and consideration.

alex-a-soto avatar Sep 25 '20 15:09 alex-a-soto

I see. I can probably add a modular-config-create-module function, but it would make sense to insert #!/usr/bin/emacs --script using some sort of a template engine or auto-insert-mode. Does that sound good ? Please refer to this: https://www.gnu.org/software/emacs/manual/html_mono/autotype.html

SidharthArya avatar Sep 26 '20 00:09 SidharthArya