unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice
@ 2014-05-01  2:58 Le Wang
  2014-05-01  3:54 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Le Wang @ 2014-05-01  2:58 UTC (permalink / raw)
  To: 17379

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.

-----------------------------------------------------

Repro steps

1. clone git@github.com:lewang/flx.git
2. switch to branch "test-bug-report"
3. open "flx-ido.el"
4. follow installation instructions: in header
https://github.com/lewang/flx/blob/test-bug-report/flx-ido.el#L48-54
5. press "C-x b"
6. Look at "*Messages*" buffer.

The advice isn't complicated I have no idea what's going on there.


-- 
Le





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice
  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
  2014-05-01 11:21   ` Le Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-05-01  3:54 UTC (permalink / raw)
  To: Le Wang; +Cc: 17379-done

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice
  2014-05-01  3:54 ` Stefan Monnier
@ 2014-05-01 11:21   ` Le Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Le Wang @ 2014-05-01 11:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17379-done

On Wed, Apr 30, 2014 at 11:54 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> 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.

Ahh.  I completely missed that items binding.  It makes sense now.

Thanks!

-- 
Le





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-01 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-05-01 11:21   ` Le Wang

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).