From unknown Thu Aug 21 22:59:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8941 <8941@debbugs.gnu.org> To: bug#8941 <8941@debbugs.gnu.org> Subject: Status: which-func-ff-hook should be less noisy Reply-To: bug#8941 <8941@debbugs.gnu.org> Date: Fri, 22 Aug 2025 05:59:56 +0000 retitle 8941 which-func-ff-hook should be less noisy reassign 8941 emacs submitter 8941 Juanma Barranquero severity 8941 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 27 08:04:16 2011 Received: (at submit) by debbugs.gnu.org; 27 Jun 2011 12:04:16 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1 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 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 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 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 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= Received: by 10.142.144.11 with SMTP id r11mr1091760wfd.335.1309176236232; Mon, 27 Jun 2011 05:03:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.173.16 with HTTP; Mon, 27 Jun 2011 05:03:16 -0700 (PDT) From: Juanma Barranquero Date: Mon, 27 Jun 2011 14:03:16 +0200 Message-ID: Subject: which-func-ff-hook should be less noisy To: Bug-Gnu-Emacs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 04 16:42:33 2011 Received: (at 8941) by debbugs.gnu.org; 4 Jul 2011 20:42:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdpyT-00084p-8i for submit@debbugs.gnu.org; Mon, 04 Jul 2011 16:42:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdpyQ-00084V-D9 for 8941@debbugs.gnu.org; Mon, 04 Jul 2011 16:42:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABEkEk5FxIxr/2dsb2JhbABTp3t4iHrBJoY2BJ5chCw X-IronPort-AV: E=Sophos;i="4.65,475,1304308800"; d="scan'208";a="120418436" Received: from 69-196-140-107.dsl.teksavvy.com (HELO pastel.home) ([69.196.140.107]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Jul 2011 16:42:23 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3092358DBA; Mon, 4 Jul 2011 16:42:20 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8941: which-func-ff-hook should be less noisy Message-ID: References: Date: Mon, 04 Jul 2011 16:42:20 -0400 In-Reply-To: (Juanma Barranquero's message of "Mon, 27 Jun 2011 14:03:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8941 Cc: 8941@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > @@ -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). Hmm... that's a problem. > 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. The intention is to make sure errors in Imenu don't get ignored silently, otherwise diagnosing problems can be difficult. But of course, we need to distinguish between "we got an error because Imenu is not supported in this buffer" and real errors. Sadly, imenu does not make it easy to figure out whether it is enabled/configured in a given buffer. You'd have to check - imenu-create-index-function - imenu-prev-index-position-function and imenu-extract-index-name-function - imenu--generic-function - imenu-generic-expression Would the patch below work? === modified file 'lisp/progmodes/which-func.el' --- lisp/progmodes/which-func.el 2011-05-12 07:07:06 +0000 +++ lisp/progmodes/which-func.el 2011-07-04 20:42:04 +0000 @@ -206,7 +206,8 @@ (setq imenu--index-alist (save-excursion (funcall imenu-create-index-function)))) (error - (message "which-func-ff-hook error: %S" err) + (unless (equal err (error "This buffer cannot use `imenu-default-create-index-function'")) + (message "which-func-ff-hook error: %S" err)) (setq which-func-mode nil)))) (defun which-func-update () From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 04 18:09:36 2011 Received: (at 8941) by debbugs.gnu.org; 4 Jul 2011 22:09:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdrKi-0002NO-Jh for submit@debbugs.gnu.org; Mon, 04 Jul 2011 18:09:36 -0400 Received: from mail-pv0-f172.google.com ([74.125.83.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdrKg-0002N9-9u for 8941@debbugs.gnu.org; Mon, 04 Jul 2011 18:09:35 -0400 Received: by pvh18 with SMTP id 18so5213812pvh.3 for <8941@debbugs.gnu.org>; Mon, 04 Jul 2011 15:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=2+C5csFaaQYIB7a64XX7kyupgAGCSppamZK90fi/S6c=; b=R1ynSfqztNv8q7iuAwXzslov+4endCjkDUn8pAeNtLNdqtXyR5vgQhG8DdDiXdXwx7 5hzSmHBb90h3hePMHtkoyTVzJ3VDPYBHQM+AE5zz8ze4+dNUh3+z0x48oJ4hu6ZAkuv4 VPs+e484JeOzu3lifaQt5LY2l0LshCiYTJ6g8= Received: by 10.142.120.1 with SMTP id s1mr3142517wfc.252.1309817368215; Mon, 04 Jul 2011 15:09:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.144.4 with HTTP; Mon, 4 Jul 2011 15:08:48 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Tue, 5 Jul 2011 00:08:48 +0200 Message-ID: Subject: Re: bug#8941: which-func-ff-hook should be less noisy To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 8941 Cc: 8941@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Mon, Jul 4, 2011 at 22:42, Stefan Monnier wro= te: > Would the patch below work? Yes, if you add the missing quote before (error ...) in > + =C2=A0 =C2=A0 (unless (equal err (error "This buffer cannot use `imenu-= default-create-index-function'")) =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 14:56:59 2011 Received: (at 8941-done) by debbugs.gnu.org; 5 Jul 2011 18:56:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeAnr-00014W-Iu for submit@debbugs.gnu.org; Tue, 05 Jul 2011 14:56:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeAno-00014H-M3 for 8941-done@debbugs.gnu.org; Tue, 05 Jul 2011 14:56:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGJdE05FxIxr/2dsb2JhbABTqAh4iHrCU4Y2BJ5chCw X-IronPort-AV: E=Sophos;i="4.65,481,1304308800"; d="scan'208";a="120561742" Received: from 69-196-140-107.dsl.teksavvy.com (HELO pastel.home) ([69.196.140.107]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 05 Jul 2011 14:56:51 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3FA57592B2; Tue, 5 Jul 2011 14:56:50 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8941: which-func-ff-hook should be less noisy Message-ID: References: Date: Tue, 05 Jul 2011 14:56:50 -0400 In-Reply-To: (Juanma Barranquero's message of "Tue, 5 Jul 2011 00:08:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8941-done Cc: 8941-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> Would the patch below work? > Yes, if you add the missing quote before (error ...) in >> + =A0 =A0 (unless (equal err (error "This buffer cannot use `imenu-defau= lt-create-index-function'")) Thanks, installed, Stefan From unknown Thu Aug 21 22:59:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 03 Aug 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator