[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to edit+compile+debug without leaving GNU/Emacs
From: |
Peter Dyballa |
Subject: |
Re: how to edit+compile+debug without leaving GNU/Emacs |
Date: |
Mon, 20 Feb 2006 11:50:52 +0100 |
Am 20.02.2006 um 09:28 schrieb venk:
This is suggesting to use one .emacs per edit, build, debug terminals.
Have I understood right?
Yes.
Actually, my home directory(the absolute path) is the same on all
these three machines. so wherever I start Emacs from, the
same .emacs gets loaded.
The same for me. I had different .Xdefaults files (.Xdefaults-
<hostname>) and I had in .emacs portions for each host. HOSTNAME was
defined in the environment, so I could get its value and use it.
How can I load different .emacs depending on the machine name?
You could create different .emacs-<HOSTNAME> files and then put
into .emacs:
(load (format "~/.emacs-%s.el" (getenv "HOST")))
This will retrieve the $HOST environment variable and create a file
name according to the specified format. The file with this file name
then will be loaded and its ELisp code executed. You could make each
of these files start with
(message ".emacs-<given HOSTNAME> starts here")
and end with
(message ".emacs-<given HOSTNAME> ends here")
to see that it actually works. (You probably know 'touch ~/.emacs-$
{HOST}.el' ?) Then put the *-frame-alist's into them. The default
type defaults for all GNU Emacs frame (I prefer to start with an
initial one that's a bit different in order to do experiments with
some Emacsen in progress).
--
Greetings
Pete
The human animal differs from the lesser primates in his passion for
lists of "Ten Best".
-- H. Allen Smith
Re: how to edit+compile+debug without leaving GNU/Emacs, Colin S. Miller, 2006/02/20