-
Notifications
You must be signed in to change notification settings - Fork 2
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
Compile main file of project, no matter the buffer #15
Comments
I use Projectile and usually have something like this in my ((nil . ((projectile-project-compilation-cmd . "bmk makeapp -r -h -o my_app src/my_app.bmx")))
(blitzmax-mode . ((indent-tabs-mode . t)
(tab-width . 4)
(fill-column . 80)))) I then run However, I would like to make it easier to compile the current buffer using Emacs' I'm happy to accept a pull request if this is something you'd like to try implementing, or I can come up with a fix for it. |
Oh that's a neat combo already! What would be the obstacles to implementing "build & run"? I have yet to try, but I thought one can get away with executing |
I came up with this for compile and run, but I'm not really happy with it: (defun blitzmax-mode-compile-and-run ()
"Compile and run contents of the current file."
(interactive)
(compile (format "bmk makeapp -r -h %s && %s"
buffer-file-name
(file-name-sans-extension buffer-file-name)))) Running I think a better solution for projects is to customize Projectile's ((nil . ((projectile-project-compilation-cmd . "bmk makeapp -r -h -o my_app src/my_app.bmx && ./my_app")))
(blitzmax-mode . ((indent-tabs-mode . t)
(tab-width . 4)
(fill-column . 80)))) |
Totally forgot about the My temporary TextMate 2 setup compiles and runs the app, but the debug output and print statements appear nowhere. The MaxIDE launches processes and pipes the output into the output window; and using stdin, if I interpret this correctly, you can debug-step through the program. That's beyond my elisp. But the compile settings sound simple enough. I guess you don't want to switch between DEBUG/RELEASE depending on user settings, but implement a Build & Run for debug and release mode, right? |
I've added quickrun support, which makes it possible to compile and run the current buffer without having to drop to the command line. Projectile is still the better choice for compiling projects, but quickrun is useful for testing out small pieces of BlitzMax code. |
That's a cool addition for quick tests! I always had MaxIDE running for the purpose of auto-saving to its Doesn't this warrant linking to bmax as a supported language for the quickrun repo? https://github.com/syohex/emacs-quickrun/#support-programming-languages |
https://github.com/textmate/blitzmax.tmbundle
The TextMate bundle uses environment settings to compile projects, not just buffers. Thanks to
.tm_properties
files, these can be set per directory/project, which is nice. I think with the power of.dir-locals.el
to auto-load when opening a buffer, one can do the same for Emacs.My elisp isn't that good, that's why I didn't work on a PR right away and want to coordinate efforts first. What do you think?
The text was updated successfully, but these errors were encountered: