Insert Unique Log Message
Posted: | Categories: emacs, linux | Tags: ada, emacs, 2023
I had tried to implement a debugging logging/print method myself using macros but hadn’t really achieved the level of elegance outlined in https://xenodium.com/sprinkle-me-logs/ I added a couple of programming modes to the function defined in the post above and have now incorporated it into my workflow: ((equal major-mode 'ada-mode) (cons (format "Ada.Text_Io.Put_Line (\"%s: \\([0-9]+\\)\");" word) (format "Ada.Text_Io.Put_Line (\"%s: %%s\");" word))) ((equal major-mode 'c++-mode) (cons (format "std::cout << \"%s: \\([0-9]+\\)\" << std::endl;" word) (format "std::cout << \"%s: %%s\" << std::endl;" word))) For some reason I always seem to tend to ribald statements within my code, something like poop or some other unsavoury variant, I just need to remember to tidy these up later on! Read more...