From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Why does signaling an error not call set-message-function? Date: Tue, 5 Apr 2022 06:58:48 -0700 Message-ID: <25164.19224.258385.435031@retriever.mtv.corp.google.com> References: <87tub8hsax.fsf@blind.guru> <83h777ep5r.fsf@gnu.org> <87sfqrg2hf.fsf@blind.guru> <83bkxfen5h.fsf@gnu.org> <87mtgzwuyz.fsf@blind.guru> 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="38225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, raman@google.com To: mlang@blind.guru Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 05 15:59:55 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 1nbjit-0009rw-Jt for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 15:59:55 +0200 Original-Received: from localhost ([::1]:37376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbjis-00059O-JU for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Apr 2022 09:59:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbjhz-0004IG-UA for emacs-devel@gnu.org; Tue, 05 Apr 2022 09:59:00 -0400 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:37549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbjhx-000473-1s for emacs-devel@gnu.org; Tue, 05 Apr 2022 09:58:58 -0400 Original-Received: by mail-pg1-x534.google.com with SMTP id s21so3432013pgs.4 for ; Tue, 05 Apr 2022 06:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=9VLcpi8IXGJpF+9ysOwBEdPlB9Z/zKh6B6GfnX3/QKg=; b=stq7Y0EGocOUbXvcQ50Z/y8BeKKmJBW8GjgEeCsJkTz69bygy9RVMTnb66Oo43/8GW aGDD0toAPC9Xpl7i7IbwajRhCUA+XaIrHvaEgJGvgwShPGs5V1g5LWJxKlxdfNiE3DX3 B0/uTgLO2C6tYDoFSNONQXPfdcYFgrAG7OlDhRkk+nx5LgaFLJlhMoP59DqeMOy1EOcz QKcO4x6j3zLi+cSJC9fDeOjUX5yIvGiWu2Rz1YShgEOkvmtQC4uWxcXWp0hrP5lIAy79 JMg1BCETISjbl964ElnhyzRNHS8kRG6/bnxWV16SkQD8BGYTDl05/AWBIeR9jNZtajXs rtPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=9VLcpi8IXGJpF+9ysOwBEdPlB9Z/zKh6B6GfnX3/QKg=; b=1S4gBxYJjpwnpyia7Xp4dqQS5tYRtU2Xy6Ta1CKcH7i1e+RCV2pvI05cBsZC9Ssj1K gPKUmQwLK1CeLenZHI8ZwFLAmtO3bDc58eJWMZt+BBBxm8maBeUfexoOygYVo3XhQYTY x0ijyHytfeMowDyiOUsgJJSv/Y78ke1OqCi1A/4YpvmGAAdTci8c+GfXA1JIyFGk3Ftt NajEv8yg3SoQFUViG2S/HouR4F0Ql7o7shsdXw9oOtrnAncdHnw1sBIXja/+HrPHoTtT ix7/cJgnK+73sO1Uw6N5RyYTd9TMQYkx8JBG3NLtEWZAmK58fVh/98kQ4dW08SD2bXfZ I/Qg== X-Gm-Message-State: AOAM5333FiivNk4djJkm0nuZkXVCfXViF+P3VATxZ4HELgT4sgR1yzAH Msbc5jbSmGhRitI5FG427lj5k63FLfPmLg== X-Google-Smtp-Source: ABdhPJz0+uxbO6D/BNzMMNYCOErt0Xbv48eQiTcaeTOWiswNzoC3KkQq6z8UvL/XC9Oim1FZ2RR00A== X-Received: by 2002:a05:6a00:b92:b0:4fa:82e9:786c with SMTP id g18-20020a056a000b9200b004fa82e9786cmr3807429pfj.31.1649167134375; Tue, 05 Apr 2022 06:58:54 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1510:424f:4a7f:7a5f:d8d6]) by smtp.gmail.com with ESMTPSA id b17-20020a056a000a9100b004e1b7cdb8fdsm17366206pfl.70.2022.04.05.06.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 06:58:53 -0700 (PDT) In-Reply-To: <87mtgzwuyz.fsf@blind.guru> X-Mailer: VM 8.1.1 under 29.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=raman@google.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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:287818 Archived-At: Se the relevant code in module emacspeak-advice.el Mario Lang writes: > Eli Zaretskii writes: >=20 > >> 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=3F > >>=20 > >> My motivation is that I am trying to redirect echo area messages = to an > >> external display. Why=3F 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 controll= ing > > the output that goes via calls to 'message'. Maybe we should > > emphasize this in the doc string. >=20 > OK, I get it, `set-message-function' is for `message' only. >=20 > @Raman: How do you solve this in Emacspeak=3F > IOW, if (user-error "foo") or (signal 'beginning-of-buffer nil) are > called, how does Emacspeak collect the resulting echo area output=3F= >=20 > 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 > --=20 > CYa, > =E2=A1=8D=E2=A0=81=E2=A0=97=E2=A0=8A=E2=A0=95 --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AE -- Thanks, --Raman(I Search, I Find, I Misplace, I Research) ♉ Id: kg:/m/0285kf1 🦮