From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Multiple next-error sources Date: Fri, 7 Nov 2014 17:40:29 +0000 Message-ID: <20141107174029.GB2865@acm.acm> References: <86fvdwgxqs.fsf@yandex.ru> <20141106180815.207bf7ad@forcix> <20141107104914.17f04967@forcix> <20141107165551.GA2865@acm.acm> <545CFD05.6060104@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1415382114 14750 80.91.229.3 (7 Nov 2014 17:41:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 17:41:54 +0000 (UTC) Cc: Jorgen Schaefer , Helmut Eller , Stefan Monnier , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 07 18:41:47 2014 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 1XmnXd-0002qR-Fy for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 18:41:45 +0100 Original-Received: from localhost ([::1]:33157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmnXa-0005YL-Pt for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 12:41:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmnXF-0005XB-Kf for emacs-devel@gnu.org; Fri, 07 Nov 2014 12:41:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmnX8-0006Hl-5g for emacs-devel@gnu.org; Fri, 07 Nov 2014 12:41:21 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:31840 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmnX7-0006Hd-Mg for emacs-devel@gnu.org; Fri, 07 Nov 2014 12:41:14 -0500 Original-Received: (qmail 248 invoked by uid 3782); 7 Nov 2014 17:41:08 -0000 Original-Received: from acm.muc.de (pD951BADF.dip0.t-ipconnect.de [217.81.186.223]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 07 Nov 2014 18:41:07 +0100 Original-Received: (qmail 3195 invoked by uid 1000); 7 Nov 2014 17:40:29 -0000 Content-Disposition: inline In-Reply-To: <545CFD05.6060104@dancol.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 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:176542 Archived-At: Hello, Daniel. On Fri, Nov 07, 2014 at 05:10:29PM +0000, Daniel Colascione wrote: > On 11/07/2014 04:55 PM, Alan Mackenzie wrote: > > It would seem that the use of single functions, with `add-function' is > > inferior to the conventional hook mechanism in every way. What am I > > missing? In addition to the things cited by Daniel, there's: > > (i) the danger (near certainty) that somebody is going to use `setq' > > rather than `add-function' to configure it; > The same critique applies to regular hooks, doesn't it? :-) So it does! What I was confused about is foo-function. I think this is going to be a defun in the future, whereas up to now it's always been a defvar. This is confusing. So whereas you'd use "(setq c-backspace-function 'foobar)", and use `funcall' to invoke it, you'd say "(add-function 'foo-function 'foobar)" (or whatever), and just call `foo-function' as a function. > > (ii) the additional incompatibility with other Emacsen; > I'm not sure that compatibility with other Emacsen is as important as it > once was. AIUI, GNU Emacs is receiving the vast majority of development > effort. It may be less important than it was, but that's no reason for dismissing it altogether. > > (iii) the difficulty (or perhaps clumsiness) in looking at the contents > > of an advised function. There would seem to be nothing equivalent to > > M-: after-change-functions. > > So why are you changing from the conventional hook mechanism, which works > > so well? What is the advantage of the new scheme. > > Incidentally, I had a look at the documentation for add-advice, and > > there's a problem with it. "Advice" in English has no plural - there's > > no such word as "advices". If it's necessary to emphasize the plurality, > > then "pieces of advice" can be used. There's no such thing as "an > > advice", rather you'd say "some advice". It's a bit like you wouldn't > > refer to a lake as "a big water"; you'd say it contains "a lot of water". > > I think there's a term in linguistics for such a word, but I don't know > > it off hand. > I think "advise" ... "advice" ?? > ... works like "code" in the software sense and "furniture". The term > is "mass noun". Thanks! "Furniture" is indeed a better example than "water". > > Incidentally 2, the verb corresponding to the noun "advice" is "to > > advise". > Isn't English fun? Indeed it is! You get to appreciate it especially when you live in a place where they don't speak your native language (much). -- Alan Mackenzie (Nuremberg, Germany).