From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add `advice-remove-all` Date: Mon, 01 May 2017 13:21:36 -0400 Message-ID: References: <87y3ugwvx1.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493659357 18748 195.159.176.226 (1 May 2017 17:22:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 May 2017 17:22:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Marcin Borkowski Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 19:22:33 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 1d5F1t-0004o6-17 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 19:22:33 +0200 Original-Received: from localhost ([::1]:55192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5F1y-0008SV-P4 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 13:22:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5F1Q-0008SO-16 for emacs-devel@gnu.org; Mon, 01 May 2017 13:22:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5F1M-0000Ev-1C for emacs-devel@gnu.org; Mon, 01 May 2017 13:22:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:53123) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5F1L-0000DA-R8 for emacs-devel@gnu.org; Mon, 01 May 2017 13:21:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CbBwD6bQdZ/3Z8oWxdGgEBAQECAQEBAQgBAQEBg1VihCaFWoV/kFkrAZdQLIVyBAIChDpDFQECAQEBAQEBAWsohRUBAQEBAgFWIxALDiYSFBgNJIoqCA6wJ4sMAQEBAQYCASAFi1iKSAWdU4cblmGGc5JpgUQ1IoEKLiAILoU1HIF/JIksAQEB X-IPAS-Result: A0CbBwD6bQdZ/3Z8oWxdGgEBAQECAQEBAQgBAQEBg1VihCaFWoV/kFkrAZdQLIVyBAIChDpDFQECAQEBAQEBAWsohRUBAQEBAgFWIxALDiYSFBgNJIoqCA6wJ4sMAQEBAQYCASAFi1iKSAWdU4cblmGGc5JpgUQ1IoEKLiAILoU1HIF/JIksAQEB X-IronPort-AV: E=Sophos;i="5.37,401,1488862800"; d="scan'208";a="309797054" Original-Received: from 108-161-124-118.dsl.teksavvy.com (HELO ceviche.home) ([108.161.124.118]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 May 2017 13:21:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E7E32662E0; Mon, 1 May 2017 13:21:36 -0400 (EDT) In-Reply-To: <87y3ugwvx1.fsf@jane> (Marcin Borkowski's message of "Mon, 01 May 2017 15:26:02 +0200") 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:214498 Archived-At: >>> 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. Stefan PS: I don't think it's foolish, BTW.