all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: 8941@debbugs.gnu.org
Subject: bug#8941: which-func-ff-hook should be less noisy
Date: Mon, 27 Jun 2011 14:03:16 +0200	[thread overview]
Message-ID: <BANLkTikqkQvCSz5ug+CGibKfyc9q45uzew@mail.gmail.com> (raw)

In this change,

revno: 102581
committer: Stefan Monnier <monnier@iro.umontreal.ca>
branch nick: trunk
timestamp: Fri 2010-12-03 19:49:49 -0500
message:
  * lisp/progmodes/which-func.el (which-func-ff-hook): Log the error message.
  (which-func-update-1): Distinguish symbols from strings.
  (which-function): Stay within 80 columns.

there was added this bit

@@ -207,6 +207,7 @@
          (setq imenu--index-alist
                (save-excursion (funcall imenu-create-index-function))))
     (error
+     (message "which-func-ff-hook error: %S" err)
      (setq which-func-mode nil))))


which "logs" the error message. Unfortunately, when you have
`which-func-modes' set to t, you receive that message a lot for what
it is not an error (which-func-mode is simply unsupported in that
buffer / mode).

I don't want to remove it, because I suppose Stefan put it for a
reason. Now, if the reason is simply to log the error in *Messages*,
either doing it directly, or conditionalizing it somehow according to
(eq which-func-modes t) would be better.

If, on the other hand, the intent is to warn the user so s/he adds the
mode to which-func-non-auto-modes (which, IMHO, runs counter to
allowing which-func-modes = t), then I'd suggest to use a delayed
warning

     (push (list 'which-func (error-message-string err) :error)
delayed-warnings-list)

which has the double advantage that it is more visible and can be filtered out.

    Juanma





             reply	other threads:[~2011-06-27 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 12:03 Juanma Barranquero [this message]
2011-07-04 20:42 ` bug#8941: which-func-ff-hook should be less noisy Stefan Monnier
2011-07-04 22:08   ` Juanma Barranquero
2011-07-05 18:56     ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikqkQvCSz5ug+CGibKfyc9q45uzew@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=8941@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.