[Top][All Lists]

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

Coding system in compilation buffer

From: Enno Fennema
Subject: Coding system in compilation buffer
Date: Mon, 26 Nov 2007 10:36:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.2) Gecko/20040906

I am using GNU Emacs 22.1.1 part of SuSE Linux 10.3 x86_64.
When doing a compile gcc writes its messages/warnings using utf-8 which does not help readability when the buffers assumes latin-1.

Trying the get the compilation buffer to accept utf-8 I tried

(defun compile-utf ()
  "Set compilation buffer for UTF-8"
  ( save-current-buffer
    (set-buffer compilation-buffer)
    (set-buffer-process-coding-system "utf-8" "utf-8")))

(setq compilation-process-setup-function 'compile-utf)

Now doing a compile appears to call the function compile-utf but then moans that compilation buffer is a void variable.

That appears to contradict the description of compilation-process-setup-function which says that compilation-buffer should be bound by the time that function is called.

I am no elisp expert at all and appreciate help.

Does the above idea make sense or is there a better approach?

If the above, then how should I get it to work properly.

Enno Fennema

reply via email to

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