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: message-function (was: Proposed new core library: alert.el) Date: Fri, 06 Nov 2015 13:10:33 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87d1vnyp5y.fsf_-_@lifelogs.com> References: <87io5g2po3.fsf@lifelogs.com> <87y4ec19gm.fsf@lifelogs.com> <83a8qrsatb.fsf@gnu.org> <87bnb716um.fsf@lifelogs.com> <83mvurqg5m.fsf@gnu.org> <87twozyu8l.fsf@lifelogs.com> 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 1446833484 8941 80.91.229.3 (6 Nov 2015 18:11:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 18:11:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 19:11:15 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 1ZulTn-0003E1-4f for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 19:11:15 +0100 Original-Received: from localhost ([::1]:40353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZulTm-0002af-Nq for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 13:11:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZulTL-0002ZN-TT for emacs-devel@gnu.org; Fri, 06 Nov 2015 13:10:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZulTH-0003fE-Sn for emacs-devel@gnu.org; Fri, 06 Nov 2015 13:10:47 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZulTH-0003ew-M7 for emacs-devel@gnu.org; Fri, 06 Nov 2015 13:10:43 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZulTF-0002nw-Qq for emacs-devel@gnu.org; Fri, 06 Nov 2015 19:10:41 +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 19:10:41 +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 19:10:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 43 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:ZerhxwDAmCrIMFKxjY+44gLbG8I= 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:193460 Archived-At: On Fri, 6 Nov 2015 17:56:00 +0000 Artur Malabarba wrote: AM> Redirecting messages is something that's come up before, and other AM> people who aren't following this thread might be interested. By AM> keeping the discussion here, we're hiding it from other people. I think "hiding" is a strong word for it. I am also not keen on a 3-month discussion of this simple change. AM> I'm cool with your proposal too, so feel free to go ahead. AM> There are just 2 points I do feel rather strongly about. AM> 1. The variable name should end in `-function', not `-handler' (that's AM> just the convention Emacs uses). OK, it will be `message-function'. AM> 2. The variable's default value should be a function (which implements AM> the default behaviour), not nil. Well, your point (2) is not exactly what I think is best. Your proposal requires a new `message-function-standard' name for the internal Fmessage(), and changes the current `message' completely. By contrast, my proposal has `message' calling Fmessage() (the current behavior) and then, iff `message-function' is set, doing something different. So it preserves the current behavior exactly. I think that's an important consideration for changing a very fundamental Emacs function. AM> Allowing a nil value is just going to make it harder for AM> users/packages to use the `add-function' mechanisms on this variable. AM> For instance, see the variable `font-lock-fontify-region-function'. AM> Its name ends in `-function', and its default value is AM> #'font-lock-default-fontify-region. That's the convention we should AM> follow with these variables. If the user wants to `add-function' on `message', they should `add-function' on `message'. I don't see why they care that `message-function' is nil or something else. But maybe I'm missing something here. I've been away from Emacs development for a bit. Ted