From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: indentation, setting variables, commands, and M-x Date: Fri, 3 Feb 2006 10:53:41 +0100 Message-ID: <8D0D8836-13FC-4F5F-B7C7-7946A12F4F18@Web.DE> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1138983305 24393 80.91.229.2 (3 Feb 2006 16:15:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2006 16:15:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 03 17:14:59 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F53Yd-0002WS-UY for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2006 17:13:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F53YI-0002st-0H for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2006 11:12:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F4xrl-0003PB-NP for help-gnu-emacs@gnu.org; Fri, 03 Feb 2006 05:08:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F4xiB-0000zK-D4 for help-gnu-emacs@gnu.org; Fri, 03 Feb 2006 04:59:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F4xgb-0000Li-UO for help-gnu-emacs@gnu.org; Fri, 03 Feb 2006 04:57:02 -0500 Original-Received: from [217.72.192.226] (helo=smtp08.web.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F4xfa-00066P-UV for help-gnu-emacs@gnu.org; Fri, 03 Feb 2006 04:55:59 -0500 Original-Received: from [84.245.191.36] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.105 #340) id 1F4xdP-00041m-00 for help-gnu-emacs@gnu.org; Fri, 03 Feb 2006 10:53:43 +0100 In-Reply-To: X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: Emacs help X-Mailer: Apple Mail (2.746.2) X-Sender: Peter_Dyballa@web.de 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:32972 Archived-At: Am 03.02.2006 um 06:18 schrieb John M. Gabriele: > I'm also curious: what's the translation between adding the > above line to my .emacs, and typing something in while editing > (presumably "M-x something")? That is, if someone tells me a > line to add to my .emacs file, how can I figure out how to do > the same thing from within the editor while editing? GNU Emacs allows you to (almost) simultaneously edit a large number =20 of files or files not yet saved as files in modified buffers. That "M-=20= x something" means that you invoke a command, a Lisp function for =20 interactive use (there are also non-interactive Lisp functions). To =20 stop editing one file (buffer) you just change to another buffer =20 (whose contents comes or comes not from an existing file) or you =20 create a new buffer by opening a file, .emacs for example. You can =20 decide to save what was achieved in the original buffer (although GNU =20= Emacs automatically saves the work in progress and keeps an almost =20 indefinite amount of undo's). Any change you do to .emacs does *not* change the way the running GNU =20= Emacs behaves. It just prepares for the next one. If you want your =20 change apply for the running one, too, you would need to evaluate the =20= Lisp code. See also my next answer. > > Continuing with the indentation issue, I read here: > http://www.emacswiki.org/cgi-bin/wiki/IndentationBasics that > there's a number of "variables" I can set. I see "tab-width" > there. Yay! That looks like what I want. :) But, again, how > do I "set a variable" for emacs (both in my .emacs file, > and live, while editing)? You can look up a 'variable' with the command C-h v. In the mini-=20 buffer you'll be prompted for a name, but you can try (command) =20 completion, pressing TAB. Then a *Completions* buffer opens showing =20 all variables available. You can scroll through these buffer by =20 pressing SPACE repeatedly and then 'pick' a name, or at the prompt =20 you can start writing the variable name's beginning and expand this =20 string with TAB until it starts to become ambiguous, i.e. there is =20 more than one choice to complete the name. If you see the variable =20 printed somewhere you can position the cursor on it and invoke C-h v. Once the *Help* buffer is created which explains the variable, you =20 often see a hint that you can customise this variable. Follow the =20 hyper link and a *Customization* buffer opens. You can just try the =20 new setting (it changes Emacs' behaviour at run time), and you can =20 save this setting in .emacs, at once or later. > > Regarding the autoindent, Reading here: > http://www.emacswiki.org/cgi-bin/wiki/AutoIndentation it > sounds like autoindent isn't something that comes free, but > instead, to get it, you have to put a one-liner into your > .emacs file. Seems like maybe something that should be > default behaviour, no? Autoindent works in kind of 'qualified' modes. In text mode you =20 indent in such a way that words in the next line start in the same =20 column as the words in the line above, columns of words are built. =20 The one-liners can modify the way autoindentation works in the many =20 modes. To find the default behaviour of modes just stay without a .emacs =20 file or launch GNU Emacs with the option -q, which makes it not to =20 read .emacs. -- Greetings Pete Ce qui =E9t=E9 compris n'existe plus. (Paul Eluard)