Что такое Caret-At (^ @) под emacs?

1938
jww

Я привык видеть Карета-М (^ M) под Emacs. Но ниже я вижу Карет-Ат (^ @):

Что такое Caret-At (^ @) под emacs?

Файл был создан путем запуска тестовой программы Crypto ++ в OpenBSD с помощью команды ./cryptest.exe > cryptopp.txt. Странно то, что все строки в файле были созданы с помощью C ++ endl. И endlчувствителен к концу строки платформы, поэтому он получает вещи как CRи LFправильно.

Кажется, что Caret-At (^ @) должен быть везде или нигде.

Что такое Caret-At (^ @) и почему он отображается только в первой строке?

6

1 ответ на вопрос

6
DavidPostill

What is the Caret-At (^@)?

It is a null character (control-@, or ASCII 0) which emacs displays as ^@.


Why is it only showing up on the first line?

Because cryptest outputs them at this point.


Most characters are printing characters: when they appear in a buffer, they are displayed literally on the screen. Printing characters include ASCII numbers, letters, and punctuation characters, as well as many non-ASCII characters.

The ASCII character set contains non-printing control characters. Two of these are displayed specially: the newline character (Unicode code point U+000A) is displayed by starting a new line, while the tab character (U+0009) is displayed as a space that extends to the next tab stop column (normally every 8 columns). The number of spaces per tab is controlled by the buffer-local variable tab-width, which must have an integer value between 1 and 1000, inclusive. Note that how the tab character in the buffer is displayed has nothing to do with the definition of TAB as a command.

Other ASCII control characters, whose codes are below U+0020 (octal 40, decimal 32), are displayed as a caret (^) followed by the non-control version of the character, with the escape-glyph face. For instance, the control+A character, U+0001, is displayed as ^A.

Source 14.19 How Text Is Displayed

О, хорошо, я вижу. Я точно знаю, где это происходит. Я спустился в кроличью нору, потому что думал, что это конец строки .... jww 8 лет назад 0

Похожие вопросы