unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
Subject: Re: indentation, setting variables, commands, and M-x
Date: Fri, 3 Feb 2006 10:53:41 +0100	[thread overview]
Message-ID: <8D0D8836-13FC-4F5F-B7C7-7946A12F4F18@Web.DE> (raw)
In-Reply-To: <KKBEf.155$ZY.99@fe12.lga>


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  
of files or files not yet saved as files in modified buffers. That "M- 
x something" means that you invoke a command, a Lisp function for  
interactive use (there are also non-interactive Lisp functions). To  
stop editing one file (buffer) you just change to another buffer  
(whose contents comes or comes not from an existing file) or you  
create a new buffer by opening a file, .emacs for example. You can  
decide to save what was achieved in the original buffer (although GNU  
Emacs automatically saves the work in progress and keeps an almost  
indefinite amount of undo's).

Any change you do to .emacs does *not* change the way the running GNU  
Emacs behaves. It just prepares for the next one. If you want your  
change apply for the running one, too, you would need to evaluate the  
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- 
buffer you'll be prompted for a name, but you can try (command)  
completion, pressing TAB. Then a *Completions* buffer opens showing  
all variables available. You can scroll through these buffer by  
pressing SPACE repeatedly and then 'pick' a name, or at the prompt  
you can start writing the variable name's beginning and expand this  
string with TAB until it starts to become ambiguous, i.e. there is  
more than one choice to complete the name. If you see the variable  
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  
often see a hint that you can customise this variable. Follow the  
hyper link and a *Customization* buffer opens. You can just try the  
new setting (it changes Emacs' behaviour at run time), and you can  
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  
indent in such a way that words in the next line start in the same  
column as the words in the line above, columns of words are built.  
The one-liners can modify the way autoindentation works in the many  
modes.

To find the default behaviour of modes just stay without a .emacs  
file or launch GNU Emacs with the option -q, which makes it not to  
read .emacs.

--
Greetings

   Pete

Ce qui été compris n'existe plus.    (Paul Eluard)

  parent reply	other threads:[~2006-02-03  9:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03  5:18 indentation, setting variables, commands, and M-x John M. Gabriele
2006-02-03  7:48 ` Eli Zaretskii
2006-02-03  8:54 ` Alan Mackenzie
2006-02-03 16:49   ` Cameron Desautels
2006-02-03  9:53 ` Peter Dyballa [this message]
2006-02-03 15:52 ` Drew Adams
2006-02-03 19:21 ` john_sips_tea
2006-02-03 19:27   ` john_sips_tea
2006-02-03 23:12   ` Peter Dyballa
2006-02-06 18:36     ` Kevin Rodgers
2006-02-06 21:11       ` Peter Dyballa
     [not found] ` <mailman.38.1138993306.2860.help-gnu-emacs@gnu.org>
2006-02-03 20:05   ` Neil Cerutti
2006-02-04 11:13     ` Eli Zaretskii
2006-02-03 20:55   ` john_sips_tea
2006-02-04 17:27     ` Drew Adams
     [not found] <mailman.31.1139095080.2870.help-gnu-emacs@gnu.org>
2006-02-05  3:46 ` John M. Gabriele
2006-02-05 19:52   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8D0D8836-13FC-4F5F-B7C7-7946A12F4F18@Web.DE \
    --to=peter_dyballa@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).