Next: , Previous: , Up: Interface Concepts   [Contents][Index]


4.3 Popup Buffers and Prefix Commands

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 the library magit-key-mode. A future release will switch to a yet-to-be-written successor, which will likely be named transient.

Because 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 (magit-popup)Top.

C-c C-c     (magit-dispatch-popup)

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 magit-use-sticky-arguments.

User Option: magit-use-sticky-arguments

This option controls how diff and log commands reuse arguments from existing buffers.

When 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 magit-log-arguments or magit-diff-arguments.

When current, log and diff popups will only reuse the arguments if the current buffer is derived from magit-log-mode or magit-diff-mode, respectively.

When nil, the default value of magit-log-arguments or magit-diff-arguments is always used.


Next: , Previous: , Up: Interface Concepts   [Contents][Index]