unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Change .emacs directory in Ubuntu
@ 2013-09-04 20:37 kishore.r.318
  2013-09-04 22:24 ` Peter Dyballa
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: kishore.r.318 @ 2013-09-04 20:37 UTC (permalink / raw)
  To: help-gnu-emacs


Currently my .emacs file is found in /home So is my .emacs.d folder and I suppose some other files like diary, notes etc will be created in this folder.

I find this really messy and I want all my emacs related files(including the .emacs) and folders in a single folder, say /home/EmacsHome

How do I do that in Ubuntu 12.04? In windows I did this by setting an environment variable HOME to the path of EmacsHome. But, in Ubuntu, the HOME variable will be used for several other programs as well, so I dont want to change that.


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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 20:37 Change .emacs directory in Ubuntu kishore.r.318
@ 2013-09-04 22:24 ` Peter Dyballa
  2013-09-04 22:45   ` Kishore Rathinavel
  2013-09-04 23:35 ` Steven Knight
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Peter Dyballa @ 2013-09-04 22:24 UTC (permalink / raw)
  To: kishore.r.318; +Cc: help-gnu-emacs


Am 04.09.2013 um 22:37 schrieb kishore.r.318@gmail.com:

> in Ubuntu, the HOME variable will be used for several other programs as well, so I dont want to change that.

What about EMACSLOADPATH and the variable load-path?

--
Greetings

  Pete

There's no place like ~
			– (UNIX Guru)




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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 22:24 ` Peter Dyballa
@ 2013-09-04 22:45   ` Kishore Rathinavel
  2013-09-04 22:58     ` Peter Dyballa
  0 siblings, 1 reply; 18+ messages in thread
From: Kishore Rathinavel @ 2013-09-04 22:45 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Yes, I was looking into that. I dont quite understand how to change
EMACSLOADPATH.
I did these:
(setq default-directory "~/EmacsHome/")
(setq user-emacs-directory "~/EmacsHome/.emacs.d/")
but I do not think that it did any difference because:
1. When the startup screen comes, I click on "Open Home Directory" and it
always opens up the HOME directory which is defined system-wide as
/home/kishore.
2. Any autogenerated file by emacs is stored in the HOME directory as
defined system-wide.

I think what I want is to somehow change the way emacs starts up and force
it to look into a different folder for my .emacs.

Is this possible?


On Wed, Sep 4, 2013 at 6:24 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 04.09.2013 um 22:37 schrieb kishore.r.318@gmail.com:
>
> > in Ubuntu, the HOME variable will be used for several other programs as
> well, so I dont want to change that.
>
> What about EMACSLOADPATH and the variable load-path?
>
> --
> Greetings
>
>   Pete
>
> There's no place like ~
>                         – (UNIX Guru)
>
>


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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 22:45   ` Kishore Rathinavel
@ 2013-09-04 22:58     ` Peter Dyballa
  2013-09-04 23:12       ` Kishore Rathinavel
  0 siblings, 1 reply; 18+ messages in thread
From: Peter Dyballa @ 2013-09-04 22:58 UTC (permalink / raw)
  To: Kishore Rathinavel; +Cc: help-gnu-emacs


Am 05.09.2013 um 00:45 schrieb Kishore Rathinavel:

> I think what I want is to somehow change the way emacs starts up and force
> it to look into a different folder for my .emacs.
> 
> Is this possible?

env EMACSLOADPATH=~/EmacsHome emacs ... Did you try that?

--
Greetings

  Pete

From error to error, one discovers the entire truth.
				- Sigmund Freud




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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 22:58     ` Peter Dyballa
@ 2013-09-04 23:12       ` Kishore Rathinavel
  2013-09-05  0:22         ` Peter Dyballa
  0 siblings, 1 reply; 18+ messages in thread
From: Kishore Rathinavel @ 2013-09-04 23:12 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

In a terminal, I did:
$ env
I got a bunch of variables with their assigned paths

$ env EMACSLOADPATH=~/EmacsHome/
I got the bunch of variables above and also EMACSLOADPATH=~/EmacsHome/
added at the end

$ env
Now, the list of variables does not have EMACSLOADPATH=~/EmacsHome/ at the
end

Anyways, I tried opening Emacs after the executing the 2nd command above,
and I have the same problem still.


On Wed, Sep 4, 2013 at 6:58 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 05.09.2013 um 00:45 schrieb Kishore Rathinavel:
>
> > I think what I want is to somehow change the way emacs starts up and
> force
> > it to look into a different folder for my .emacs.
> >
> > Is this possible?
>
> env EMACSLOADPATH=~/EmacsHome emacs ... Did you try that?
>
> --
> Greetings
>
>   Pete
>
> From error to error, one discovers the entire truth.
>                                 - Sigmund Freud
>
>


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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 20:37 Change .emacs directory in Ubuntu kishore.r.318
  2013-09-04 22:24 ` Peter Dyballa
@ 2013-09-04 23:35 ` Steven Knight
  2013-09-05  0:35 ` Suvayu Ali
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Steven Knight @ 2013-09-04 23:35 UTC (permalink / raw)
  To: kishore.r.318; +Cc: help-gnu-emacs

On 9/4/2013 4:37 PM, kishore.r.318@gmail.com wrote:
> Currently my .emacs file is found in /home So is my .emacs.d folder and I suppose some other files like diary, notes etc will be created in this folder.
>
> I find this really messy and I want all my emacs related files(including the .emacs) and folders in a single folder, say /home/EmacsHome
>
> How do I do that in Ubuntu 12.04? In windows I did this by setting an environment variable HOME to the path of EmacsHome. But, in Ubuntu, the HOME variable will be used for several other programs as well, so I dont want to change that.
>

Hi,

May I suggest that you leave .emacs.d as it is and simply move .emacs to 
~/.emacs.d/init.el

Thanks,

-- 
Steven Knight <steven@knight.cx>




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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 23:12       ` Kishore Rathinavel
@ 2013-09-05  0:22         ` Peter Dyballa
  2013-09-05  1:43           ` Kishore Rathinavel
       [not found]           ` <mailman.1329.1378345390.10748.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 18+ messages in thread
From: Peter Dyballa @ 2013-09-05  0:22 UTC (permalink / raw)
  To: Kishore Rathinavel; +Cc: help-gnu-emacs


Am 05.09.2013 um 01:12 schrieb Kishore Rathinavel:

> Anyways, I tried opening Emacs after the executing the 2nd command above,
> and I have the same problem still.

*On ONE line* you first set the additional environment variable and then launch GNU Emacs.

I gave the full recipe.

There exist ways to set an environment variable persistently.

--
Greetings

  Pete

If it should exist, it doesn't. 
				– Arnold's First Law of Documentation




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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 20:37 Change .emacs directory in Ubuntu kishore.r.318
  2013-09-04 22:24 ` Peter Dyballa
  2013-09-04 23:35 ` Steven Knight
@ 2013-09-05  0:35 ` Suvayu Ali
       [not found] ` <mailman.1321.1378333498.10748.help-gnu-emacs@gnu.org>
  2013-09-05  9:19 ` Joost Kremers
  4 siblings, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2013-09-05  0:35 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Sep 04, 2013 at 01:37:23PM -0700, kishore.r.318@gmail.com wrote:
> 
> Currently my .emacs file is found in /home So is my .emacs.d folder
> and I suppose some other files like diary, notes etc will be created
> in this folder.
> 
> I find this really messy and I want all my emacs related
> files(including the .emacs) and folders in a single folder, say
> /home/EmacsHome
> 
> How do I do that in Ubuntu 12.04? In windows I did this by setting an
> environment variable HOME to the path of EmacsHome. But, in Ubuntu,
> the HOME variable will be used for several other programs as well, so
> I dont want to change that.

May I ask why you want this?  On Linux systems, all user specific
application settings go wherever $HOME points to.  So Emacs respects
that.  From the perspective of security, and administering a system,
this makes a lot of sense.  Unless your username is EmacsHome, and you
are running Emacs as that user, I find your choice quite odd.  It might
cause you conflicts with many other utilities.

That said, you could try symbolic links:

  # ln -s /home/EmacsHome/.emacs ~/.emacs
  # ln -s /home/EmacsHome/.emacs.d ~/.emacs.d

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  0:22         ` Peter Dyballa
@ 2013-09-05  1:43           ` Kishore Rathinavel
  2013-09-05  8:40             ` Peter Dyballa
  2013-09-05 16:34             ` Suvayu Ali
       [not found]           ` <mailman.1329.1378345390.10748.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 18+ messages in thread
From: Kishore Rathinavel @ 2013-09-05  1:43 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

@Steven: That doesnt solve my problem of trying to keep all emacs related
files within the same folder, while seperating them from the other files in
HOME folder. The reason I like it this way is so that I dont need to bother
finding out which files to copy when I move between differnt OS
installations.

@Peter:
Sorry that I didnt realize that was a single command entirely.
I tried:
$ env EMACSLOADPATH=~/EmacsHome emacs

and it opens emacs with an error in the minibar which reads: byte-code:
Cannot open load file: warnings
and in the terminal there is an error that reads: could not find simple.el

But, I have placed the same .emacs in both the folders - the HOME as well
as EmacsHome

So, I tried C-x C-f ~/.emacs and I modified the first string so that I can
find out which .emacs is being modified - and its the one in the HOME
folder.




On Wed, Sep 4, 2013 at 8:22 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 05.09.2013 um 01:12 schrieb Kishore Rathinavel:
>
> > Anyways, I tried opening Emacs after the executing the 2nd command above,
> > and I have the same problem still.
>
> *On ONE line* you first set the additional environment variable and then
> launch GNU Emacs.
>
> I gave the full recipe.
>
> There exist ways to set an environment variable persistently.
>
> --
> Greetings
>
>   Pete
>
> If it should exist, it doesn't.
>                                 – Arnold's First Law of Documentation
>
>


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

* Re: Change .emacs directory in Ubuntu
       [not found]           ` <mailman.1329.1378345390.10748.help-gnu-emacs@gnu.org>
@ 2013-09-05  2:47             ` Rustom Mody
  0 siblings, 0 replies; 18+ messages in thread
From: Rustom Mody @ 2013-09-05  2:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, September 5, 2013 7:13:04 AM UTC+5:30, Kishore Rathinavel wrote:
> @Steven: That doesnt solve my problem of trying to keep all emacs related
> files within the same folder, while seperating them from the other files in
> HOME folder. The reason I like it this way is so that I dont need to bother
> finding out which files to copy when I move between differnt OS
> installations.

Not sure what you mean by different OS installations...
Could mean different OSes on same machine shared with something like multiboot-grub/VMs etc, or it could mean having a core set of 'my-files' that are copied out on need to the other OS


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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  1:43           ` Kishore Rathinavel
@ 2013-09-05  8:40             ` Peter Dyballa
  2013-09-05 16:34             ` Suvayu Ali
  1 sibling, 0 replies; 18+ messages in thread
From: Peter Dyballa @ 2013-09-05  8:40 UTC (permalink / raw)
  To: Kishore Rathinavel; +Cc: help-gnu-emacs


Am 05.09.2013 um 03:43 schrieb Kishore Rathinavel:

> $ env EMACSLOADPATH=~/EmacsHome emacs

By experimenting I found that EMACSLOADPATH needs to contain the contents of the load-path variable as well. This explains the warnings.

Obviously GNU Emacs does not add the path elements provided by EMACSLOADPATH but substitutes the compiled-in value with the one provided by EMACSLOADPATH.

--
Greetings

  Pete

It is so hot in some places that the people there have to live in other places.




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

* Re: Change .emacs directory in Ubuntu
       [not found] ` <mailman.1321.1378333498.10748.help-gnu-emacs@gnu.org>
@ 2013-09-05  9:11   ` Joost Kremers
  0 siblings, 0 replies; 18+ messages in thread
From: Joost Kremers @ 2013-09-05  9:11 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa wrote:
>
> Am 04.09.2013 um 22:37 schrieb kishore.r.318@gmail.com:
>
>> in Ubuntu, the HOME variable will be used for several other programs as well, so I dont want to change that.
>
> What about EMACSLOADPATH and the variable load-path?

EMACSLOADPATH is where Emacs searches for Lisp files. If you set/change
it, Emacs may not be able to find the Lisp files it needs to run
normally. It will not change where Emacs stores the user's configuration
files, though.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: Change .emacs directory in Ubuntu
  2013-09-04 20:37 Change .emacs directory in Ubuntu kishore.r.318
                   ` (3 preceding siblings ...)
       [not found] ` <mailman.1321.1378333498.10748.help-gnu-emacs@gnu.org>
@ 2013-09-05  9:19 ` Joost Kremers
  2013-09-05  9:31   ` Eli Zaretskii
  2013-09-05  9:32   ` Peter Dyballa
  4 siblings, 2 replies; 18+ messages in thread
From: Joost Kremers @ 2013-09-05  9:19 UTC (permalink / raw)
  To: help-gnu-emacs

kishore.r.318@gmail.com wrote:
>
> Currently my .emacs file is found in /home So is my .emacs.d folder
> and I suppose some other files like diary, notes etc will be created
> in this folder.

I assume that when you write /home, you actually mean your home
directory, also abbreviated with a tilde in Unix/Linux, right? /home is
an actual directory in a Linux file system, it's *not* your home
directory. (That is a subdirectory of /home, like /home/joost in my
case.)

> I find this really messy and I want all my emacs related
> files(including the .emacs) and folders in a single folder, say
> /home/EmacsHome

Well, normally Emacs should keep everything in ~/.emacs.d, including its
init file, unless it finds a file ~/.emacs. So I'd suggest moving
~/.emacs to ~/.emacs.d/init.el (that's what the file should be called),
then most everything should be kept there.

Of course, Emacs is more than an editor, its basically a Lisp VM, and
programs running in Emacs may decide to put their config files outside
of ~/.emacs.d (at least some do, IME). It's usually possible to
configure them to put their config files in ~/.emacs.d as well, though,
you'll just have to find out how.

> How do I do that in Ubuntu 12.04? In windows I did this by setting an
> environment variable HOME to the path of EmacsHome. But, in Ubuntu,
> the HOME variable will be used for several other programs as well, so
> I dont want to change that.

Looking through the Emacs manual there doesn't seem to be a way to do
that. What you *could* do, is set HOME to a different value just for
Emacs, but I wouldn't recommend that, because it could mess up external
programs that Emacs calls.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  9:19 ` Joost Kremers
@ 2013-09-05  9:31   ` Eli Zaretskii
  2013-09-05  9:32   ` Peter Dyballa
  1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2013-09-05  9:31 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Joost Kremers <joostkremers@yahoo.com>
> Date: 5 Sep 2013 09:19:41 GMT
> 
> What you *could* do, is set HOME to a different value just for
> Emacs, but I wouldn't recommend that, because it could mess up
> external programs that Emacs calls.

And _because_ Emacs relies so much on external programs, notably the
shell, changing HOME for Emacs is a very bad idea.  DON'T DO THAT!!



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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  9:19 ` Joost Kremers
  2013-09-05  9:31   ` Eli Zaretskii
@ 2013-09-05  9:32   ` Peter Dyballa
  2013-09-05 16:58     ` Kishore Rathinavel
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Dyballa @ 2013-09-05  9:32 UTC (permalink / raw)
  To: Joost Kremers, Kishore Rathinavel; +Cc: help-gnu-emacs


Am 05.09.2013 um 11:19 schrieb Joost Kremers:

> What you *could* do, is set HOME to a different value just for Emacs

Now I too think that's the best option, since it would also write back into this directory:

	env HOME=... emacs ...

--
Mit friedvollen Grüßen

  Pete

Got Mole problems?
Call Avogadro 6.02 x 10^23




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

* Re: Change .emacs directory in Ubuntu
@ 2013-09-05 10:41 Vilibald Wanca
  0 siblings, 0 replies; 18+ messages in thread
From: Vilibald Wanca @ 2013-09-05 10:41 UTC (permalink / raw)
  To: help-gnu-emacs

> in Ubuntu, the HOME variable will be used for several other programs as well, so I dont want to change that.

Hi,
if I understand it correctly you'd like to have a single directory
with all the emacs related stuff.
Best solution I've come up with so far is to have a emacs directory in
my home and the .emacs is actually just symlink to
~/emacs/thismachine.el I work on different computers so I'm using
different init files for each of them. General settings which are not
machine specific are in separate files. This way all settings and any
other data are in one directory which I've got in version control and
can easily synchronise over different machines. `it also involves
setting up some variables in the init file like separate
custom-sesttings, dictionaries load paths and so.
Would this be a solution for you?

vilda



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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  1:43           ` Kishore Rathinavel
  2013-09-05  8:40             ` Peter Dyballa
@ 2013-09-05 16:34             ` Suvayu Ali
  1 sibling, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2013-09-05 16:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Kishore,

On Wed, Sep 04, 2013 at 09:43:04PM -0400, Kishore Rathinavel wrote:
> @Steven: That doesnt solve my problem of trying to keep all emacs related
> files within the same folder, while seperating them from the other files in
> HOME folder. The reason I like it this way is so that I dont need to bother
> finding out which files to copy when I move between differnt OS
> installations.

If a consolidated setup is what you are after, take a look at my setup:
<https://github.com/suvayu/.emacs.d>.  You will notice I use
~/.emacs.d/init.el instead of ~/.emacs (as mentioned by Joost).

Did you try that?

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Change .emacs directory in Ubuntu
  2013-09-05  9:32   ` Peter Dyballa
@ 2013-09-05 16:58     ` Kishore Rathinavel
  0 siblings, 0 replies; 18+ messages in thread
From: Kishore Rathinavel @ 2013-09-05 16:58 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs, Joost Kremers

That is a brilliant solution. Thanks a lot.


On Thu, Sep 5, 2013 at 5:32 AM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 05.09.2013 um 11:19 schrieb Joost Kremers:
>
> > What you *could* do, is set HOME to a different value just for Emacs
>
> Now I too think that's the best option, since it would also write back
> into this directory:
>
>         env HOME=... emacs ...
>
> --
> Mit friedvollen Grüßen
>
>   Pete
>
> Got Mole problems?
> Call Avogadro 6.02 x 10^23
>
>


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

end of thread, other threads:[~2013-09-05 16:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 20:37 Change .emacs directory in Ubuntu kishore.r.318
2013-09-04 22:24 ` Peter Dyballa
2013-09-04 22:45   ` Kishore Rathinavel
2013-09-04 22:58     ` Peter Dyballa
2013-09-04 23:12       ` Kishore Rathinavel
2013-09-05  0:22         ` Peter Dyballa
2013-09-05  1:43           ` Kishore Rathinavel
2013-09-05  8:40             ` Peter Dyballa
2013-09-05 16:34             ` Suvayu Ali
     [not found]           ` <mailman.1329.1378345390.10748.help-gnu-emacs@gnu.org>
2013-09-05  2:47             ` Rustom Mody
2013-09-04 23:35 ` Steven Knight
2013-09-05  0:35 ` Suvayu Ali
     [not found] ` <mailman.1321.1378333498.10748.help-gnu-emacs@gnu.org>
2013-09-05  9:11   ` Joost Kremers
2013-09-05  9:19 ` Joost Kremers
2013-09-05  9:31   ` Eli Zaretskii
2013-09-05  9:32   ` Peter Dyballa
2013-09-05 16:58     ` Kishore Rathinavel
  -- strict thread matches above, loose matches on Subject: below --
2013-09-05 10:41 Vilibald Wanca

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).