From: "T.V Raman" <raman@google.com>
To: mlang@blind.guru
Cc: emacs-devel@gnu.org, raman@google.com
Subject: Re: Why does signaling an error not call set-message-function?
Date: Tue, 5 Apr 2022 06:58:48 -0700 [thread overview]
Message-ID: <25164.19224.258385.435031@retriever.mtv.corp.google.com> (raw)
In-Reply-To: <87mtgzwuyz.fsf@blind.guru>
Se the relevant code in module emacspeak-advice.el
Mario Lang writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Mario Lang <mlang@blind.guru>
> >> 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.
>
> 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.
>
> --
> CYa,
> ⡍⠁⠗⠊⠕
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
next prev parent reply other threads:[~2022-04-05 13:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 8:01 Why does signaling an error not call set-message-function? Mario Lang
2022-04-05 11:38 ` Eli Zaretskii
2022-04-05 12:05 ` Mario Lang
2022-04-05 12:21 ` Eli Zaretskii
2022-04-05 12:55 ` Mario Lang
2022-04-05 13:58 ` T.V Raman [this message]
2022-04-05 13:14 ` Stefan Monnier
2022-04-05 13:20 ` Eli Zaretskii
2022-04-05 13:34 ` Stefan Monnier
2022-04-05 13:39 ` Eli Zaretskii
2022-04-05 14:19 ` Stefan Monnier
2022-04-05 16:07 ` T.V Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25164.19224.258385.435031@retriever.mtv.corp.google.com \
--to=raman@google.com \
--cc=emacs-devel@gnu.org \
--cc=mlang@blind.guru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.