[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Message's text-properties in *Messages*
From: |
Stefan Monnier |
Subject: |
Re: Message's text-properties in *Messages* |
Date: |
Wed, 23 May 2018 13:41:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> - Why would arbitrary Lisp code be dangerous (I understand that message_dolog
>> can be called from within redisplay, but redisplay runs Elisp code
>> at several places, so "from redisplay" doesn't inherently imply you
>> can't run Elisp code).
> When Lisp code is called from redisplay, we always do that via
> safe_call. Anything else is not safe, AFAIR.
I see. This doesn't answer all the questions, tho:
- The current code still does
call0 (intern ("messages-buffer-mode"));
hence doesn't use safe_call here. This is likely a bug (introduced
when we added messages-buffer-mode) and it hasn't bitten us simply
because it's run rarely enough (only after you kill the *Messages*
buffer) and by default it probably doesn't do anything dangerous, so
to trigger this bug, we'd need a "perfect storm" (i.e. set
a nasty messages-buffer-mode-hook, then kill *Messages*, then arrange
for the next message to come from within the redisplay code).
- AFAICT message_dolog avoids running before/after change functions, so
the comment about the GC being sometimes called because we run
before/after change hooks seems odd.
- If after/before change functions do end up called, are they really
called via safe_call? I don't see any trace of that.
- Would let-binding inhibit-foo-hooks good enough to avoid running
Elisp code unsafely?
Stefan
- Re: edebug: regrettable loss of information in Emacs 26.1 when printing a variable's value., (continued)
- Re: edebug: regrettable loss of information in Emacs 26.1 when printing a variable's value., Stefan Monnier, 2018/05/23
- Message's text-properties in *Messages* (was: edebug: regrettable loss of information in Emacs 26.1 when printing a variable's value), Stefan Monnier, 2018/05/23
- RE: Message's text-properties in *Messages* (was: edebug: regrettable loss of information in Emacs 26.1 when printing a variable's value), Drew Adams, 2018/05/23
- Re: Message's text-properties in *Messages*, Stefan Monnier, 2018/05/23
- Re: Message's text-properties in *Messages*, John Wiegley, 2018/05/25
- Re: Message's text-properties in *Messages*, Stefan Monnier, 2018/05/26
- Re: Message's text-properties in *Messages*, Amin Bandali, 2018/05/26
- Re: Message's text-properties in *Messages*, John Wiegley, 2018/05/27
- Re: Message's text-properties in *Messages*, Amin Bandali, 2018/05/27
- Re: Message's text-properties in *Messages* (was: edebug: regrettable loss of information in Emacs 26.1 when printing a variable's value), Eli Zaretskii, 2018/05/23
- Re: Message's text-properties in *Messages*,
Stefan Monnier <=
- Re: Message's text-properties in *Messages*, Eli Zaretskii, 2018/05/23
- Re: Message's text-properties in *Messages*, Eli Zaretskii, 2018/05/30
- Re: Message's text-properties in *Messages*, Stefan Monnier, 2018/05/30
- Re: Message's text-properties in *Messages*, Eli Zaretskii, 2018/05/30
- Re: Message's text-properties in *Messages*, Stefan Monnier, 2018/05/30
- Re: Message's text-properties in *Messages*, Eli Zaretskii, 2018/05/30