emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does signaling an error not call set-message-function?


From: T.V Raman
Subject: Re: Why does signaling an error not call set-message-function?
Date: Tue, 5 Apr 2022 06:58:48 -0700

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  🦮



reply via email to

[Prev in Thread] Current Thread [Next in Thread]