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: [PATCH v3] RFC: eldoc-documentation-functions hook Date: Mon, 18 Jul 2016 22:47:17 -0400 Message-ID: References: <20160612061229.GA6463@holos.localdomain> <838tyahoim.fsf@gnu.org> <20160612182453.GA12034@holos.localdomain> <20160613211735.GA5969@holos.localdomain> <20160617210849.GA3775@holos.localdomain> <20160707033019.GA22360@holos.localdomain> <87oa5u63hq.fsf@udel.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468896466 17684 80.91.229.3 (19 Jul 2016 02:47:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2016 02:47:46 +0000 (UTC) Cc: John Wiegley , emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 19 04:47:37 2016 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 1bPL4I-0001uC-Gj for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2016 04:47:34 +0200 Original-Received: from localhost ([::1]:51568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPL4H-0000NT-GB for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2016 22:47:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPL47-0000L9-Fg for emacs-devel@gnu.org; Mon, 18 Jul 2016 22:47:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPL43-0001Ma-DW for emacs-devel@gnu.org; Mon, 18 Jul 2016 22:47:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPL43-0001MJ-9H for emacs-devel@gnu.org; Mon, 18 Jul 2016 22:47:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A/FgA731xV/3mcpUVcDoMCVF6CUIVVu0CBXIVvBAICgTw6EwEBAQEBAQGBCkEFg10BAQMBHTkjBQsLDiYSFBgNJIg3CA3PFgEBCAIgijiBAoUFB4QtBZA0hm2HdoZpiyuCFIFFI2GBBYFUWiIxAQEBgkQBAQE X-IPAS-Result: A0A/FgA731xV/3mcpUVcDoMCVF6CUIVVu0CBXIVvBAICgTw6EwEBAQEBAQGBCkEFg10BAQMBHTkjBQsLDiYSFBgNJIg3CA3PFgEBCAIgijiBAoUFB4QtBZA0hm2HdoZpiyuCFIFFI2GBBYFUWiIxAQEBgkQBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="248462762" Original-Received: from 69-165-156-121.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.165.156.121]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Jul 2016 22:47:18 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D1707AE2BB; Mon, 18 Jul 2016 22:47:17 -0400 (EDT) In-Reply-To: <87oa5u63hq.fsf@udel.edu> (Mark Oteiza's message of "Mon, 18 Jul 2016 17:27:45 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.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.21 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" Xref: news.gmane.org gmane.emacs.devel:205832 Archived-At: >>>>> Applied with some wording changes as 5811404 >>>> I don't think we have reached any consensus. >>> The problem is not just that it introduces a gratuitous incompatiblity, >>> but that it's a regression since you can't use things like :around nor >>> choose precedence (as in add-function's `depth') with add-hook. > There was never a need. But your change removes the possibility. Just because it hasn't been needed yet doesn't mean it won't be needed in the future. After all, eldoc has not seen much use so far. > Usually foo-function holds a function symbol. If one had a desire to > add-hook on foo-function whose value is #'bar, then perhaps bar should > run a hook; but then perhaps foo-function is just a layer of indirection > and you really should just have a hook. foo-function *is* a hook. >> - C-h v foo-function RET gives a value that's unreadable. That is true >> and we should improve it. I don't think there's anything really hard >> about doing so, so it's a transient motivation and it'd be better to >> fix `C-h v' than to circumvent the problem by using foo-functions. > Yes, we should not have to read bytecode or (at best) RTFS to decipher > what foo-function is doing. 100% Agreement. > Which is great if that flexibility is even necessary. The great thing about foo-function (along with add-function) is that you don't need to guess beforehand if it's going to be necessary. > The verbosity of writing advice isn't so bad; using advice even when the > circumstance doesn't call for it is. To cite an example, is the > following somehow different from just using setq-local? > http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/tex-mode.el#n1262 Yes, the use of add-function here is overkill. But this exact same setting would be just right for a minor mode (where using setq-local and kill-local-variable is painful and brittle). > PS: I'd have suggested a more graceful change like that of > pre-redisplay-function(s) > http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=84e0b7d As you can see, I'm not completely dogmatic about forcing the use of foo-function in place of foo-functions everywhere. In the case of pre-redisplay-function, the function does not return any value, so there's not much point in using things like :around, or :before-until. Stefan