From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Proposed new core library: alert.el Date: Fri, 06 Nov 2015 11:20:58 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87twozyu8l.fsf@lifelogs.com> References: <87io5g2po3.fsf@lifelogs.com> <87y4ec19gm.fsf@lifelogs.com> <83a8qrsatb.fsf@gnu.org> <87bnb716um.fsf@lifelogs.com> <83mvurqg5m.fsf@gnu.org> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446826898 27108 80.91.229.3 (6 Nov 2015 16:21:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 16:21:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 17:21:29 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 1ZujlX-0000dl-B8 for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 17:21:27 +0100 Original-Received: from localhost ([::1]:39773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZujlW-0004yN-Ug for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 11:21:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZujlM-0004nv-Ok for emacs-devel@gnu.org; Fri, 06 Nov 2015 11:21:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZujlJ-00005W-AW for emacs-devel@gnu.org; Fri, 06 Nov 2015 11:21:16 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZujlJ-00005K-4O for emacs-devel@gnu.org; Fri, 06 Nov 2015 11:21:13 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZujlF-0000QD-6j for emacs-devel@gnu.org; Fri, 06 Nov 2015 17:21:09 +0100 Original-Received: from 98.229.60.157 ([98.229.60.157]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2015 17:21:09 +0100 Original-Received: from tzz by 98.229.60.157 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2015 17:21:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 67 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 98.229.60.157 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:L4jqIHD9F5EoHs9oBlDd8TO3vdY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:193453 Archived-At: On Fri, 06 Nov 2015 17:52:21 +0200 Eli Zaretskii wrote: >> From: Ted Zlatanov >> Date: Fri, 06 Nov 2015 10:32:33 -0500 >> >> On Fri, 06 Nov 2015 12:04:48 +0200 Eli Zaretskii wrote: >> EZ> I think it would make sense to provide an intermediate EZ> platform-independent layer for displaying alerts >> >> Yes, this is simply a `message' call. EZ> If 'message' could be told to display notifications, yes. But what EZ> you say is just the design; someone should write the code to implement EZ> it. I will, but gave you and others a chance to review my plan. >> I think the only thing missing is metadata and I would draw >> inspiration from syslog: level, facility, and tags. Then the >> *handler* should decide what to do with the message based on the >> metadata. EZ> Who sets up the handler in that scenario? After you install alert.el, you customize `message-handler' to `alert-message-handler'. The `message' function remains the same in C but gets diverted at the very top to a Lisp function. Artur's alternate proposal is to divert `message' itself through a variable. >> I'm not sure how to provide the metadata, and it should be ignored by >> the default (current) message handler. Maybe it could be string >> properties applied to the first parameter? I *need* to know this before >> writing code. EZ> What should be in the metadata? As I mentioned, the syslog-style metadata is probably enough: level, facility, and tags. >> So before I jump to implementation, this is the design I'm considering: ... EZ> That's just the infrastructure, AFAICT. The other part, i.e., what EZ> you describe in 2) above, still needs to be written, for this to be EZ> ready to use. Right? Yes, but the C changes can be made sooner and with less hassle. They are a new feature, too, so the whole thing may have to wait. On Fri, 6 Nov 2015 16:01:03 +0000 Artur Malabarba wrote: AM> While related to the original alert.el proposal, this is a whole new AM> discussion. Could we branch it off to another subject? Is there an alternate plan to bring in just alert.el? If not, maybe we can stay in the same thread... AM> I created another thread (called "Redirecting messages") with a AM> proposal as well. It's similar to Ted's, but with many small AM> differences. I just saw it, thank you. I think they are similar enough that it doesn't matter much which one we use, and my proposal is slightly simpler. So unless you have strong feelings about it, let's go with mine? Ted