From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why does signaling an error not call set-message-function? Date: Tue, 05 Apr 2022 15:21:30 +0300 Message-ID: <83bkxfen5h.fsf@gnu.org> References: <87tub8hsax.fsf@blind.guru> <83h777ep5r.fsf@gnu.org> <87sfqrg2hf.fsf@blind.guru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36243"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mario Lang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 05 14:23:01 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 1nbiD7-0009AB-AV for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 14:23:01 +0200 Original-Received: from localhost ([::1]:53746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbiD6-0002KK-8m for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 08:23:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbiBg-0001IU-Io for emacs-devel@gnu.org; Tue, 05 Apr 2022 08:21:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbiBe-00034x-5p; Tue, 05 Apr 2022 08:21:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=og9ytRaYyK6tDgNOITjwjzjIpWShjWZlODuar+nIMXw=; b=GqANEMV6Z6zy gJSVdgzoRrNxhSrl19R237nSVJwJd5vVz0qvdWoIPbJCkx5OHb31oF0NfBReMzEhc2NGma+5U77MF lbO6IZenA/lXKQOk4dZ05UwLj2XX7yrPwsmoZbLnvMobZ6w8Ych97Y+jIdRvS7Cm4weZR26ftHJDr +bjHyLrnRJ7BGwONS1ZicQd0ofVIUNkVYKWexNypBZQHgb9hc5hOCoQsz7jmfLDa4GaMS3Q2CzJqO SxPU/4Md6RuVzp/f/1CZOVUTDHDaHuaNJNf9qamt2zBEmlDkbdytDjDjv1ggaqDTVgVKNnMRC3s+D aJHAZnGrcqheRGwq3WTXAA==; Original-Received: from [87.69.77.57] (port=3009 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbiBa-0005zR-46; Tue, 05 Apr 2022 08:21:29 -0400 In-Reply-To: <87sfqrg2hf.fsf@blind.guru> (message from Mario Lang on Tue, 05 Apr 2022 14:05:00 +0200) 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:287812 Archived-At: > From: Mario Lang > Date: Tue, 05 Apr 2022 14:05:00 +0200 > > > 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. AFAIR, the set-message-function feature is explicitly for controlling the output that goes via calls to 'message'. Maybe we should emphasize this in the doc string.