GNU bug report logs - #17379
24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle of advice

Previous Next

Package: emacs;

Reported by: Le Wang <l26wang <at> gmail.com>

Date: Thu, 1 May 2014 02:59:02 UTC

Severity: normal

Tags: wontfix

Found in version 24.3.90.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17379 in the body.
You can then email your comments to 17379 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17379; Package emacs. (Thu, 01 May 2014 02:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Le Wang <l26wang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 01 May 2014 02:59:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Le Wang <l26wang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil in the middle
 of advice
Date: Wed, 30 Apr 2014 22:58:41 -0400
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 <at> 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




Added tag(s) wontfix. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Thu, 01 May 2014 03:55:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Thu, 01 May 2014 03:55:03 GMT) Full text and rfc822 format available.

Notification sent to Le Wang <l26wang <at> gmail.com>:
bug acknowledged by developer. (Thu, 01 May 2014 03:55:05 GMT) Full text and rfc822 format available.

Message #12 received at 17379-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Le Wang <l26wang <at> gmail.com>
Cc: 17379-done <at> debbugs.gnu.org
Subject: Re: 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
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17379; Package emacs. (Thu, 01 May 2014 11:22:01 GMT) Full text and rfc822 format available.

Message #15 received at 17379-done <at> debbugs.gnu.org (full text, mbox):

From: Le Wang <l26wang <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17379-done <at> debbugs.gnu.org
Subject: Re: bug#17379: 24.3.90.1 pretest: (ag-get-arg 0) somehow returns nil
 in the middle of advice
Date: Thu, 1 May 2014 07:21:26 -0400
On Wed, Apr 30, 2014 at 11:54 PM, Stefan Monnier
<monnier <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 29 May 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.