Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 10:12:05 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Noah <admin2@enabled.com>
Cc:        "Peter A. Giessel" <pgiessel@mac.com>, freebsd-questions@freebsd.org
Subject:   Re: replacing ^M with emacs
Message-ID:  <20061030081205.GB15874@gothmog.pc>
In-Reply-To: <4542969E.1060903@enabled.com>
References:  <45425D61.6030209@enabled.com> <4542607E.8020101@mac.com> <45429451.3040706@enabled.com> <45429608.9090704@mac.com> <4542969E.1060903@enabled.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-10-27 16:30, Noah <admin2@enabled.com> wrote:
> 
> Thanks Peter,
> 
> where is the logic here?  What is control-q for and what is control-j 
> for?  I am trying to figure out how I could have figured that out.
> 
> also is there a better page than the one I am using below to figure all 
> these keystrokes out?
> 
> http://www.math.uh.edu/~bgb/emacs_keys.html

`C-q' is an Emacs-specific prefix for `quoting' the next
character when you are inserting text.  This way, you can enter
special characters, like C-a, C-b, C-c, ... C-z while you are
typing text.  Just hitting the respective control-key combination
may be bound to an Emacs command.  The relevant text from the
Emacs manual describes this much better than me:

       Only printing characters and <SPC> insert themselves in
    Emacs.  Other characters act as editing commands and do not
    insert themselves.  These include control characters, and
    characters with codes above 200 octal.  If you need to insert
    one of these characters in the buffer, you must "quote" it by
    typing the character `Control-q' (`quoted-insert') first.
    (This character's name is normally written `C-q' for short.)
    There are two ways to use `C-q':
       
       * `C-q' followed by any non-graphic character (even `C-g')
         inserts that character.
    
       * `C-q' followed by a sequence of octal digits inserts the
         character with the specified octal character code.  You
         can use any number of octal digits; any non-digit
         terminates the sequence.  If the terminating character
         is <RET>, it serves only to terminate the sequence.  Any
         other non-digit terminates the sequence and then acts as
         normal input--thus, `C-q 1 0 1 B' inserts `AB'.
    
         The use of octal sequences is disabled in ordinary
         non-binary Overwrite mode, to give you a convenient way
         to insert a digit instead of overwriting with it.

This is from section 8.1 (Inserting Text), of the Emacs 22 manual.

I hope this helps :-)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061030081205.GB15874>