emacs-devel
[Top][All Lists]
Advanced

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

Re: flymake-display-err-menu-for-current-line does not work under -nw


From: Lennart Borgman (gmail)
Subject: Re: flymake-display-err-menu-for-current-line does not work under -nw
Date: Wed, 05 Dec 2007 00:12:47 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Ævar Arnfjörð Bjarmason wrote:
flymake-display-err-menu-for-current-line does not work excpet under
X. Here's one implementation for text mode that I use which displays the
errors/warnings in the echo area instead of opening a menu:

(defun flymake-display-err-message-for-current-line ()
  "Display a message with errors/warnings for current line if it
has errors and/or warnings."
  (interactive)
  (let* ((line-no             (flymake-current-line-no))
         (line-err-info-list  (nth 0 (flymake-find-err-info flymake-err-info 
line-no)))
         (menu-data           (flymake-make-err-menu-data line-no 
line-err-info-list)))
    (if menu-data
        (let ((messages))
          (push (concat (car menu-data) ":") messages)
          (dolist (error-or-warning (cadr menu-data))
            (push (car error-or-warning) messages))
          (message "%s" (mapconcat #'identity (reverse messages) "\n"))))))

I want to get this or something like it into Emacs pending comments on
whether this implementation is even a good idea. Should it use
(message)? Would it be better to use a idle timer like eldoc-mode does?
Something completely different?


Another possibility is to add the error message to the after-text or before-text of the overlay that flymake put on the line. However I do not think the text should be added to the overlay until the user requests it, otherwise the lines in the buffer will be jumping in an uncontrolled way.

Eh, but adding it to the overlay will mean that the buffer lines jumps afterward when flymake is removing the overlay.

Maybe it is better to check use-dialog-box?




reply via email to

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