From owner-freebsd-questions@FreeBSD.ORG Mon Oct 30 08:12:00 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2213216A403 for ; Mon, 30 Oct 2006 08:12:00 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C9E243D55 for ; Mon, 30 Oct 2006 08:11:58 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9U8BWKi029064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 30 Oct 2006 10:11:36 +0200 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9U8C6UB016088; Mon, 30 Oct 2006 10:12:06 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9U8C54P016087; Mon, 30 Oct 2006 10:12:05 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 30 Oct 2006 10:12:05 +0200 From: Giorgos Keramidas To: Noah Message-ID: <20061030081205.GB15874@gothmog.pc> References: <45425D61.6030209@enabled.com> <4542607E.8020101@mac.com> <45429451.3040706@enabled.com> <45429608.9090704@mac.com> <4542969E.1060903@enabled.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4542969E.1060903@enabled.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.544, required 5, AWL -0.15, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: "Peter A. Giessel" , freebsd-questions@freebsd.org Subject: Re: replacing ^M with emacs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 08:12:00 -0000 On 2006-10-27 16:30, Noah 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 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 , 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 :-)