Xah Lee:
> the .emacs is saved in the place where you $HOME environment variable points to. If you don't have $HOME, then it is saved to the AppData dir by default. This applies to any emacs on windows. (i think in the install process ergoemacs added env var for you...)
My answer:
There is code in ErgoEmacs.c:
/* If HOME is not set, set it as "C:\Documents and Settings
\username" */
if (!GetEnvironmentVariable ("HOME", buf, MAX_PATH) || !*buf)
{
HRESULT hr = SHGetFolderPath (NULL, CSIDL_PROFILE, NULL, 0,
buf);
if (SUCCEEDED (hr))
{
SetEnvironmentVariable ("HOME", buf);
}
}
I think, if this code will be removed, then behaviour of Emacs and
ErgoEmacs.exe will be the same: Emacs home will be in AppData.
Strictly, user's home is My Documents, and user application's home is
Application Data. So I think need to fix this code.
--
You received this message because you are subscribed to the Google Groups "ErgoEmacs" group.
To post to this group, send email to ergo...@googlegroups.com.
To unsubscribe from this group, send email to ergoemacs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ergoemacs?hl=en.
I would really like to see all data of Emacs saved in something like
User\AppData\Emacs (instead of just User\AppData). Here I don't
know what is the best option. Right now I prefer the HOME=HOMEPATH,
but if other people think that the default Emacs behavior
is better (HOME=User\AppData), we should remove my code.
BTW, I saw that installator has option to install for all users, or
for current user. It should change path to "C:\Documents and Settings
\All Users\Application Data\Emacs" then. But make installation for
current user by default: no dialog box, but an option checkbox:
[ ] Install for all users
Why we should do the same as the default behaviour of Emacs
anyway? Almost everything in Emacs is wrong by default (for a
normal Windows user point of view).
Let me explain you why HOME should point to 'C:\Docs and...\User':
When you start ErgoEmacs, you can type "~/My Documents"
(or ~/Desktop), but if HOME (~) were poiting to AppData,
the ~ location would be completely useless and unknown for
everybody (will be useful to type ~/.emacs, or ~/Firefox for example
to access to internal configuration files of Firefox, very useless).
> BTW, I saw that installator has option to install for all users, or
> for current user. It should change path to "C:\Documents and Settings
> \All Users\Application Data\Emacs" then. But make installation for
> current user by default: no dialog box, but an option checkbox:
> [ ] Install for all users
It makes no sense for me. I think that "Install for all users" option
is useful when you have to copy configuration files or entries in the
registry to be the default ones for every new user which start the
application. But in our case, ErgoEmacs can start with an
empty HOME folder.
Finally, I think it is an issue that should be solved by Xah in
dictatorial ways. So Xah, what do you think? Where would you
like to be HOME by default in ErgoEmacs?
Will be good to support custom location of .emacs via registry key
HOME:
REGEDIT4
[HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs]
"HOME"="C:\\Documents and Settings\\Ivan\\Application Data\\Emacs"
This key is used when no env. var HOME is defined (http://www.gnu.org/
software/emacs/windows/faq3.html#index-HOME-directory-48).
So, my suggestion:
1) remove hard coded HOME from launcher,
2) add reg key during install.
Pros: user can customize .emacs location without breaking other
applications.
Cons: user will need to move existing configs to new dir, if any.
P.S. You install doesn't have option for all users? If so, sorry for
previous letter, I confuse with EmacsW32 install.
after spending a 40 min reading and trying to write some opinions and
info, ... i think i don't really have anything useful to contribute. I
don't know much about windows.
I opened a issue at: http://code.google.com/p/ergoemacs/issues/detail?id=65
So we have a future reference point on the status or any decision we
made. (i don't know the answer for most of the questions there with
certainty. Anyone please feel free to answer each question, provide
reference if you can so there's the possibility to check and verify
for others who doesn't have expertise on this. Dave, feel free to
close it too if you see fit, of course.)
Thanks a lot.
Xah