1

This is my first time here. I asked my question over at /r/emacs on reddit, however so far I am left with some unanswered questions. I'll copy paste my question along with the link to my post which has more information.

Original Post


Hi,

Before emacs I thought I knew my computer, now after learning, or trying to learn emacs I am not so sure and feel like an 80 year old with dementia. Anyways, I am not sure if this happens to everyone or I am just not doing it right.

Back to my question. I am learning emacs to write screenplays and notes and also use it as a planner/organizer/manager. I plan to make it my one stop from writing to having my film list to small notes and books and what have you. I am mighty impressed with all the packages available which will make writing much fun.

While previously I worked with Files and Folders and it got a bit too messy. I understand there is an extension called helm which makes file management a breeze. I've been playing with packages and Dired. I understand how emacs works and how it goes about doing its business. I think about files and folders and emacs talks about directory and sub-directory (sub-folders).

Let me run you through what I did and how I messed up or I think I messed up, again :

I unzipped emacs to > C:\Users\MyName\OneDrive\emacs

My .emacs folder lands up in C:\Users\MyName\AppData\Roaming.emacs.d

Along with 3 emacs files / #.emacs# / .emacs and .emacs~ in C:\Users\MyName\AppData\Roaming

When I type C-x C-f it takes me to C:\Users\MyName\OneDrive\emacs\bin/

When I look up other tutorials I notice that their emacs files are in their home directory and not else where. Also when I customize it does make changes to one of the files in C:\Users\My\AppData\Roaming however the package gets installed in C:\Users\MyName\AppData\Roaming.emacs.d\elpa

and then the customization never shows up even after package-initialize and package-require. So I am guessing my Emacs isn't picking up on the right file or I messed up. Can I not have .emacs.d and those 3 files in my home directory C:\Users\MyName\OneDrive\emacs\bin/

How have you set up your emacs?

What is the best way to go about file management and not have things cluttered and mixed up.

Is there some sort of an optimal setup?

Thanks for your help.


This thread is the solution I am trying to implement.

  • 1
    Where did you download your Emacs version, and what version of Windows are you using, and what version of Emacs are you using -- type M-x emacs-version RET? For example, did you download emacs-24.4-bin-i686-pc-mingw32.zip from ftp.gnu.org/gnu/emacs/windows ? Do you know what your home directory is? – lawlist Feb 15 '15 at 5:31
  • 1
    I also found this very confusing at first. This may help: stackoverflow.com/questions/189490/… – Brian Z Feb 15 '15 at 6:15
  • @lawlist : This version - GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570. And I am on Windows 7. I don't know what my home directory is. I guess it's C/Users/MyName/AppData/Roaming. – curious-scribbler Feb 15 '15 at 6:26
  • I prefer to leave my home directory variables untouched, and instead I merely adjust the user-emacs-directory as zck has suggested below. I also keep the .emacs file in the home directory with just one line that looks like this -- (load-file "y:/.0.emacs/.0.lisp/init.el") -- that one-liner loads my entire library of user customizations. My user-emacs-directory is set to "y:/.0.emacs/", so the creation of just about everything occurs naturally in that directory -- e.g., when adding packages using M-x list-packages. You can even change that location with the package-user-dir. – lawlist Feb 15 '15 at 16:26
  • 1
    This question is far too broad for Stack Exchange, and should be closed. Split it into multiple questions, please. And please do not include questions that are primarily opinion-based. See the S.E. help for how to ask a good question. – Drew Feb 15 '15 at 17:00
2

It seems like you have a few things to solve:

  1. How do you set up an emacs config file?
  2. Where do you store files?
  3. How do you access files? Is Helm helpful?

Let's deal with those separately.

How do you set up an emacs config file?

As mentioned elsewhere, Emacs looks in the directory indicated by the HOME environment variable. You should make sure this is set. What should you set it to? That's up to you, but probably something like C:\Users\MyName\.

You can also find where Emacs is currently looking by inspecting the variable user-emacs-directory. To do this, press C-h v, then type user-emacs-directory and press Enter. A buffer will open telling you, among other things, what Emacs currently thinks is the user directory.

Where do you store files?

Emacs can access files stored anywhere on your machine; it doesn't matter where they are. That is to say, you can access files in C:\Users\MyName\OneDrive\emacs\bin/, but also, for example, files in C:\Users\MyName\Documents or C:\Users\MyName\Pictures. Or even just in C:\otherFolder\. You probably want to have some sort of organization scheme, but that doesn't really make a difference for Emacs accessing them.

How do you access files? Is Helm helpful?

You can navigate to any directory by pressing C-x C-f, then typing the path to the file. Helm is useful for finding files; you may want to check it out.

If you have follow-up questions, you should post a separate question for each one. Stack Overflow works best when each question is narrow in scope.

  • Thanks for the detailed explanation. I will be going through helm for sure, however before that I am stuck with setting up my .emacs.d folder to a new place. I was suggested on reddit, (the thread is linked in my post above) that I should create a new .emacs.d folder and instead of .emacs file, I should create a init.el and change my home variable to point to the new location where I have created the .emacs.d. Have you read that thread? – curious-scribbler Feb 15 '15 at 6:39
  • Can you post a new question that's only about getting your .emacs.d folder set up? It's hard to help out in the comments here. – zck Feb 15 '15 at 22:56
  • Sure, I'll post a separate question for each issue. Thanks for your help. – curious-scribbler Feb 16 '15 at 3:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.