unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: RE: 1) (elisp) `Advising Named Functions', 2) search filtering example
Date: Mon, 17 Oct 2016 10:05:51 -0700 (PDT)	[thread overview]
Message-ID: <14560de9-7ab9-4d97-80dd-d4b84274affb@default> (raw)
In-Reply-To: <jwvwph7asbo.fsf-monnier+gmane.emacs.devel@gnu.org>

> > Applying macro `add-function' to `isearch-filter-predicate'
> > advises the value - the function itself.
> No.
> 
> > It does not just point the variable to a different value
> > (function).
> Yes it does.

OK.

> > `(symbol-function isearch-filter-predicate)' returns an advice
> > (an object that satisfies "internal" predicate `advice--p').
> 
> No, it returns nil because this symbol is not defined as a function.

I did not quote that symbol.  But yes, you get an error because
the value of the variable is _not_ a symbol (anymore) - it is now
an advice object (an advised function, I was calling it).  It is a
thingy such as this - an advice of function `isearch-filter-visible'.

#[128 <some-byte-code> [apply (lambda (b e) (save-excursion
(goto-char e) (eolp))) isearch-filter-visible ((name . "eol")
(isearch-message-prefix . "eol, "))] 4 nil]

Dunno what you want to call such a thing.  I was calling it
an advised function (in this case, `isearch-filter-visible')
and an advice of that function, but yes, that function is not
advised outside this context - it is only variable
`isearch-filter-predicate' that uses that thingy.

To me, the new advice doc is not as helpful as it should be,
and the thingies dealt with are not clear or clearly presented.
Even the resort to "internalizing" functions such as `advice--p'
and `advice--cd*r' seems unfortunate.

I'm sure you understand it all very well, and no doubt there
are things about it that I do not understand well.  If you
cannot or will not, I'm still hoping that someone else will
improve the doc and make things clearer, for all.



  reply	other threads:[~2016-10-17 17:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  5:25 1) (elisp) `Advising Named Functions', 2) search filtering example Drew Adams
2016-10-17 12:20 ` Noam Postavsky
2016-10-17 14:02   ` Drew Adams
2016-10-17 14:37     ` Noam Postavsky
2016-10-17 14:52       ` Stefan Monnier
2016-10-17 15:40         ` Drew Adams
2016-10-17 15:51           ` Stefan Monnier
2016-10-17 17:05             ` Drew Adams [this message]
2016-10-17 17:47               ` Stefan Monnier
2016-10-17 15:40       ` Drew Adams
2016-10-17 16:16         ` Noam Postavsky
2016-10-17 17:05           ` Drew Adams
2016-10-17 17:53             ` Stefan Monnier
2016-10-17 18:41               ` Drew Adams
2016-10-17 19:25                 ` Stefan Monnier
2016-10-18 19:47                   ` Richard Stallman
2016-10-19  6:15                     ` Eli Zaretskii
2016-10-19 20:00                       ` Richard Stallman
2016-10-19 20:18                         ` Stefan Monnier
2016-10-20  7:17                           ` Eli Zaretskii
2016-10-20  7:06                         ` Eli Zaretskii
2016-10-20 18:06                           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14560de9-7ab9-4d97-80dd-d4b84274affb@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).