From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Proposed new core library: alert.el Date: Sat, 7 Nov 2015 13:09:39 +0000 Message-ID: References: <87io5g2po3.fsf@lifelogs.com> <87y4ec19gm.fsf@lifelogs.com> <83a8qrsatb.fsf@gnu.org> <87bnb716um.fsf@lifelogs.com> <87si4ixabs.fsf@lifelogs.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1446901788 30002 80.91.229.3 (7 Nov 2015 13:09:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 13:09:48 +0000 (UTC) Cc: emacs-devel To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 07 14:09:47 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zv3Fa-0008My-D0 for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 14:09:46 +0100 Original-Received: from localhost ([::1]:43771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv3FZ-0006hT-Q9 for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 08:09:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv3FW-0006eo-4F for emacs-devel@gnu.org; Sat, 07 Nov 2015 08:09:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zv3FV-0005TM-42 for emacs-devel@gnu.org; Sat, 07 Nov 2015 08:09:42 -0500 Original-Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:34051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv3FU-0005T9-Q0 for emacs-devel@gnu.org; Sat, 07 Nov 2015 08:09:41 -0500 Original-Received: by lbbwb3 with SMTP id wb3so73965493lbb.1 for ; Sat, 07 Nov 2015 05:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=VG0FIgXSREBDiV+k3zAOJIiRaTqr2rBb1bpMBBsSqDw=; b=YwXhYd8czbZ06cpDg1sDgleUuI8SE4SmJ//KLOwduJO53+X0Z9QcJI2BdE5/d8HygA oanXyUOUkMk0jpUAcCtYlCQ7Gy5HFRHRfmNg8rrHLICSxhCt+X+a7cH0EqcOG8XMvB20 C4pCXW9AgEoN0/afN2gdRRheXn0AZAD0EEQwbJjQm0f0WJUS7yg3StDZHZKupCwWgqA0 RrKqWBmNoSe64ACh8xI37ZTzdJPlXjAHNCKFULbDcLNNjbGxFirplQCXekfb6f5n81Hi jqjgSRaCnYiz1J3P8vlR3WU1LUA76Wnt7EbyCdaCJr6WRkwgeQO9aChb1yPC91tq6ekE dSiQ== X-Received: by 10.112.184.196 with SMTP id ew4mr9525270lbc.17.1446901779953; Sat, 07 Nov 2015 05:09:39 -0800 (PST) Original-Received: by 10.112.63.70 with HTTP; Sat, 7 Nov 2015 05:09:39 -0800 (PST) In-Reply-To: <87si4ixabs.fsf@lifelogs.com> X-Google-Sender-Auth: PLHW2NBlYSqCAFv4p3MT2jgId-w X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193519 Archived-At: 2015-11-07 12:28 GMT+00:00 Ted Zlatanov : > 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.