From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avar@cpan.org>
Cc: emacs-devel@gnu.org
Subject: Re: flymake-display-err-menu-for-current-line does not work under -nw
Date: Wed, 05 Dec 2007 00:12:47 +0100 [thread overview]
Message-ID: <4755DEEF.9040407@gmail.com> (raw)
In-Reply-To: <87mysqgkj4.fsf@cpan.org>
Æ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?
next prev parent reply other threads:[~2007-12-04 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 22:30 flymake-display-err-menu-for-current-line does not work under -nw Ævar Arnfjörð Bjarmason
2007-12-04 23:12 ` Lennart Borgman (gmail) [this message]
2007-12-04 23:40 ` Ævar Arnfjörð Bjarmason
2007-12-04 23:51 ` Lennart Borgman (gmail)
2007-12-05 1:17 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4755DEEF.9040407@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=avar@cpan.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).