From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Multiple next-error sources Date: Fri, 07 Nov 2014 16:08:39 +0000 Message-ID: <545CEE87.3060909@dancol.org> References: <20141102151524.0d9c665c@forcix> <20141102172944.0f7944e3@forcix> <20141103084433.12117c03@forcix> <86fvdwgxqs.fsf@yandex.ru> <20141106180815.207bf7ad@forcix> <20141107104914.17f04967@forcix> <545CE443.50502@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P6RNjqO7akROgIpg69SU0utrbEPK8gE7s" X-Trace: ger.gmane.org 1415376563 8781 80.91.229.3 (7 Nov 2014 16:09:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 16:09:23 +0000 (UTC) Cc: emacs-devel@gnu.org, Helmut Eller , Jorgen Schaefer To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 07 17:09:16 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 1Xmm68-0004Nq-KM for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 17:09:16 +0100 Original-Received: from localhost ([::1]:60864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm68-0003Wa-4d for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 11:09:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm5n-0003Nv-T7 for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:09:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xmm5h-0005eO-Fn for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:08:55 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:38892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm5h-0005dx-0k for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:08:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=BMpkxjSagJeWK8GdBXOJ2EJJrhKgAyFnq9TwJM+CA0k=; b=Sf23xjNrecuKP3r0johcegIyzyGyeRJWsNC/tI89YN8fpE32NYJWq+B5FMLniFdbqVVfAj9d66EzJZSaqXPyjDeLH+7IYt4qzuot/31Vp+F9cjlxER9h9vdq/ruRCs8zjJEtk4eb7bmnywbNP8q2NHKP+2BoNFSdyXxralpNrS+5JOSuQ4PfqlNL2i+S5qS61UtvLxZxdRgYVQaFhf4Epz8mHIt0N0ZcIIdlVdXWl3gRJSQwCe+hEpnTWw1yG1D6HBAoyxE32KQuKUA3EmXnQL2LEeno/RAITsZfvNZd74+mYtzdxKWaofuwxP5Zi+HSD3q71P/l6FSNGxrZ1lHe6Q==; Original-Received: from [199.201.65.2] (helo=[172.30.31.126]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Xmm5f-0003bx-Qe; Fri, 07 Nov 2014 08:08:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:176536 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --P6RNjqO7akROgIpg69SU0utrbEPK8gE7s Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 11/07/2014 03:55 PM, Stefan Monnier wrote: >> I strongly dislike this approach. It conflates customization points w= ith >> implementation details. Hook variables clearly separate the two ideas= =2E >=20 > foo-function *is* a customization point and not an implementation detai= l. >=20 > That's the difference between using add-function on a foo-function (a > customization point) and using advice-add on some function (some > implementation detail). Even the name is unintuitive. Realizing that you can add your own function to something called "foo-function" (singular) requires a special kind of comprehension of function composition. "So you're telling me that I add a function to a function and get a function?" The many add-function composition modes are useful for advice, but counterproductive for customization points: the great variety of options makes it hard to reason about the effect any particular effect. With a hook, you have a simple list of functions, possibly with a sentinel that delegates to a global value. I don't see any compelling reason to avoid conventional hooks. They've worked for many years. Requiring add-function for some customization and add-hook for others will only confuse users. It doesn't add any real power and doesn't make Emacs any better AFAICT. >> There's also no buffer-local add-function equivalent. >=20 > Of course there is: >=20 > (add-function :before-until (local 'next-error-function) #'my-functi= on) Okay, that actually works, including in some corner cases I tested involving before- and after-functions in both the buffer-local and global values. My other points still apply. --P6RNjqO7akROgIpg69SU0utrbEPK8gE7s Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUXO6HAAoJEN4WImmbpWBlXLwP/A9CM3aQ/HmojkADZWyUfuNH rxYrRYs4QTkJVNZCimmuUqiGOvvGKujOuCL1QkPiXDvjvOPXVuBEh0BkDvPYF7b5 a0YCHVRu1A6mUMo9Si9oha9ZF1ObpEtlTXrSvrqDTjC/0kH9ALhiAwPQh4kwt+Ri oU0leFItPFBX94exOMjQeSv8fTpiWVMXvUUcXntSeIm8ei9LymQ1oK2Dzo8XLNPZ K0FqI5kFFXgIPv0aCmQB6AGTf46OfJ7ocVtErbuvJkWlNDOc6qBsjjQFnBZFRwdx 3bCs+6gAvkm9jvi8XXO8Fd/6o3dL2tXwW9Zbr1lH/02pCWv+3RUhm07TQv4riiPu kRo7I7OBi6Y+FD8CAIKYRBtDrr44Js+mWr2x3PDt4C4J8SYD7xC+/JhliS1aaL2X LsSPA2ImABm+paEpq4cr0AGi1kEnMkV+jQz2+RNzx3IuS2TMOW5g2/N3y4G2bu3l YqB1jWDXyt2WDEDcfhEqMB7eOi93+6Vs3nwd4Xddk06cEt4DE2SisOellL1gIeh2 N8NYrZ9kB4CAEzqx57LRURl7f0BvnToIkUFZW1DcHty9/0rD0bqKLvga8Nsp7E0P jtGK1uhsq5ROk4kMPwv5BuJAi87LXgzAlaA5+qA650uoMKSQ8LVPE/pMH2OqwpNF hF9Q+S+gybz4oiZ/+Tf9 =JKd2 -----END PGP SIGNATURE----- --P6RNjqO7akROgIpg69SU0utrbEPK8gE7s--