From: W. Greenhouse <wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: Independent differently-configured instances running concurrently
Date: Tue, 29 Apr 2014 15:23:47 +0000 [thread overview]
Message-ID: <87tx9crwfw.fsf@motoko.kusanagi> (raw)
In-Reply-To: 7zzjj5mpcv.fsf@example.com
Hans,
Hans BKK <hansbkk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Any other comments welcome, expect perhaps those along the lines of
> "your learning process is too complicated" 8-)
1. If you are interested in reading in-depth about Emacs initialization,
see (info "(elisp) Startup Summary"). This will help answer where the
user initfile and other user config elements fit in to the session
startup.
2. I am a fan of the Emacs daemon. Multiple daemons can be initialized
by giving them distinct socket filenames, similar to named screen or
tmux sessions. Each daemon can persist in the background and have its
own set of emacsclient frames, possibly on different terminals or X
servers.
I don't normally use multiple instances, because I find it more
convenient to have kill ring/command history/buffers shared and
available from any of my emacsclients, but sometimes when testing a
new configuration I will start up a second daemon with "emacs
--daemon=test", which enables emacsclients to be connected to the new
instance with "emacsclient -c -s test". You can read about
emacsclient/daemon at (info "(emacs) Emacs Server").
If you consistently wanted to have multiple sessions with the added
flexibility of the daemon, one option might be to have a function run
from `after-init-hook' (run just after the daemon is up and running)
and detect which value of `server-name' was set during
initialization.
For example:
--8<---------------cut here---------------start------------->8---
(defun server-specific-init ()
"Conditionally load a secondary initfile by Emacs daemon name."
(if (server-running-p)
(load-file (concat user-emacs-directory "init-" server-name))))
(add-hook 'after-init-hook 'server-specific-init)
--8<---------------cut here---------------end--------------->8---
With this you could have an init-personal.el, init-work.el,
init-testing.el, etc. and boot into those environments by starting a
daemon with that name. Setting ALTERNATE_EDITOR to "" in your shell
environment it becomes even more convenient, because then you can
start the daemon implicitly by launching an emacsclient with its
name: "emacsclient -c -s personal", etc.
Nonetheless I've never found such a setup easy to come to terms with,
because one of the reasons I stick with Emacs is that I love to have
my whole session accessible.
3. Most importantly, use Emacs. This is the best way to learn. :) Start
with a particular task and build from there; by learning the elisp
and commands that help with this task, you will gain much familiarity
with the runtime in general. In the end it's all pretty
interconnected.
David,
David Hume <David.Hume-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org> writes:
> At the moment I am running various instances but I just run them as
> different users. For example using gnus to send mail, I am not sure how
> I would have different smtp servers, without them getting mixed up, so
> to play it safe I set up different linux users.
Gnus supports multiple SMTP accounts through the X-Message-SMTP-Method
header, or alternatively by using an SMTP client binary that picks a
mail host based on the From: header, like msmtp. Just as a small
aside. :)
--
Best,
WGG
Reply to list only, please.
Off-list replies will be filtered and deleted.
next prev parent reply other threads:[~2014-04-29 15:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 15:39 Independent differently-configured instances running concurrently Hans BKK
2014-04-28 15:43 ` David Hume
2014-04-29 15:23 ` W. Greenhouse [this message]
2014-04-28 16:47 ` Javier
2014-04-28 16:54 ` Michael Heerdegen
2014-04-28 23:17 ` Hans BKK
2014-04-29 0:10 ` Michael Heerdegen
2014-04-29 0:18 ` Robert Thorpe
2014-04-29 0:36 ` Hans BKK
2014-04-29 18:12 ` Hans BKK
2014-04-29 20:24 ` W. Greenhouse
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=87tx9crwfw.fsf@motoko.kusanagi \
--to=wgreenhouse-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
--cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.org \
/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).