bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21798: 25.0.50; [PATCH] Add support for retrieving paths to JSON ele


From: Dmitry Gutov
Subject: bug#21798: 25.0.50; [PATCH] Add support for retrieving paths to JSON elements
Date: Sat, 7 Nov 2015 15:43:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0

On 11/07/2015 03:23 PM, Richard Stallman wrote:

The reason that Emacs sources should not use advice is that advice is
bad for debugging.  If you look at function foo's source code, it
won't tell you that advice is causing the function to do something not
in that source.

Yes still, if we support advice in the user code, we should be able to debug the result. One doesn't usually just reads the source code when debugging Emacs; edebug is very helpful in that, and it seems to support advice.

This problem occurs no matter how long the advice is on function foo.

I don't think it's black-and-white: if an advice is only active during execution of just one or two commands, we don't have to worry about it most of the time. Neither when debugging, nor when running the code.

The right thing to do, instead of using advice on foo, is to change
foo to call a hook, and put things in that hook.

I agree it will be a simpler solution, if we can choose a meaningful place and name for the hook, and if there's no performance hit.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]