1. Computing & Technology

Discuss in my forum

Changing an Option

By , About.com Guide

Decoding: raw-text Encoding: raw-text-unix [INS] [DEL] File regexp: \.tar\' Choice: [Value Menu] Encoding/decoding pair: Decoding: no-conversion Encoding: no-conversion [INS] [DEL] File regexp: Choice: [Value Menu] Encoding/decoding pair: Decoding: undecided Encoding: nil [INS] [State]: this option is unchanged from its standard setting. Alist to decide a coding system to use for a file I/O operation. [Hide] The format is ((PATTERN . VAL) ...), where PATTERN is a regular expression matching a file name, [...more lines of documentation...]

Each association in the list appears on four lines, with several editable or "active" fields. You can edit the regexps and coding systems using ordinary editing commands. You can also invoke [Value Menu] to switch to a kind of value--for instance, to specify a function instead of a pair of coding systems.

To delete an association from the list, invoke the [DEL] button for that item. To add an association, invoke [INS] at the position where you want to add it. There is an [INS] button between each pair of association, another at the beginning and another at the end, so you can add the new association at any position in the list.

Two special commands, <TAB> and S-<TAB>, are useful for moving through the customization buffer. <TAB> (widget-forward) moves forward to the next active or editable field; S-<TAB> (widget-backward) moves backward to the previous active or editable field.

Typing <RET> on an editable field also moves forward, just like <TAB>. We set it up this way because people often type <RET> when they are finished editing a field. To insert a newline within an editable field, use C-o or C-q C-j.

Setting the option changes its value in the current Emacs session; saving the value changes it for future sessions as well. This works by writing code into your ~/.emacs file so as to set the option variable again each time you start Emacs. To save the option, invoke [State] and select the Save for Future Sessions operation.

If Emacs was invoked with the -q or --no-init-file options (see Initial Options), it will not let you save your customizations in your ~/.emacs init file. This is because saving customizations from such a session would wipe out all the other customizations you might have on your init file.

You can also restore the option to its standard value by invoking [State] and selecting the Erase Customization operation. There are actually three reset operations:

  • Reset
    If you have made some modifications and not yet set the option, this restores the text in the customization buffer to match the actual value.
  • Reset to Saved
    This restores the value of the option to the last saved value, and updates the text accordingly.
  • Erase Customization
    This sets the option to its standard value, and updates the text accordingly. This also eliminates any saved value for

©2012 About.com. All rights reserved.

A part of The New York Times Company.