Next: , Previous: , Up: Forge User and Developer Manual   [Contents][Index]


5 Lists and Menus

Topics are listed in two sections in Magit’s status buffer, but can also be listed in dedicated buffers. Likewise individual topics can be visited in separate buffers. In both cases this can be done by placing the cursor on the respective section in the status buffer and typing RET, or by invoking the appropriate command from Forge’s main menu, on N (forge-dispatch).

List commands and corresponding menu commands exist for topics, notifications and repositories, but there isn’t always an exclusive mapping from menu to buffer. The main menu (forge-dispatch), the configuration menu (forge-configure), the menu which controls the current topic or the topic at point (forge-topic-menu), and the menu which controls the topics listed in the current buffer (forge-topics-menu), are useful in more than one major mode.

All of these menus feature bindings to directly switch to the other appropriate menus. So it is enough to remember that N always brings up the dispatch menu; you can always navigate to another menu from there.

C-c C-c brings up the most appropriate menu for the current buffer. In Magit’s status buffer the most appropriate menu is Magit’s own dispatch menu (magit-dispatch), so here the quickest way to invoke Forge’s dispatch menu is N. Even in Magit’s status buffer, when the cursor is an individual topic or on a topic list section, C-c C-c opens the respective menu (forge-topics-menu or forge-topic-menu).

The following sections describe most of the available menu and list commands. For forge-topic-menu, see Editing Topics.

Dispatch and configuration menus

N (forge-dispatch)

This prefix menu command is available in all Magit buffers and provides access to most of the available Forge commands. See the following sections for information about the available commands.

N m c (forge-configure)

This command displays a menu used to configure the current repository and some global settings as well.

Topic menu and list commands

N m f (forge-topics-menu)
C-c C-c [in topics list buffer/section]

This command displays a menu used to control the list of topics displayed in the current buffer.

Note that this command can not only be used in buffers dedicated to listing topics, but also in Magit’s status buffer.

N l t (forge-list-topics)

This command lists the current repository’s issues in a separate buffer. If the list buffer already exists, this command only ensures that all types of topics are listed. If any other filters are in effect, they are left intact. TODO fix preserving type

RET [on "Issues" status section] (forge-list-issues)

This command lists the current repository’s issues in a separate buffer. If the list buffer already exists, this command limits the list to issues. If any other filters are in effect, they are left intact.

RET [on "Pull requests" status section] (forge-list-pullreqs)

This command lists the current repository’s pull-requests in a separate buffer. If the list buffer already exists, this command limits the list to pull-requests. If any other filters are in effect, they are left intact.

N l g (forge-list-global-topics)

This command lists topics across all tracked repository. If the list buffer already exists, filters except for the type filter are left in effect.

Command: forge-list-global-issues

This command lists issues across all tracked repository. If the list buffer already exists, filters except for the type filter are left in effect.

Command: forge-list-global-pullreqs

This command lists pull-requests across all tracked repository. If the list buffer already exists, filters except for the type filter are in effect.

Notification menu and list commands

N m n (forge-notifications-menu)
C-c C-c

This command displays a menu used to control the list of notifications displayed in the current buffer.

N l n (forge-list-notifications)

This command lists all notifications for all forges in a separate buffer.

Repository menu and list commands

N m r (forge-repositories-menu)
C-c C-c

This command displays a menu used to control the list of repositories displayed in the current buffer.

N l r (forge-list-repositories)

This command lists all known repositories in a separate buffer. Here "known" means that an entry exists in the local database.

RET [on repository] (forge-visit-this-repository)

This commands visits the repository at point in a separate buffer.

o [in forge-repositories-menu] (forge-list-owned-repositories)

This command lists all known repositories that belong to the user in a separate buffer. Here "known" means that an entry exists in the local database. Only Github is supported for now.

The below options controls which repositories are considered to be owned by the user. They are additionally used by forge-fork.

User Option: forge-owned-accounts

This is an alist of accounts that are owned by you. This should include your username as well as any organization that you own.

Each element has the form (ACCOUNT . PLIST). The following properties are currently being used:

  • remote-name The default name suggested by forge-fork for a fork created within this account. If unspecified, then the name of the account is used.

Example: (("tarsius") ("emacsmirror" remote-name "mirror")).

User Option: forge-owned-ignored

This is a list of repository names that are considered to not be owned by you, even though they would have been considered to be owned by you based on forge-owned-accounts.

Exiting menus and lists

To exit a menu, type C-g. If the menu was invoked from another menu and that menu is useful in the current buffer, then that menu becomes active again. If that happens and you actually want to quit all menus, then just type C-g again. You can also directly exit all menus by using C-q, instead of C-g.

Type q to quit not only the menu, but also the list or topic detail buffer. That binding is also available when no menu is active, in which case it will simply quit the buffer. When invoked from a menu, then this binding may return to another list buffer, in which case some menu may also remain active.

Default topic filters

User Option: forge-status-buffer-default-topic-filters

This option specifies the filters initially used to limit topics listed in topic list buffers.

User Option: forge-status-buffer-default-topic-filters

This option specifies the filters initially used to limit topics listed in Magit status buffers.

Also see Topic sections in Magit status buffers.

Topic sections in Magit status buffers

Forge arranges for certain issues and pull-requests to be list in Magit status buffers, by adding the following functions to magit-status-sections-hook.

Which topics are listed initially is customizable using option forge-status-buffer-default-topic-filters and can be changed temporarily for the current buffer, using N m f (‘forge-topics-menu’).

Function: forge-insert-issues

This function inserts a list of issues, by default a list of "active" issues.

Function: forge-insert-pullreqs

This function inserts a list of pull-requests, by default a list of "active" pull-requests.

Forge used to provide additional functions to insert hard-coded topic subsets, but they were removed in favor of the more flexible approach described above. If you miss the removed sections, you can use the new forge-insert-topics helper function to define your own section inserter functions. See its docstring for more information.

If you don’t want any topic list sections to be displayed in Magit status buffers, set forge-add-default-sections to nil before magit is loaded.


Next: Visiting Topics, Previous: Getting Started, Up: Forge User and Developer Manual   [Contents][Index]