From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8941: which-func-ff-hook should be less noisy Date: Mon, 27 Jun 2011 14:03:16 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309176332 659 80.91.229.12 (27 Jun 2011 12:05:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2011 12:05:32 +0000 (UTC) To: 8941@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 27 14:05:28 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QbAZE-0002p1-2H for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2011 14:05:28 +0200 Original-Received: from localhost ([::1]:47285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAZD-0000Ou-0f for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2011 08:05:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAYs-0000Jz-IG for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbAYp-0005Cu-EN for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:05:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAYp-0005CR-0H for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QbAYo-0004wy-Bn; Mon, 27 Jun 2011 08:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2011 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8941 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.130917625618971 (code B ref -1); Mon, 27 Jun 2011 12:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jun 2011 12:04:16 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbAY2-0004vw-Qx for submit@debbugs.gnu.org; Mon, 27 Jun 2011 08:04:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbAY0-0004vj-Lo for submit@debbugs.gnu.org; Mon, 27 Jun 2011 08:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbAXt-000506-Uf for submit@debbugs.gnu.org; Mon, 27 Jun 2011 08:04:07 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:46780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAXs-0004zV-OF for submit@debbugs.gnu.org; Mon, 27 Jun 2011 08:04:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAXq-000060-Ra for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:04:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbAXm-0004xE-Nx for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:04:01 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:46945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbAXm-0004wT-FP for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 08:03:58 -0400 Original-Received: by pvc12 with SMTP id 12so3402581pvc.0 for ; Mon, 27 Jun 2011 05:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=2e3BmuZjN3P4pRf5kliFe/LBhi7ZGYpX2niWqful+YM=; b=Dn/M67X8z+BNauruTUVtLlCMW88AGvfbKo0hu/LhQGHcj7SFQVp3fQ601IjemK2K7T 8xm1Au3Vx1kMcW9AcZWh+38EUjqY12ynOAsaWTW9g3inGRHmHd5WkItdYc9Kn2+3S698 LzfxxuH3mRUw0GraqHue1SQO4VaWceB7JQnuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=YZ6TK+mPRARzUPuSYZ19mLSoJnOX9rjiLFN31R0mzzvE08702fN2vPeGgCVx3EPkAJ z0KCO8Hr4v1SvTfbkrxVmpGVmpSirtQ4XwW7NvfzpazfeZwKv0UwKyctNkTqHXPhsba+ dPzW0PvP4YkmzX1U3EuW8N3+/c2dR7wzNYb7o= Original-Received: by 10.142.144.11 with SMTP id r11mr1091760wfd.335.1309176236232; Mon, 27 Jun 2011 05:03:56 -0700 (PDT) Original-Received: by 10.142.173.16 with HTTP; Mon, 27 Jun 2011 05:03:16 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 27 Jun 2011 08:05:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47532 Archived-At: In this change, revno: 102581 committer: Stefan Monnier 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 messag= e. (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 =3D 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. =C2=A0 =C2=A0 Juanma