gicrisf / tochemfig

Make Emacs write chemfig code from molfile or SMILES.
MIT License
9 stars 0 forks source link

Doom Emacs installation and configuration #1

Open Martin-2019 opened 1 month ago

Martin-2019 commented 1 month ago

Dear Author!

How to configure Your package to work with doom emacs. I wrote recipe in package el. and (setq tochemfig-default-input 'direct') in config.el.

mol2chemfigpy3 is installed too...

The emacs does not see (?) this package?

Thank You in advance!

gicrisf commented 1 month ago

Hey, I'm not able to check the package issue now as it's late and I have work tomorrow. However, since all the code is stored in a single file, you can easily try an old-style workaround by cloning the repository, opening tochemfig.el in Emacs, and running emacs-lisp-byte-compile-and-load (just press Alt+x and write the command). This should make the interactive functions available. If you want to autoload it, you can add (load! "/path/to/tochemfig/tochemfig.el") in your config.el file. It's not the cleanest solution, but I hope this helps you work right away.

Martin-2019 commented 1 month ago

Thank You for your quick response.

The solutions suggested work, admittedly they are half measures, but they do work.

The original recipe with doom emacs - unfortunately not.

I will look for the error, deeper.

Thank You - a really good piece of programming work.

gicrisf commented 1 month ago

I'm glad to read you're enjoying my package!

In the meantime, I found the issue. At first, I developed the package for my own use case, so I loaded all functions using Emacs' autoload magic comment. But then I realized it wasn't great since there are many functions you don't use in your daily activity. It would be better to load them in specific buffers, only when you work with molecules. So, I decided a minor mode for Emacs was the solution. However, I haven't created the minor mode function yet, so that part is currently broken. Considering your interest in the project, I'll try to finalize it. If I find I never have time to do it, I'll give you a working branch with the old style, even if it's a bit rough.