From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add `advice-remove-all` Date: Tue, 02 May 2017 07:31:23 +0200 Message-ID: <87wp9zx1sk.fsf@jane> References: <87y3ugwvx1.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493703107 15116 195.159.176.226 (2 May 2017 05:31:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 May 2017 05:31:47 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 02 07:31:42 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5QPV-0003oS-Ui for ged-emacs-devel@m.gmane.org; Tue, 02 May 2017 07:31:42 +0200 Original-Received: from localhost ([::1]:56793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5QPb-0004Y6-GH for ged-emacs-devel@m.gmane.org; Tue, 02 May 2017 01:31:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5QOf-0004Wp-HQ for emacs-devel@gnu.org; Tue, 02 May 2017 01:30:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5QOc-0003CJ-Ex for emacs-devel@gnu.org; Tue, 02 May 2017 01:30:49 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:58567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5QOc-0003AS-8g for emacs-devel@gnu.org; Tue, 02 May 2017 01:30:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id A67EEE655E; Tue, 2 May 2017 07:30:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D4cPxp2S25Dm; Tue, 2 May 2017 07:30:40 +0200 (CEST) Original-Received: from localhost (gra4.internetdsl.tpnet.pl [83.3.182.4]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 8E3F7E604C; Tue, 2 May 2017 07:30:39 +0200 (CEST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 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:214506 Archived-At: On 2017-05-01, at 19:21, Stefan Monnier wrote: >>>> I recently had the need to remove all advice from a function I was playing >>>> around with, and was surprised to find that `advice-remove-all` did not >>>> exist. >>> Do you have a use-case? >>> In the case of https://emacs.stackexchange.com/questions/24657, my >>> impression that all that was needed is an interactive `advice-remove` >>> which provides completion (so that to remove all pieces of advice, you >>> may have to use this command a few times, maybe, but it's rather rare). >> Would that work when I (quite foolishly, I admit) advised something with >> an anonymous function? > > In the absence of actual code, I can only say that it could work. > Clearly, it would be better to write the code so that it does. Of course. Maybe I'll try to do that... > Stefan > > PS: I don't think it's foolish, BTW. Well, it seems to me it is: showing the value of such a hook is less-than-optimal and removing the lambda from it _might_ be tricky. Best, -- Marcin Borkowski