[Top][All Lists]

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

Re: Proposed new core library: alert.el

From: Artur Malabarba
Subject: Re: Proposed new core library: alert.el
Date: Sat, 7 Nov 2015 13:09:39 +0000

2015-11-07 12:28 GMT+00:00 Ted Zlatanov <address@hidden>:
> JW> Ted, I must have missed where this discussion about metadata came up. 
> alert.el
> JW> already has a facility for passing and consuming metadata. Would there be 
> a
> JW> need to consider another scheme also?
> OK, let me explain.  Looking at alert.el [...] >
> Most importantly, alert.el takes a plist, which is not compatible with
> message' To make it a standard interface, it should just take a string
> (with possibly some other parameters for format), hence my proposal to
> take the plist entries and pass them as string properties to the one
> required parameter. From alert.el, the work required would be to provide
> a `alert-message-handler' function which takes that string and converts
> it to the plist format.

I have no problem with using string properties for the tags, but I'd
like to raise a point with regards to the plist.

We can still use a plist if we want, as long as it comes after all of
the format arguments:

    (message "Hi %s, I'm %s." 'ted 'artur
             :severity :urgent)

Because `message' (and `format') actually does allow you to specify
more arguments than the number of % constructs, this is even backwards
compatible! So package authors could write this without worry that it
would barf on older Emacs.
Of course, using string properties is also backwards compatible. So we
should go with whichever method looks easier to use.

reply via email to

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