Next: , Previous: , Up: Sections   [Contents][Index]


4.2.4 Section Types and Values

Each section has a type, for example hunk, file, and commit. Instances of certain section types also have a value. The value of a section of type file, for example, is a file name.

Users usually do not have to worry about a section’s type and value, but knowing them can be handy at times.

H     (magit-describe-section)

This command shows information about the section at point in a separate buffer.

Command: magit-describe-section-briefly

This command shows information about the section at point in the echo area, as #<magit-section VALUE [TYPE PARENT-TYPE...] BEGINNING-END>.

Many commands behave differently depending on the type of the section at point and/or somehow consume the value of that section. But that is only one of the reasons why the same key may do something different, depending on what section is current.

Additionally for each section type a keymap might be defined, named magit-TYPE-section-map. That keymap is used as text property keymap of all text belonging to any section of the respective type. If such a map does not exist for a certain type, then you can define it yourself, and it will automatically be used.