From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: Understanding Emacs and Tabs Date: Sat, 17 May 2003 22:02:39 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84smrdl4tc.fsf@lucy.is.informatik.uni-duisburg.de> References: <227a55e9.0305060728.582d5361@posting.google.com> <848yteq43p.fsf@lucy.is.informatik.uni-duisburg.de> <227a55e9.0305161206.1ec75044@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1053201909 24840 80.91.224.249 (17 May 2003 20:05:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 17 May 2003 20:05:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat May 17 22:05:08 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19H7vX-0006SM-00 for ; Sat, 17 May 2003 22:05:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19H7vm-0006MT-08 for gnu-help-gnu-emacs@m.gmane.org; Sat, 17 May 2003 16:05:22 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!p50877359.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 62 Original-NNTP-Posting-Host: p50877359.dip.t-dialin.net (80.135.115.89) Original-X-Trace: fu-berlin.de 1053201767 27201907 80.135.115.89 (16 [73968]) Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:cykOpssQMfOOcd1apzYJVylOSYg= Original-Xref: shelby.stanford.edu gnu.emacs.help:113344 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9838 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9838 pemente@northpark.edu (Eric Pement) writes: > kai.grossjohann@gmx.net (Kai Großjohann) wrote in message news:<848yteq43p.fsf@lucy.is.informatik.uni-duisburg.de>... >> pemente@northpark.edu (Eric Pement) writes: >> >> > Hi! I've just posted a web page entitled "Understanding GNU Emacs >> > and Tabs", which I hope to be of help to other users > [ ... ] > >> I wish it explained better about syntax-driven indentation. The key >> issue, I think, is that syntax-driven indentation can usually be >> configured to the user's liking. And once that has happened, it is a >> useful time-saver. > > That's something that I need to learn more about, but I haven't > got enough experience to understand it well enough to explain it > to others. My main experience is with web programming languages > (HTML, XML, Perl, PHP, JavaScript, etc.). Hm, okay. Indentation of HTML and XML is a thorny issue, because there are at least three different modes out there and each of them handles indentation differently. The key thing to remember about syntax-driven indentation is that it works differently in each mode, because the syntax is different in each mode. >> Another detail that might be useful is the variable >> c-tab-always-indent. > > I will try to work it in there, but my thought was that perhaps > this variable is used only for C programming? For Perl, there are also two modes, perl-mode and cperl-mode, and cperl-mode has a variable cperl-tab-always-indent. Not sure about perl-mode. So there are some modes which have similar variables. > I use Emacs more frequently for HTML, outline-mode, plain text, so I > assumed that maybe c-tab-always-indent was not used that often. I see. Well, C programmers will have a different opinion :-) > My more frequent frustrations happen when I'm editing my .emacs file > (Lisp-mode) and the TAB key doesn't seem to work like I expect. So > I've developed a habit of just using the spacebar to do all my > indentation. What do you expect from the TAB key? And what does it do? FWIW, I use TAB for syntax driven indentation in all modes, and I use M-i to advance to the next tab stop. For me, tab-stop-list contains multiples of 8, so M-i conveniently inserts a tab character if indent-tabs-mode is t. Then if in some modes TAB in the middle of a line does not indent, I try to find out how to make it so. And if that is not possible, I just use TAB at the beginning of the line in those modes. -- This line is not blank.