help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: M-x compile problem under tramp


From: Michael Albinus
Subject: Re: M-x compile problem under tramp
Date: Wed, 14 May 2008 10:13:29 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

sunway <sunwayforever@gmail.com> writes:

> Compilation started at Wed May 14 11:07:42
>
> make -k || echo Compilation exited abnormally with code $?
> g++ -g -I./occi/occi_header -I./matlab/include -DDEBUG   -c -o data.o
> data.cpp
> data.cpp:13: error: `ata_sniffer' has not been declared
> data.cpp:13: error: expected `)' before '*' token
> make: *** [data.o] Error 1
> make: Target `all' not remade because of errors.
> Compilation exited abnormally with code 2
>
> ///618cabfa20e529686c9b6e0b5a405636
>
> exit
> Connection to matlab closed.
> exit
>
> Compilation finished at Wed May 14 11:07:45

Of course, you must also change your `compilation-finish-function'.
STR is still the success message of the process. Instead of, you might
check the buffer for the error message, like this (untested):

(setq compilation-finish-function
      (lambda (buf str)
        (save-excursion
          (with-current-buffer buf
            (goto-char (point-min))
            (if (re-search-forward "exited abnormally" nil t)
                (message "compilation errors, press C-x ` to visit")
              ;;no errors, make the compilation window go away in 0.5 seconds
              (run-at-time 0.5 nil 'delete-windows-on buf)
              (message "NO COMPILATION ERRORS!"))))))

Best regards, Michael.





reply via email to

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