Carbon Emacs Customization

Discussion in 'Mac Programming' started by Mac Lad, Jun 21, 2005.

  1. Mac Lad macrumors member

    Sep 25, 2004
    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: Strangely, the ~/.emacs file is not there. There is however, a similar file (carbon-emacs-init.el) I found in /Applications/ 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!!!!
  2. khammack macrumors regular

    Sep 28, 2004
    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?
  3. Mac Lad thread starter macrumors member

    Sep 25, 2004
    Big Easy, Louisiana
    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.
  4. khammack macrumors regular

    Sep 28, 2004
    Portland, OR
    I was originally using emacs on aqua:

    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:

    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:

    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]

    M-x describe-variable[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.


Share This Page