From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vijay Lakshminarayanan Newsgroups: gmane.emacs.help Subject: Re: Several beginner-questions Date: Fri, 29 Jul 2011 23:37:15 +0530 Message-ID: References: <201107242322.31639.vvmarko@gmail.com> <201107270357.06385.vvmarko@gmail.com> <201107282307.17607.vvmarko@gmail.com> <838vrhei0k.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312027511 30066 80.91.229.12 (30 Jul 2011 12:05:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2011 12:05:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 30 14:05:07 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qn8Hy-0002j1-5I for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2011 14:05:06 +0200 Original-Received: from localhost ([::1]:33539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn8Hx-0005Vo-G2 for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2011 08:05:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmrSv-0002oj-Nm for help-gnu-emacs@gnu.org; Fri, 29 Jul 2011 14:07:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmrSu-0000r8-QP for help-gnu-emacs@gnu.org; Fri, 29 Jul 2011 14:07:17 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:47626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmrSu-0000r4-LL for help-gnu-emacs@gnu.org; Fri, 29 Jul 2011 14:07:16 -0400 Original-Received: by iyb14 with SMTP id 14so5390625iyb.0 for ; Fri, 29 Jul 2011 11:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=bmzn9uV1CyCwgzd1k/lMyKnQjQxtS53pmHGe7NGUA6Y=; b=Nmxo+A6mIsY3QQTE5EWqIhLlUjoArGR04rp79zgUkB1lSHtpvDrA9SoVH3BQw6XRq8 4lEXAoepp/RFogSr7Y0XN8llzabd6NMjOt8IeBr8QE7lXkA4hzoYpZ84TWStFl5gN9tb K4D+mc5aTstEr2x50dVZObEaoLwDPseZ6nT6k= Original-Received: by 10.42.245.8 with SMTP id ls8mr1201346icb.280.1311962835366; Fri, 29 Jul 2011 11:07:15 -0700 (PDT) Original-Received: by 10.231.153.133 with HTTP; Fri, 29 Jul 2011 11:07:15 -0700 (PDT) In-Reply-To: <838vrhei0k.fsf@gnu.org> X-Google-Sender-Auth: OCW4pzSN3jwO4tPvZfFkwN56edY X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-Mailman-Approved-At: Sat, 30 Jul 2011 08:05:01 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81850 Archived-At: On Fri, Jul 29, 2011 at 11:38 AM, Eli Zaretskii wrote: >> If I set it to t, TAB does nothing. If I set it to nil, then it works as >> expected when I am in the middle of a line. However, if I am at the begi= nning >> of the line, I need to press it twice --- the first TAB is swallowed, th= e >> second TAB prints spaces. > > It's not swallowed. =C2=A0Emacs doesn't indent empty lines when you type > TAB. =C2=A0This is done by the newline-and-indent command, by default bou= nd > to the C-j (a.k.a. Linefeed) key. =C2=A0If you don't have such a key on > your keyboard (most modern keyboards don't), bind that command to the > Return key, like this: > > =C2=A0 =C2=A0 (global-set-key "\C-m" 'newline-and-indent) > I personally swap C-m and C-j. From my .emacs: (defun swap-cj-cm () (local-set-key (kbd "C-m") 'newline-and-indent) (local-set-key (kbd "C-j") 'newline)) (global-set-key (kbd "C-m") 'newline-and-indent) (global-set-key (kbd "C-j") 'newline) I use the function in some mode hooks that rudely set their own keybindings for C-m/C-j but for the most part, I swap the meanings of C-m and C-j to reflect my common usage. Hope it helps. --=20 Cheers ~vijay btw, am I the only one who feels that gnus is /way/ too simple and should be more complicated?