[comp.emacs] Control Characters

bwild@foxi.uka.de (Bernd Wild) (11/20/90)

Is there a way to include control characters in an EMACS buffer
or the .emacs Lisp source like <control> or <return> or <linefeed>
or the octal representation of a character??

Bernd.


==============================================================================
Bernd Wild                                                    bwild@fzi.uka.de
Forschungszentrum Informatik FZI
Dept. Technical Expert Systems and Robotics
Haid-und-Neu-Strasse 10-14
D - 7500 Karlsruhe 
GERMANY                                         Tel.: (+49 | 0) 721 / 6906-310
==============================================================================

rbv@cypress.UUCP (Roger Vanderveen) (11/21/90)

In article <90.324.12:11:43@ira.uka.de> bwild@foxi.uka.de (Bernd Wild) writes:
 >Is there a way to include control characters in an EMACS buffer
 >or the .emacs Lisp source like <control> or <return> or <linefeed>
 >or the octal representation of a character??

Certainly.  To enter control-A you can specify it in a string as "\001" or
"\C-a".

Similarly, you can specify "meta" characters as octal (z.B. meta k is "\353")
or as "\M-k".
-- 
===============================================================================
Roger Vanderveen                                    rbv@cypress.UUCP or
San Jose, CA USA                                    rbv%cypress@daver.bungi.com
===============================================================================

kell@cs.albany.edu (Brian A. Kell) (11/21/90)

In article <599@cypress.UUCP>, rbv@cypress.UUCP (Roger Vanderveen) writes:
> In article <90.324.12:11:43@ira.uka.de> bwild@foxi.uka.de (Bernd Wild) writes
>  >Is there a way to include control characters in an EMACS buffer
>  >or the .emacs Lisp source like <control> or <return> or <linefeed>
>  >or the octal representation of a character??
> Certainly.  To enter control-A you can specify it in a string as "\001" or
> "\C-a".

You can also use the 'quoted-insert' function, usually bound to the ^Q key.
Thus, to insert a ^L (page break) character into your buffer, you type:  ^Q^L.
Like this one (inserted using emacs):

This is useful for, e.g., finding pairs of carriage returns between paragraphs
by searching for ^Q^J^Q^J, where ^J is the newline character.

Brian Kell
SUNY/Albany Department of Computer Science
brian@isadora.albany.edu
bk7295@albnyvms.bitnet

mleisher@nmsu.edu (Mark Leisher) (11/21/90)

C-q followed by the control character you want.
Example: C-qC-m inserts a <return>
-----------------------------------------------------------------------------
mleisher@nmsu.edu                      "I laughed.
Mark Leisher                                I cried.
Computing Research Lab                          I fell down.
New Mexico State University                        It changed my life."
Las Cruces, NM                     - Rich [Cowboy Feng's Space Bar and Grille]