Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mac Lad

macrumors member
Original poster
Sep 25, 2004
36
0
Big Easy, Louisiana
Hi all,
After a couple of years of not using Emacs, I decided to use it again mostly for nostalgic reasons (yeah ... I used to use it in my Freshmen + Sophomore year). I downloaded and installed Carbon Emacs from the following site: http://home.att.ne.jp/alpha/z123/emacs-mac-e.html. Strangely, the ~/.emacs file is not there. There is however, a similar file (carbon-emacs-init.el) I found in /Applications/Emacs.app/Contents/Reosurces/site-lisp/site-start.d/ What is the difference?

Anyway, I have never done any customizations on Emacs. Do all customizations must be done through ~/.emacs file or in this case carbon-emacs-init.el? Can I just rename carbon-emacs-init.el to .emacs and save it to my home directory?? Is there any guideline somewhere on the net to write .emacs file?

I'll use Emacs primarily for TeX editing (with TeXniscope as the previewer) some Java and C/C++. So far, Carbon Emacs is really cool. Thanx for all the help!!!!
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
Ahh, emacs. I spend at least 50% of normal workdays using it. :cool: I have yet to find an alternative that I can stand to use.

The 'carbon-emacs-init.el' file is probably just the default init. Don't edit that one, use ~/.emacs. Create an empty one if it doesn't exist.

Remember that emacs is customized with lisp code, you probably don't want to blindly re-run whatever is in 'carbon-emacs-init.el'. So don't copy it to ~/.emacs either.

What do you want to customize, anyway?
-kev
 

Mac Lad

macrumors member
Original poster
Sep 25, 2004
36
0
Big Easy, Louisiana
khammack said:
Ahh, emacs. I spend at least 50% of normal workdays using it. :cool: I have yet to find an alternative that I can stand to use.

The 'carbon-emacs-init.el' file is probably just the default init. Don't edit that one, use ~/.emacs. Create an empty one if it doesn't exist.

Remember that emacs is customized with lisp code, you probably don't want to blindly re-run whatever is in 'carbon-emacs-init.el'. So don't copy it to ~/.emacs either.

What do you want to customize, anyway?
-kev

So, I guess they're probably the same thing, although I think init.el is executed first BEFORE ~/.emacs (please correct me if I'm wrong). I would like to have a customized environment for LaTeX, such as having preview-latex, synching with external pdf previewer, etc. I also would like to know if there is a way to change the buffer's transparency (looks really cool).

Unfortunately I already edited carbon-emacs-init.el, so I'll try to restore it, and create a new ~/.emacs. By the way khammack, which version of Carbon Emacs are you using? I would like to try Aquamacs, but I guess it's not a fully developed product yet, and some packages may not work.

I don't really like (X)Emacs that uses X11.... so I'll just stick with the Carbon Emacs for now.
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
I was originally using emacs on aqua:

http://emacs-on-aqua.sourceforge.net/

Edit: And for the record, even though it was based on an older version of emacs I preferred it over the carbon emacsen I tried.

But when I upgraded to Tiger it quit working properly. Can't remember the issue, but I ultimately went back to this one:

http://www.mindlube.com/products/emacs/

Which works fine.

You should either do all of your customizations from .emacs, or if you plan to get crazy (as I have) create a ~/elisp directory for .el files that you have downloaded (or written) to reside. For example, in my .emacs:

(add-to-list 'load-path "~/elisp")
(load "kevin-custom")

Then, I have a file called "~/elisp/kevin-custom.el" which contains some code I wrote to extend emacs.

TeX mode should be already on by default for you, you can tell by opening a LaTeX file and checking that the modeline reads (TeX). If you see this but no syntax highlighting, put this in your ~/.emacs file:

(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

A few other nice ones:

(transient-mark-mode t)
(show-parent-mode 'true)
(line-number-mode t)
(column-number-mode t)

You can get oriented here:

http://www.emacswiki.org/cgi-bin/wiki

But emacs is "self documenting" so you can also discover everything from within emacs itself.

M-x help[RET]

Or, if you have a function or variable and want to know more about it:

M-x describe-function[RET]
show-paren-mode[RET]

M-x describe-variable[RET]
font-lock-maximum-decoration[RET]

Also, if you have a .el file you've downloaded and want to load, often instructions are included in the comments at the top of the .el file for enabling whatever goodness it may contain.

-kev
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.