From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: W. Greenhouse Newsgroups: gmane.emacs.help Subject: Re: Independent differently-configured instances running concurrently Date: Tue, 29 Apr 2014 15:23:47 +0000 Message-ID: <87tx9crwfw.fsf@motoko.kusanagi> References: <7zzjj5mpcv.fsf@example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398785107 29058 80.91.229.3 (29 Apr 2014 15:25:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2014 15:25:07 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Apr 29 17:25:00 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wf9tz-00073t-85 for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Apr 2014 17:24:59 +0200 Original-Received: from localhost ([::1]:50660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf9ty-00088E-Qd for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Apr 2014 11:24:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf9th-00085I-2y for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 29 Apr 2014 11:24:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wf9tY-0002Lr-NB for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 29 Apr 2014 11:24:41 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:50128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf9tY-0002Le-Fm for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 29 Apr 2014 11:24:32 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wf9tW-0006au-TW for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Tue, 29 Apr 2014 17:24:30 +0200 Original-Received: from chomsky.torservers.net ([77.247.181.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2014 17:24:30 +0200 Original-Received: from wgreenhouse by chomsky.torservers.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2014 17:24:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 80 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: chomsky.torservers.net X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:958NCUXoi/uTeLsD5GZcYcRYwDk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:97448 Archived-At: Hans, Hans BKK 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 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.