all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to have two parallel emacs environments?
@ 2014-03-24 22:46 Guido Van Hoecke
  2014-03-24 22:54 ` Michael Heerdegen
  2014-03-25 17:57 ` Nicolas Richard
  0 siblings, 2 replies; 10+ messages in thread
From: Guido Van Hoecke @ 2014-03-24 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I would like to reorganise and actualise my emacs current setup files.

To facilitate this time consuming and laborious process I would really
like to experiment in a temporary second emacs environment which would
gradually be extended to eventually provide at least the support
currently provided by my official setup.

I was hoping that I could start an alternate emacs using the -u option so
that I could get a separate instance using the growing new setup file.
But obviously that does not work as it expects a user name, not an init
file path.

Is there any way to launch an emacs with a specific init file?

Or is there a different approach to this problem?

Thanks in advance for your suggestions and ideas,


Guido

--
The story you are about to hear is true.
Only the names have been changed to protect the innocent.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-24 22:46 How to have two parallel emacs environments? Guido Van Hoecke
@ 2014-03-24 22:54 ` Michael Heerdegen
  2014-03-24 23:02   ` Guido Van Hoecke
                     ` (2 more replies)
  2014-03-25 17:57 ` Nicolas Richard
  1 sibling, 3 replies; 10+ messages in thread
From: Michael Heerdegen @ 2014-03-24 22:54 UTC (permalink / raw)
  To: help-gnu-emacs

Guido Van Hoecke <guivho@gmail.com> writes:

> Is there any way to launch an emacs with a specific init file?

I would do emacs -q -l /path/to/init-file

It's not exactly the same as specifying an init file but should do the
job.

Michael.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-24 22:54 ` Michael Heerdegen
@ 2014-03-24 23:02   ` Guido Van Hoecke
  2014-03-25 12:41   ` Luca Ferrari
       [not found]   ` <mailman.18153.1395751287.10748.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Guido Van Hoecke @ 2014-03-24 23:02 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

Hi Michael,

On 24 March 2014 23:54, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> Guido Van Hoecke <guivho@gmail.com> writes:
>
>> Is there any way to launch an emacs with a specific init file?
>
> I would do emacs -q -l /path/to/init-file
>
> It's not exactly the same as specifying an init file but should do the
> job.

It does indeed, thanks a lot!

Guido



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-24 22:54 ` Michael Heerdegen
  2014-03-24 23:02   ` Guido Van Hoecke
@ 2014-03-25 12:41   ` Luca Ferrari
       [not found]   ` <mailman.18153.1395751287.10748.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Luca Ferrari @ 2014-03-25 12:41 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, Mar 24, 2014 at 11:54 PM, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
> Guido Van Hoecke <guivho@gmail.com> writes:
>
>> Is there any way to launch an emacs with a specific init file?
>
> I would do emacs -q -l /path/to/init-file
>

Also the -u option could be an option to specify a per-user init file.
Or specifying a switch-function to call on startup in order to
configure the whole editor differently?

Luca



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
       [not found]   ` <mailman.18153.1395751287.10748.help-gnu-emacs@gnu.org>
@ 2014-03-25 12:54     ` Pascal J. Bourguignon
  2014-03-25 16:05       ` Guido Van Hoecke
  0 siblings, 1 reply; 10+ messages in thread
From: Pascal J. Bourguignon @ 2014-03-25 12:54 UTC (permalink / raw)
  To: help-gnu-emacs

Luca Ferrari <fluca1978@infinito.it> writes:

> On Mon, Mar 24, 2014 at 11:54 PM, Michael Heerdegen
> <michael_heerdegen@web.de> wrote:
>> Guido Van Hoecke <guivho@gmail.com> writes:
>>
>>> Is there any way to launch an emacs with a specific init file?
>>
>> I would do emacs -q -l /path/to/init-file
>>
>
> Also the -u option could be an option to specify a per-user init file.
> Or specifying a switch-function to call on startup in order to
> configure the whole editor differently?


If you load different configurations from ~/.emacs, you may want to set
custom-file to tell emacs where to store the customizations.

For example, I have this in my ~/.emacs:

;; […]
(let ((configuration (find-configuration (hostname))))
  (if configuration
      (let ((file (file-truename (cdr configuration))))
        (load file)
        ;; setting custom-file needs to be done after we've customized our stuff
        ;; otherwise it may be overridden with an empty customization.
        (setq custom-file (or file custom-file)))
      (message "Found no configuration to load for %s" (hostname))))


-- 
__Pascal Bourguignon__
http://www.informatimago.com/
"Le mercure monte ?  C'est le moment d'acheter !"


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-25 12:54     ` Pascal J. Bourguignon
@ 2014-03-25 16:05       ` Guido Van Hoecke
  0 siblings, 0 replies; 10+ messages in thread
From: Guido Van Hoecke @ 2014-03-25 16:05 UTC (permalink / raw)
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Hi Pacal,

"Pascal J. Bourguignon" <pjb@informatimago.com> writes:

> Luca Ferrari <fluca1978@infinito.it> writes:
>
>> On Mon, Mar 24, 2014 at 11:54 PM, Michael Heerdegen
>> <michael_heerdegen@web.de> wrote:
>>> Guido Van Hoecke <guivho@gmail.com> writes:
>>>
>>>> Is there any way to launch an emacs with a specific init file?
>>>
>>> I would do emacs -q -l /path/to/init-file
>>>
>>
>> Also the -u option could be an option to specify a per-user init file.
>> Or specifying a switch-function to call on startup in order to
>> configure the whole editor differently?
>
>
> If you load different configurations from ~/.emacs, you may want to set
> custom-file to tell emacs where to store the customizations.
>
> For example, I have this in my ~/.emacs:
>
> ;; […]
> (let ((configuration (find-configuration (hostname))))
>   (if configuration
>       (let ((file (file-truename (cdr configuration))))
>         (load file)
>         ;; setting custom-file needs to be done after we've customized our stuff
>         ;; otherwise it may be overridden with an empty customization.
>         (setq custom-file (or file custom-file)))
>       (message "Found no configuration to load for %s" (hostname))))

One more for my setup files :)

Thanks.


Guido

--
Laughter is the closest distance between two people.
		-- Victor Borge



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-24 22:46 How to have two parallel emacs environments? Guido Van Hoecke
  2014-03-24 22:54 ` Michael Heerdegen
@ 2014-03-25 17:57 ` Nicolas Richard
  2014-03-25 20:08   ` Guido Van Hoecke
  1 sibling, 1 reply; 10+ messages in thread
From: Nicolas Richard @ 2014-03-25 17:57 UTC (permalink / raw)
  To: Guido Van Hoecke; +Cc: help-gnu-emacs

Hello,

Guido Van Hoecke <guivho@gmail.com> writes:
> I was hoping that I could start an alternate emacs using the -u option so
> that I could get a separate instance using the growing new setup file.

You can start emacs with a modified HOME variable~:
HOME=/tmp/a-new-home emacs

Then emacs will look for /tmp/a-new-home/.emacs. One advantage is that
the package initialization happens normally. One advantage or
disadvantage (depending on your POV) is be that if you refer to files
relative to ~/ in /tmp/a-new-home/.emacs, they'll in fact be relative to
/tmp/a-new-home and not /home/yourusername/

-- 
Nico.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-25 17:57 ` Nicolas Richard
@ 2014-03-25 20:08   ` Guido Van Hoecke
  2014-03-27  7:52     ` Luca Ferrari
  0 siblings, 1 reply; 10+ messages in thread
From: Guido Van Hoecke @ 2014-03-25 20:08 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: help-gnu-emacs

Hi Nicolas,

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Hello,
>
> Guido Van Hoecke <guivho@gmail.com> writes:
>> I was hoping that I could start an alternate emacs using the -u option so
>> that I could get a separate instance using the growing new setup file.
>
> You can start emacs with a modified HOME variable~:
> HOME=/tmp/a-new-home emacs
>
> Then emacs will look for /tmp/a-new-home/.emacs. One advantage is that
> the package initialization happens normally. One advantage or
> disadvantage (depending on your POV) is be that if you refer to files
> relative to ~/ in /tmp/a-new-home/.emacs, they'll in fact be relative to
> /tmp/a-new-home and not /home/yourusername/

That's a clever way to solve the problem. The ~ problem neds to be taken
into account but that's easily solvable.

Thanks for the suggestion :)


Guido

--
Thus spake the master programmer:
	"When program is being tested, it is too late to make design changes."
		-- Geoffrey James, "The Tao of Programming"



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-25 20:08   ` Guido Van Hoecke
@ 2014-03-27  7:52     ` Luca Ferrari
  2014-03-27 10:45       ` Guido Van Hoecke
  0 siblings, 1 reply; 10+ messages in thread
From: Luca Ferrari @ 2014-03-27  7:52 UTC (permalink / raw)
  To: Guido Van Hoecke; +Cc: Nicolas Richard, help-gnu-emacs

There is also a org-dotemacs module on Melpa that allows to tag parts
of the init file to load on startup. I've never tried it, but could be
another option (even if I think it's a bit too complex for this
specific problem).

Luca



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to have two parallel emacs environments?
  2014-03-27  7:52     ` Luca Ferrari
@ 2014-03-27 10:45       ` Guido Van Hoecke
  0 siblings, 0 replies; 10+ messages in thread
From: Guido Van Hoecke @ 2014-03-27 10:45 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

Hi Luca,

Luca Ferrari <fluca1978@gmail.com> writes:

> There is also a org-dotemacs module on Melpa that allows to tag parts
> of the init file to load on startup. I've never tried it, but could be
> another option (even if I think it's a bit too complex for this
> specific problem).

Since my original posting, I have switched to a slightly reworked init
file, tangled from my emacs-guivho.org. Still needs a lot of work, so it
might well be worth looking into org-dotemacs :)

Thanks for the suggestion,


Guido

--
Weinberg's First Law:
	Progress is only made on alternate Fridays.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-27 10:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 22:46 How to have two parallel emacs environments? Guido Van Hoecke
2014-03-24 22:54 ` Michael Heerdegen
2014-03-24 23:02   ` Guido Van Hoecke
2014-03-25 12:41   ` Luca Ferrari
     [not found]   ` <mailman.18153.1395751287.10748.help-gnu-emacs@gnu.org>
2014-03-25 12:54     ` Pascal J. Bourguignon
2014-03-25 16:05       ` Guido Van Hoecke
2014-03-25 17:57 ` Nicolas Richard
2014-03-25 20:08   ` Guido Van Hoecke
2014-03-27  7:52     ` Luca Ferrari
2014-03-27 10:45       ` Guido Van Hoecke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.