reddit / emacs

can't set desired vhdl-mode compiler

bad63r · 2022-02-23 20:06
Hello all, I'm using vhdl-mode a lot and just decided that it would be a great idea to include compiler vhdl-mode option into my workflow with Emacs. I have to say that I set custom file location for "Easy configuration" on Emacs. `(setq custom-file "~/.emacs.d/emacs-custom.el")` `(load custom-file)` To select compiler in vhdl-mode there are two ways, and it is little bit confusing to me. I want to use Xilinx XST compiler. Let me explain. First, you can select compiler from drop-down menu. There are [Compiler1 and Compiler2 options](https://imgur.com/a/tC1k93X). If you tinker with these options, some text is saved to my emacs-custom.el file, but I can't see that something is configured there. To me it seems like it copied just to whole compilers list into that emacs-custom.el. Maybe it saves some options in other place too and I'm not aware of it? Second, which works, but its value is not saved anywhere! It looks like [this](https://imgur.com/a/PZSZEiN). I have tried to put `(vhdl-set-compiler "Xilinx XST")` and it returned that error that function is void. If I do it manually by fallowing vhdl-mode drop-down menu, and then selecting "Xilinx XST" compiler, it works. But just in this emacs session. After the restart of emacs, I have to do it again manually :/ my emacs-custom.el : [https://pastebin.com/iaTQbK17](https://pastebin.com/iaTQbK17) my init.el : [https://pastebin.com/4GNLJMQB](https://pastebin.com/4GNLJMQB) Any help is appreciated :) ​ SOLUTION: Thanks to u/ieure, [https://www.reddit.com/r/emacs/comments/szqko9/comment/hy5e2la/?utm\_source=share&utm\_medium=web2x&context=3](https://www.reddit.com/r/emacs/comments/szqko9/comment/hy5e2la/?utm_source=share&utm_medium=web2x&context=3)
ieure · 2022-02-23 20:58
`vhdl-compiler-alist` is a list of all the compilers vhdl-mode knows about. You can edit it to add new ones as well. `vhdl-compiler` is the variable which holds the name of the specific compiler in `vhdl-compiler-alist` that you want to use. To persistently change your preferred compiler, `M-x customize-variable RET vhdl-compiler RET` Then pick your desired compiler from the list and `C-x C-s` to apply and save the new settings.
bad63r · 2022-02-23 22:01
Thanks, that did the trick. I don't know why that is not setting by default when I'm picking the compiler from vhdl-mode dropdown menu... Anyway ... it works just as you described :)