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:55:16 +0200 Message-ID: <87mtgzwuyz.fsf@blind.guru> References: <87tub8hsax.fsf@blind.guru> <83h777ep5r.fsf@gnu.org> <87sfqrg2hf.fsf@blind.guru> <83bkxfen5h.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="24768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) Cc: raman@google.com To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 05 15:05:40 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 1nbisO-0006HE-Mz for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 15:05:40 +0200 Original-Received: from localhost ([::1]:47442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbijl-0003bu-IK for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 08:56:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbiiU-0002oA-WA for emacs-devel@gnu.org; Tue, 05 Apr 2022 08:55:27 -0400 Original-Received: from familiekainz.at ([37.187.20.171]:55992 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 1nbiiS-0001ZM-Ll for emacs-devel@gnu.org; Tue, 05 Apr 2022 08:55:26 -0400 Original-Received: by ns3035380.ip-37-187-20.eu (Postfix, from userid 110) id 4E02E2C12; Tue, 5 Apr 2022 14:55:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1649163321; bh=SZ5aJDBVVyjfLU2IbIpsf56Xf2zOy4WdBVPd8Wz36EU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lUjtxQ1PDE6eebl5yX6Lio1zHIczBWd8haiC78u5sFua5ONmhM8mcDeycPhWmrn3K Q3/1qJKoStbDBug7qZBmcaD9xum9Jtp9pCf/P9ZmY5OBQ7NnCWQ2UyFLBZZK9MZqBo AO9WWDTSY0glQvrDu5oNvJqZV6hkZk9Anqlq2+ts= Original-Received: from x1.blind.guru (84-115-55-45.cable.dynamic.surfer.at [84.115.55.45]) by ns3035380.ip-37-187-20.eu (Postfix) with ESMTPSA id 33FDF2C12; Tue, 5 Apr 2022 14:55:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1649163319; bh=SZ5aJDBVVyjfLU2IbIpsf56Xf2zOy4WdBVPd8Wz36EU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VGZKxonBXmcmeVrjtbFU3aKQFFyS+uFnOH3v96BB8CAmVk4EHLnAfyxmGt4VhK1dr AGJgez3RtRi33xOF2B387eVx1L7sUvdhsySouCqNEXL31Jt4qFAd6RMAnR5M7Icwp9 yDfTwFIgIy4bB4aa23vtcXr5EPeesyaI7JZ+RL3U= Original-Received: by x1.blind.guru (Postfix, from userid 1000) id 5AC1BE804F6; Tue, 5 Apr 2022 14:55:16 +0200 (CEST) In-Reply-To: <83bkxfen5h.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Apr 2022 15:21:30 +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:287813 Archived-At: Eli Zaretskii writes: >> From: Mario Lang >> Date: Tue, 05 Apr 2022 14:05:00 +0200 >>=20 >> > Are you sure it is a good idea to allow running arbitrary Lisp when >> > Emacs wants to signal an error? >>=20 >> 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 IM= O. > > 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. OK, I get it, `set-message-function' is for `message' only. @Raman: How do you solve this in Emacspeak? IOW, if (user-error "foo") or (signal 'beginning-of-buffer nil) are called, how does Emacspeak collect the resulting echo area output? The only hack I can think of is to advice `user-error' and `signal', and DTRT if `signal' is called with a symbol that has an error-message slot. --=20 CYa, =E2=A1=8D=E2=A0=81=E2=A0=97=E2=A0=8A=E2=A0=95