emacs-devel
[Top][All Lists]
Advanced

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

Re: Redirecting messages (was: Proposed new core library: alert.el)


From: Daniel Colascione
Subject: Re: Redirecting messages (was: Proposed new core library: alert.el)
Date: Fri, 6 Nov 2015 01:31:51 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/06/2015 01:23 AM, Artur Malabarba wrote:
> On 5 Nov 2015 7:48 pm, "Ted Zlatanov" <address@hidden> wrote:
>>
>> Agreed.  But if alert.el doesn't support it now, it should have a way to
>> replace `message' so rather than asking every package to change, the
>> user just customizes one thing globally.
> 
> I don't think users will want to turn every single message into a
> desktop notification. The `message' function has always been a very
> non-intrusive approach, so it's used in very spammy ways sometimes.
> 
> That said, a way of redirecting messages via some arbitrary function
> is something that would be nice to have, and it's been mentioned
> lately here. I think Stefan was pushing for this a bit, specially when
> Oleh implemented the new inhibit-messages variable.
> 
> The right approach IMO is to
> 
> 1. move the current message function to `message-echo-area'
> 2. define a variable called `message-function', whose default value is
> #'message-echo-area
> 3. redefine the `message' function to just call the value of
> `message-function' and then log the string to the  *Messages* buffer

I wish we'd direct some love toward the streams system. There's no
reason that standard-output and a hypothetical message-output couldn't
be the same type of object and have the same semantics. A scheme like
this would also help modes like ielm provide a uniform way of capturing
command output.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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