ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SPAM UNSURE] Warnings no longer discriminated by compilation-mode


From: Manuel Gómez
Subject: Re: [SPAM UNSURE] Warnings no longer discriminated by compilation-mode
Date: Wed, 25 Aug 2021 23:04:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0



Am 18/8/21 um 0:28 schrieb Stephen Leake:
Stephen Leake <stephen_leake@stephe-leake.org> writes:

The default definition of the 'gnu looks very complete. I don't remember
why I don't just use that; I'll experiment.

This I figured out; it matches the final message from make:

make: *** [rules.make:190: test_mckenzie_harness.exe] Error 4

which I just find annoying. But that's no reason to impose my choice on
everyone.

I understand that you don't want that final message from make highlighted as an error. I don't mind if it is kept or not, but what I miss is the differentiation between errors, warnings and info messages that the default compilation mode is making; it has the counts in mode line, visual differentiation with colors, you can skip certain message kinds, etc. People maintaining huge code bases cannot always fix all legacy warnings as if they were errors.


Do people find overridding a cl-defmethod an acceptable way to customize
this (assuming I delete the setting to (gnat))? Or should I add a
customize variable?

As you ask for an opinion, a customize variable seems a like a contract to maintain that customization, while redefining the methods looks like it could break something in the future. The variable is easier to discover too and has inline documentation. But in any case, I don't know what exact customization you have in mind. In my particular case, if you remove the setting to (gnat) I think I wouldn't need a customization.


As a workaround, you can override these definitions in your ~/.emacs
(must be done after wisi is loaded):

(require 'wisi)

(cl-defmethod wisi-compiler-select-prj ((_compiler gnat-compiler) _project)
   (add-to-list 'completion-ignored-extensions ".ali") ;; gnat library files
   ;; (setq compilation-error-regexp-alist '(gnat))
   )

(cl-defmethod wisi-compiler-deselect-prj ((_compiler gnat-compiler) _project)
   (setq completion-ignored-extensions (delete ".ali" 
completion-ignored-extensions))
   ;; (setq compilation-error-regexp-alist
   ;;       (mapcar #'car compilation-error-regexp-alist-alist))
   )

Or change that to set '(gnu).

Or you can change the regexp in the 'gnat entry in
compilation-error-regexp-alist-alist to set the TYPE subexpression.


In any case, thanks for this workaround.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]