From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tyler Smith Newsgroups: gmane.emacs.help Subject: Re: a beginner's emacs troubles Date: 30 Jul 2007 12:22:05 GMT Organization: Sedgeboy Inc. Message-ID: References: <1185749317.489626.226270@22g2000hsm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1185799314 18859 80.91.229.12 (30 Jul 2007 12:41:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2007 12:41:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 30 14:41:48 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IFUZG-0007TI-R6 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 14:41:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFUZG-0003lB-2N for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 08:41:46 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!post01.iad01!news.aliant.net!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Lines: 33 Original-NNTP-Posting-Host: 142.177.124.17 Original-X-Complaints-To: abuse@aliant.net Original-Xref: shelby.stanford.edu gnu.emacs.help:150612 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46190 Archived-At: On 2007-07-30, Mathias Häbich wrote: > f33ldead@gmail.com wrote: > >> * There's something strange with the way tab works in emacs. In cc >> mode, I write a few letter then press and nothing happens! I'm not >> allowed to put tabs anywhere on the file! I also tried editing an >> empty file and I had no means of getting tab work!!! I just want my >> tabs back! > > It's not strange at all if you know what function the TAB key is bound > to. In cc-mode, it is c-indent-command, and in lisp-mode (the scratch > buffer's mode) it is lisp-indent-line. (C-h k TAB tells you this - very > useful!) > > What you want is probably tab-to-tab-stop, which is usually bound to M-i. > Before you start using tab-to-tab-stop, it might be worthwhile to play around with how the regular tab/c-indent-command works. What it does is automatically indent the current line according to a set of rules. The result is that it provides an easy way to keep your code consistently indented. It will know when you've entered a new code block, loop, or conditional, and indent appropriately. If you don't like the way it indents, there are way to customize the rules. I know it's awkward at first, but I really like it now. It can actually be handy in spotting syntax errors - a missing brace or semi-colon will produce obviously incorrect indentation, alerting you that you've left something out. My 2 cents, Tyler