2

How do I get Emacs to report which packages in my running Emacs depend on magit-popup?

Soon Magit will stop supporting magit-popup because it has transitioned to the replacement transient. Somehow Magit (in preparation for version 3.0.0) is detecting a dependency on magit-popup and warns about this repeatedly, to the point of making Magit unusable.

As described in this GitHub issue the message is written considerately and is well intentioned, but does not give any guidance on how to figure out which package has the dependency on magit-popup.

That GitHub issue resolves when the reporter finds a dependency in their local Emacs configuration. I've searched my local config, and I don't find any dependencies on magit-popup so I seem to be stuck.

Maybe I need to get Emacs itself to tell me at run-time what's causing this apparent dependency?

Assuming I know nothing about debugging Emacs Lisp, how do I track down exactly what is causing this magit-popup dependency to the precision where I know exactly what to remove and/or file bug reports against?

  • You've followed the advice to use M-x rgrep and turned up no instances of the text magit-popup at all? – phils Jul 15 at 1:00
  • There are instances, but they're in things like themes listing the modes they will colourise. I don't want to rely on a brute grep, instead I'm asking: How do I get Emacs to tell me precisely where the dependency is? – bignose Jul 15 at 1:05
3

The function which produces that warning is magit--magit-popup-warning.

You can use M-x debug-on-entry RET magit--magit-popup-warning RET to discover what is causing it to be called.

See C-hig (elisp)Debugger Commands for what you can do from inside the debugger, and how to exit it.

Use M-x cancel-debug-on-entry if you don't want that to happen any more.


Using M-x rgrep to search in your Emacs config for the following regexp will probably produce all of the relevant results, as well:

magit-\(define\|change\|remove\)-popup

You can see the complete list of targeted functions at the end of the magit-obsolete.el library, via M-x find-library.

| improve this answer | |
  • 1
    Beautiful! debug-on-entry leads me straight to the culprit, magithub. Now I can follow the warning's advice and report a bug. – bignose Jul 15 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.