unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	esabof@gmail.com, 13752@debbugs.gnu.org
Subject: bug#13752: Suggestions regarding the minibuffer
Date: Thu, 03 Jun 2021 00:06:01 +0300	[thread overview]
Message-ID: <87lf7sdlja.fsf@mail.linkov.net> (raw)
In-Reply-To: <83y2bsxx99.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Jun 2021 15:32:34 +0300")

>> > But does `signal' use one of too low-level messaging functions?
>> > I can't find what function displays the error message in the echo area.
>>
>> I hoped that was only me.  :-)  I tried following the logic from Ferror
>> to Fsignal to signal_or_quit, but it wasn't at all obvious to me where
>> that's actually displaying the message.
>>
>> I instrumented set_message, and that's called by Fsignal at some point,
>> but even with Vset_message_function set properly, the error message
>> still ends up in the echo area...
>
> 'set_message' isn't called to display errors signaled by 'signal',
> because those messages don't go the 'message' route.  Those messages
> go through cmd_error, which eventually calls command-error-function.
> The latter is by default bound to command-error-default-function,
> which displays the error message via print_error_message.
>
> I think Lisp programs that want to control this should bind
> command-error-function to the function of their liking.

Unbelievable that I forgot that recently I already implemented

  (setq-local command-error-function 'minibuffer-error-function)

for the minibuffer :-)

So like we already have 'set-message-function' that can be set to
'set-minibuffer-message', the corresponding pair of existing error-related
functions are 'command-error-function' and 'minibuffer-error-function'.

This there is nothing to do more here?





  reply	other threads:[~2021-06-02 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 19:44 bug#13752: Suggestions regarding the minibuffer E Sabof
2013-02-18 20:02 ` Stefan Monnier
2021-05-31  7:06 ` Lars Ingebrigtsen
2021-05-31 20:13   ` Juri Linkov
2021-06-01  6:17     ` Lars Ingebrigtsen
2021-06-01 20:34       ` Juri Linkov
2021-06-02  5:46         ` Lars Ingebrigtsen
2021-06-02 12:32           ` Eli Zaretskii
2021-06-02 21:06             ` Juri Linkov [this message]
2021-06-03  7:30             ` Lars Ingebrigtsen
2021-06-03 20:29               ` Juri Linkov
2021-06-04  9:42                 ` bug#42865: " Lars Ingebrigtsen
2021-06-04 16:27                   ` Juri Linkov
2021-06-06  9:17                     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf7sdlja.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=13752@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=esabof@gmail.com \
    --cc=larsi@gnus.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).