From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: 1) (elisp) `Advising Named Functions', 2) search filtering example Date: Mon, 17 Oct 2016 08:20:31 -0400 Message-ID: References: <5a44a850-e4fc-4c9f-a266-c74766810ba1@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476706890 2796 195.159.176.226 (17 Oct 2016 12:21:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2016 12:21:30 +0000 (UTC) Cc: emacs-devel To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 17 14:21:25 2016 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 1bw6uo-0007II-TM for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2016 14:21:15 +0200 Original-Received: from localhost ([::1]:60989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw6up-0003ap-Lm for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2016 08:21:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw6uA-0003aj-Do for emacs-devel@gnu.org; Mon, 17 Oct 2016 08:20:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw6u9-0004h8-DW for emacs-devel@gnu.org; Mon, 17 Oct 2016 08:20:34 -0400 Original-Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:33845) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bw6u9-0004gk-6y for emacs-devel@gnu.org; Mon, 17 Oct 2016 08:20:33 -0400 Original-Received: by mail-oi0-x22a.google.com with SMTP id t73so209853758oie.1 for ; Mon, 17 Oct 2016 05:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=ymY1K29eX5HkbjKWcNwW0F+9zjeBBYaarrr2csYXJY8=; b=PvUAvibrTqcIVMMQWXsraY3stWpanuAGvTK22aEdA0cMU1zixii6Qa+OPX/xcZhqgb 4K8/sErHFCHuiopqA43ODOlmhXE6CtxAmw6u4MCOEg84lt33KGNVeHJ8JeM++miDqElW BdWCmsNWxkoblg9XaozbDZgZEXdwEFN7I7EkFDKQ2QnaS1w79WY6f29be0BRfkecqg/5 xeBWKZ95TSdeAXskFEI1Icu7HhKwmRe3qLCDgjjBToY2bnE4MoPdg5V+xJGY2ZnxotVq l5YcFOpnYXELPrUqGFdKi16QApGUOkwNCOu/cOMlJC0pKnwLZl7wCEeC7gEeRmkXRXHI 5XXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=ymY1K29eX5HkbjKWcNwW0F+9zjeBBYaarrr2csYXJY8=; b=XN8b7KQJKRzMhryGPqo/V6vLhnQiQqXDUDoMuWIcAitw8D3HwWS6OCJRXLNpYW0Mzi RcgrbWDMF7R98/KFM/h5oKTBOKzq+UpAIFWnuFX0fgklhJLcK2gdgVJG8koiG6oERmzA CuUOZt2d56ye3ZmVgic54t0byRbXnDJiVtNZRnbpY/WX9m4DEqbmYXiSW4tn9hITKvBQ 2CE7vtadb+7SeUgIsx3b+UQ8u5WBRC75k6SCytA72R70MbirqD9IkVLgWMRf2PBv3Ujh pRyEXV0w8dZJQWY6B5s3nKJpfOWDK0UpA/tfSv7/zBupNxap2bKlRf1boy2uYDMXUQnD EUxg== X-Gm-Message-State: AA6/9RkGIiGzarvTi2Zndut7u1rKVCEPaA3orRO+U8zdCBaMqAogEH/dCFGOc8E+y19n8pZWG0DhWies51uQcA== X-Received: by 10.157.54.230 with SMTP id s35mr11402707otd.169.1476706831440; Mon, 17 Oct 2016 05:20:31 -0700 (PDT) Original-Received: by 10.157.29.239 with HTTP; Mon, 17 Oct 2016 05:20:31 -0700 (PDT) In-Reply-To: <5a44a850-e4fc-4c9f-a266-c74766810ba1@default> X-Google-Sender-Auth: vVRbnu_VWw-yhKdvZIYGEQI1Woc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22a 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:208351 Archived-At: On Mon, Oct 17, 2016 at 1:25 AM, Drew Adams wrote: > 1. Node `Advising Named Functions' of the Elisp manual says this: > > For these reasons, advice should be reserved for the cases > where you cannot modify a function=E2=80=99s behavior in any other way. > If it is possible to do the same thing via a hook, that is > preferable. ... > > In particular, Emacs=E2=80=99s own source files should not put advice > on functions in Emacs. (There are currently a few exceptions > to this convention, but we aim to correct them.) > > Is that still true? Is this the policy, even with the new > advice system? > > If so, then it seems that it is being ignored, as new advice > has been added to `isearch-filter-predicate' in `dired-aux.el' > and `wdired.el'. `advice-add' puts advice on a function, `add-function' does not. `isearch-filter-predicate' is not a function, it's a variable containing a function value.