From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mario Lang Newsgroups: gmane.emacs.devel Subject: Re: Why does signaling an error not call set-message-function? Date: Tue, 05 Apr 2022 14:05:00 +0200 Message-ID: <87sfqrg2hf.fsf@blind.guru> References: <87tub8hsax.fsf@blind.guru> <83h777ep5r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31116"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 05 14:07:36 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbhyA-0007vB-L5 for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 14:07:34 +0200 Original-Received: from localhost ([::1]:40466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbhy9-0000eV-BG for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 08:07:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbhw1-0007aT-EY for emacs-devel@gnu.org; Tue, 05 Apr 2022 08:05:21 -0400 Original-Received: from familiekainz.at ([37.187.20.171]:53992 helo=ns3035380.ip-37-187-20.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbhvn-000286-4a for emacs-devel@gnu.org; Tue, 05 Apr 2022 08:05:09 -0400 Original-Received: by ns3035380.ip-37-187-20.eu (Postfix, from userid 110) id 291D62C74; Tue, 5 Apr 2022 14:05:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1649160302; bh=aMD1bKZB0Hk3YXn8gAKpWSTA8WtG0C7JJVnBVkrstRI=; h=From:To:Subject:References:Date:In-Reply-To:From; b=KKYd7ZeMGl4YQEIQqRsm8ut9QACxqQnQ5Um0FBI1YXB38sMRADTDA7LsR6RxfqOUT ZO74wM6uxEI5YgkihnG3ifOGzn6c5rCD9yxN93ZLg88kKvwR/RLzXI3krlr/U8uEqS 0rjmEFIm3JfeV0Mqyz9pshyVkLNFT6o0vsOU1BIE= Original-Received: from x1.blind.guru (zidpc777.tugraz.at [129.27.7.77]) by ns3035380.ip-37-187-20.eu (Postfix) with ESMTPSA id D532B2C72 for ; Tue, 5 Apr 2022 14:05:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1649160300; bh=aMD1bKZB0Hk3YXn8gAKpWSTA8WtG0C7JJVnBVkrstRI=; h=From:To:Subject:References:Date:In-Reply-To:From; b=LjdZQBezIYhXuLVKPPBv/PUguyZCx/etPpnAh4d3IDBARLiHdKanQyGl6Zb6O63Kh LjEt6kw3OJGqRfqLV6TItFy3YMZKAGfLvLxVZuw+MKHvhuDK7Q0Sy+bztfnA1E6v1t 69s82egFjZJk7SJrDKe0u80YLtfdZLnP7R0zMlF8= Original-Received: by x1.blind.guru (Postfix, from userid 1000) id 701ADE804F6; Tue, 5 Apr 2022 14:05:00 +0200 (CEST) In-Reply-To: <83h777ep5r.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Apr 2022 14:38:08 +0300") Received-SPF: pass client-ip=37.187.20.171; envelope-from=mlang@blind.guru; helo=ns3035380.ip-37-187-20.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287811 Archived-At: Eli Zaretskii writes: >> From: Mario Lang >> Date: Tue, 05 Apr 2022 10:01:58 +0200 >>=20 >> Hi. >>=20 >> I just realized that only a certain type of message goes through >> `set-message-function'. In particular, things like >>=20 >> (signal 'end-of-buffer nil) >>=20 >> write to the echo area but do not trigger set-message-function. >>=20 >> This is a bit unexpected. Is there an equivalent hook for >> error messages going to the echo area? > > (set-message-function _does_ affect echo-area messages, just not any > kind of them.) OK, point taken. > Are you sure it is a good idea to allow running arbitrary Lisp when > Emacs wants to signal an error? My motivation is that I am trying to redirect echo area messages to an external display. Why? Think of it like Emacspeak for braille users. When I press M-< "Mark set" is displayed, but if I press cursor up, "Beginning of buffer" is not. This seems arbitrary. I realize that signals which pop up the debugger / backtrace might be problematic to interfere with, but... The messages from `user-error' and those error symbols which only display an echo area message should be easier to programmatically see IMO. --=20 CYa, =E2=A1=8D=E2=A0=81=E2=A0=97=E2=A0=8A=E2=A0=95