1

What does -UUU:----F1 exactly mean in a terminal Emacs mode-line?

I have heard, that U means somethings like UTF-16, but why are there three U's? What is F1 for? Why are there -?

2

1 Answer 1

3

The Emacs manual section on the Mode Line says:

   The text displayed in the mode line has the following format:

      CS:CH-FR  BUF      POS LINE   (MAJOR MINOR)

On a text terminal, this text is followed by a series of dashes
extending to the right edge of the window.  These dashes are omitted on
a graphical display.

   The CS string and the colon character after it describe the character
set and newline convention used for the current buffer.  Normally, Emacs
automatically handles these settings for you, but it is sometimes useful
to have this information.

   CS describes the character set of the text in the buffer (*note
Coding Systems::).  If it is a dash (‘-’), that indicates no special
character set handling (with the possible exception of end-of-line
conventions, described in the next paragraph).  ‘=’ means no conversion
whatsoever, and is usually used for files containing non-textual data.
Other characters represent various “coding systems”—for example, ‘1’
represents ISO Latin-1.

   On a text terminal, CS is preceded by two additional characters that
describe the coding systems for keyboard input and terminal output.
Furthermore, if you are using an input method, CS is preceded by a
string that identifies the input method (*note Input Methods::).

So the three Us signify the coding systems for keyboard input, terminal output and the text in the buffer resp.

The dashes are just placeholders (or separators or fillers in some cases): the placeholders get replaced by other characters to indicate some special condition. E.g. the two dashes after the colon indicate whether a buffer has been modified or is read-only:

   The next element on the mode line is the string indicated by CH.
This shows two dashes (‘--’) if the buffer displayed in the window has
the same contents as the corresponding file on the disk; i.e., if the
buffer is unmodified.  If the buffer is modified, it shows two stars
(‘**’).  For a read-only buffer, it shows ‘%*’ if the buffer is
modified, and ‘%%’ otherwise.

F1 is the name of the frame:

   FR gives the selected frame name (see Frames).  It appears only
on text terminals.  The initial frame’s name is ‘F1’.

For the meaning of U, follow the Coding Systems link: that will take you to a different section of the manual which says (among a lot more):

To display a list of all the supported coding systems, type ‘M-x
list-coding-systems’. The list gives information about each coding system, including the letter that stands for it in the mode line (see Mode Line).

If you do M-x list-coding-systems, you will see a long list and a bunch of them are labeled U: UTF-8, UTF-7, UTF16 koi-8-u. To see which one, say M-x describe-current-coding-system - in my case, I get:

Coding system for saving this buffer:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Default coding system (for new files):
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Coding system for keyboard input:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Coding system for terminal output:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Coding system for inter-client cut and paste:
  nil
Defaults for subprocess I/O:
  decoding: U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

  encoding: U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.