From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Multiple next-error sources Date: Fri, 07 Nov 2014 11:03:17 -0500 Message-ID: References: <20141102151524.0d9c665c@forcix> <20141102172944.0f7944e3@forcix> <20141103084433.12117c03@forcix> <86fvdwgxqs.fsf@yandex.ru> <20141106180815.207bf7ad@forcix> <20141107104914.17f04967@forcix> <20141107164136.5827f061@forcix> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415376247 2700 80.91.229.3 (7 Nov 2014 16:04:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 16:04:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jorgen Schaefer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 07 17:04:00 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 1Xmm0u-00079O-Bg for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 17:03:52 +0100 Original-Received: from localhost ([::1]:60832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm0t-0005iL-Pi for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2014 11:03:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm0V-0005hu-5j for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:03:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xmm0N-0003Cv-Ag for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:03:27 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:31035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmm0N-0003C1-6T for emacs-devel@gnu.org; Fri, 07 Nov 2014 11:03:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4MAOatTlRLd+sd/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCw4mEhQYDSSISwnLcgEBAQEGAQEBAR6RCAeESwWLZI0umQ6Bb4QWH4J6AQEB X-IPAS-Result: Au4MAOatTlRLd+sd/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCw4mEhQYDSSISwnLcgEBAQEGAQEBAR6RCAeESwWLZI0umQ6Bb4QWH4J6AQEB X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="96210019" Original-Received: from 75-119-235-29.dsl.teksavvy.com (HELO pastel.home) ([75.119.235.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Nov 2014 11:03:17 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A11D28874; Fri, 7 Nov 2014 11:03:17 -0500 (EST) In-Reply-To: <20141107164136.5827f061@forcix> (Jorgen Schaefer's message of "Fri, 7 Nov 2014 16:41:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:176534 Archived-At: > With a hook variable, I can C-h v the variable and clearly see what is > happening in which order. Indeed, this is a downside of add-function. If you know what you're looking at, you can kind of figure out what's going on, but it's definitely in the "I feel like I'm decrypting rather than reading" category. Of course, you can use advice-function-mapc to extract the info and turn it into a normal list, but I didn't bother to write such a function, nor to hook it into C-h v. Patches welcome ;-) > I can also easily use setq or delq to change > the order if I find it problematic. You can "delq" with remove-function. I don't think there's a real equivalent of "setq", OTOH. > New functions likely want to be added in the middle, so visible > compilation buffers take precedence, but non-visible ones are chosen > last. Is there a way using add-function to add a new function in > between two existing functions? You can specify a `depth' property, yes. > Finally, hook variables can be added to customize to make them more > easily accessible to users. Is there some sort of customize support for > add-function, like there is for hooks/lists of functions? Currently, no. Stefan