unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Le Wang <l26wang@gmail.com>
Cc: 17379-done@debbugs.gnu.org
Subject: bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice
Date: Wed, 30 Apr 2014 23:54:48 -0400	[thread overview]
Message-ID: <jwv61lqp386.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CAM=K+iqTzQMeurmZmP1FRbUuJfrh-Aty5YiRrUJYCLBwq37rwA@mail.gmail.com> (Le Wang's message of "Wed, 30 Apr 2014 22:58:41 -0400")

tags 17379 wontfix
thanks

> Ok the repro steps are very specific.  I've tried to make a simpler
> repro, but could not with the time I had.
> The important 2 line of code is here:
> https://github.com/lewang/flx/blob/test-bug-report/flx-ido.el#L226-227
> The advice around it is very basic.  The only interesting thing is
> after (setq test (ad-get-arg 0))
> test is nil, but original-items is correct.

The arglist of ido-set-matches-1 is (items &optional do-full), so
(ad-get-arg 0) is `items', which you have rebound to nil.

AFAICT, this bug is very old.  And, AFAICT, you can't fix it without
breaking backward compatibility.  The new advice mechanism in 24.4
(i.e. advice-add) does not suffer from these problems, tho.


        Stefan





  reply	other threads:[~2014-05-01  3:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01  2:58 bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice Le Wang
2014-05-01  3:54 ` Stefan Monnier [this message]
2014-05-01 11:21   ` Le Wang

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=jwv61lqp386.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17379-done@debbugs.gnu.org \
    --cc=l26wang@gmail.com \
    /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).