Skip to content

Base Arguments ​

6.7.1.1 Argument :indent ​

Supplies the INDENT macro. When INDENT is non-nil, then each line is individually indented with indent-according-to-mode during macro processing.

6.7.1.2 Argument :blank ​

Specifying this argument adds a special :blank handler at the beginning and end of the template. This handler will insert \n if the insertion point is not on a line by itself.

6.7.1.3 Argument :region ​

If there is an active region via transient-mark-mode, or mouse-drag-region, then the REGION section will be enabled.

In addition, REGIONTEXT will be set to the text in the region, and that region of text will be “killed” from the current buffer.

If standard-output is NOT the current buffer, then the region will not be deleted. In this way, you can safely use :region using templates in arbitrary output streams.

6.7.1.4 Argument :user ​

Sets up variables about the current user.

AUTHOR ​

Value of the Emacs function user-full-name

EMAIL ​

Current Emacs user’s email address.

LOGIN ​

Current Emacs user’s login name.

UID ​

Current Emacs user’s login ID.

EMACSINITFILE ​

This Emacs sessions’ init file.

6.7.1.5 Argument :time ​

Sets up variables with the current date and time.

YEAR ​

The current year.

MONTH ​

The current month as a number.

MONTHNAME ​

The current month name, unabbreviated.

DAY ​

The current day as a number.

WEEKDAY ​

The current day of the week as an abbreviated name

HOUR ​

The current hour in 24 hour format.

HOUR12 ​

The current hour in 12 hour format.

AMPM ​

Locale equivalent of AM or PM. Useful with HOUR12.

MINUTE ​

The current minute.

SECOND ​

The current second.

TIMEZONE ​

The timezone string.

DATE ​

The Locale supported date (%D).

TIME ​

The Locale supported time format (%X).

6.7.1.6 Argument :file ​

Sets up variables with details about the current file.

FILENAME ​

The filename without the directory part of the current buffer.

FILE ​

The filename without the directory or extension

EXTENSION ​

The filename extension.

DIRECTORY ​

The directory in which the current buffer resides.

MODE ​

Major mode of this buffer.

SHORTMODE ​

Major mode of this buffer without “-mode”. Useful for inserting the Emacs mode specifier.

section RCS ​

Show the section RCS if there is a CVS or RCS directory here.

6.7.1.7 Argument :system ​

Sets up variables with computer system information.

SYSTEMCONF ​

The “system-configuration”.

SYSTEMTYPE ​

The “system-type”.

SYSTEMNAME ​

The “system-name”.

MAILHOST ​

The name of the machine Emacs derived mail “comes from”.

6.7.1.8 Argument :kill ​

KILL ​

The top-most item from the kill ring.

KILL2 ​

The second item in the kill ring.

KILL3 ​

The third item in the kill ring.

KILL4 ​

The fourth item in the kill ring.