all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: john_sips_tea@yahoo.com
Subject: Re: indentation, setting variables, commands, and M-x
Date: 3 Feb 2006 11:21:10 -0800	[thread overview]
Message-ID: <1138994470.908734.129550@g14g2000cwa.googlegroups.com> (raw)
In-Reply-To: <KKBEf.155$ZY.99@fe12.lga>

Wow! Thanks for all the great replies everyone.

I've summarized them into my own notes here:
http://www.simisen.com/jmg/emacs.html
http://www.simisen.com/jmg/info_command.html

I few things I didn't understand from your resplies:

Eli wrote:
> > (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?
>
> The easiest way to do that is type the necessary stuff into your
> .emacs, and then evaluate it.  For a single parenthesized expression,
> go to the closing right paren and type "C-x C-e".  For several
> expressions, do this for each expression in turn.

Do that right in the text/buffer that I'm editing?

Alan wrote:
> Actually, TAB doesn't indent to the next indent-level, it indents to the
> _correct_ level, as determined by the syntax of the source code.

Sweet. Sounds easy to get used to. :)

> There is an extra complication with tab-width: it is a "buffer-local"
> variable, i.e. when you set it, the setting only has effect in the
> current buffer.  To change the default, use `setq-default'.  To change
> the value in the current buffer, use `setq'.

Thanks for the clarification. :)

> Autoindentation is enabled by default for programming modes like C Mode
> and Emacs Lisp Mode.

Ah. The major programming language modes (am I saying that right?)
are more sophisticated than I'd thought.

What's the difference between a "mode" and a "variable"?
indent-tabs-mode looks like it could be both...

Peter wrote:
> 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.

Nice. Didn't know about C-h v.

> Autoindent works in kind of 'qualified' modes.

Hm. Well, It doesn't seem to be working for me. I tried
creating a .java file and a .py file, and editing both, neither
one autoindents. It could be that I need to install some
extra Python mode? But that doesn't explain why the java
one wouldn't work...

BTW, here's my first attempt at a ~/.emacs file:

(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq-default transient-mark-mode 1)
(setq-default font-lock-mode 1)

Does that look right?

The transient-mark-mode works, but the font-lock-mode
doesn't seem to work... Hm. If I open a .java file, syntax
highlighting only works only if I do:
M-x font-lock-mode
M-x font-lock-mode
(disable, then re-enable). Weird... (Actually, please
let me know if that's the topic of a different thread.)

Thanks,
---John

  parent reply	other threads:[~2006-02-03 19:21 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
2006-02-03 15:52 ` Drew Adams
2006-02-03 19:21 ` john_sips_tea [this message]
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

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

  git send-email \
    --in-reply-to=1138994470.908734.129550@g14g2000cwa.googlegroups.com \
    --to=john_sips_tea@yahoo.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.