Many Magit commands are implemented using popup buffers. First the user invokes a popup or prefix command, which causes a popup buffer with the available infix arguments and suffix commands to be displayed. The user then optionally toggles/sets some arguments and finally invokes one of the suffix commands.
This is implemented in the library
magit-popup. Earlier releases used
magit-key-mode. A future release will switch to a
yet-to-be-written successor, which will likely be named
magit-popup can also be used by other packages without having
to depend on all of Magit, it is documented in its own manual. See
This popup command shows a buffer featuring all other Magit popup commands as well as some other commands that are not popup commands themselves.
This command is also, or especially, useful outside Magit buffers, so you should setup a global binding:
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
Most popups set their initial arguments according to the corresponding
magit-*-arguments variable. Two popups, the log and diff popups
(see Logging and Diffing), may behave a bit differently, depending
on the value of
This option controls how diff and log commands reuse arguments from existing buffers.
t (the default value), the log or diff popup reuses the
arguments from the current repository’s log or diff buffer,
respectively. When no log or diff buffer exists for the current
repository, these popups use the default value of
current, log and diff popups will only reuse the arguments if
the current buffer is derived from
nil, the default value of
magit-diff-arguments is always used.