* Location of .emacs in Windows 7
@ 2015-01-17 0:38 Steve Graham
2015-01-17 2:02 ` Óscar Fuentes
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Steve Graham @ 2015-01-17 0:38 UTC (permalink / raw)
To: help-gnu-emacs
Using C-x C-f I can read in, edit and store .emacs in ~/.emacs .
However, when I search for the file, I cannot find it.
I was also trying to store an org file in ~/org-mode/work.org . It
seemed sometimes that it would read those files from ~/org-mode/work.org
and write them to c:/Users/<User>/AppData/Roaming/org-mode/work.org .
And I could not find that file/path either.
I have taken to storing the org files in
C:/Users/<User>/Desktop/org-file/work.org . It works but I would rather
use ~/org-mode for the directory.
Any thoughts on this?
Thanks, Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Location of .emacs in Windows 7
2015-01-17 0:38 Location of .emacs in Windows 7 Steve Graham
@ 2015-01-17 2:02 ` Óscar Fuentes
2015-01-17 2:12 ` Marcin Borkowski
2015-01-18 16:33 ` Jordan Wilson
2 siblings, 0 replies; 5+ messages in thread
From: Óscar Fuentes @ 2015-01-17 2:02 UTC (permalink / raw)
To: help-gnu-emacs
Steve Graham <jsgrahamus@yahoo.com> writes:
> Using C-x C-f I can read in, edit and store .emacs in ~/.emacs .
> However, when I search for the file, I cannot find it.
There is a well-defined rule for what Emacs considers `home' (see the
"Windows HOME" node on the Emacs documentation.)
But if you just want a simple method for controlling what `~' means for
Emacs, just define a HOME environment variable (on the Control Panel)
containing the directory you wish to be `~' (said directory must exist
before running Emacs.) At startup, Emacs will read that environment
variable and interpret `~' as a shortcut to the directory it mentions.
OTOH, if you wish to know what `~' expands *now* to in Emacs, just visit
that directory with `C-x d ~ [ENTER]' and you will see on the top part
of the resulting buffer the complete path to `~', along with its
contents.
[snip]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Location of .emacs in Windows 7
2015-01-17 0:38 Location of .emacs in Windows 7 Steve Graham
2015-01-17 2:02 ` Óscar Fuentes
@ 2015-01-17 2:12 ` Marcin Borkowski
2015-01-18 16:33 ` Jordan Wilson
2 siblings, 0 replies; 5+ messages in thread
From: Marcin Borkowski @ 2015-01-17 2:12 UTC (permalink / raw)
To: help-gnu-emacs
On 2015-01-17, at 01:38, Steve Graham <jsgrahamus@yahoo.com> wrote:
> Using C-x C-f I can read in, edit and store .emacs in ~/.emacs .
> However, when I search for the file, I cannot find it.
Try
C-h v user-init-file
or
M-: (find-file user-init-file)
> I was also trying to store an org file in ~/org-mode/work.org . It
> seemed sometimes that it would read those files from ~/org-mode/work.org
> and write them to c:/Users/<User>/AppData/Roaming/org-mode/work.org .
> And I could not find that file/path either.
There is also the variable abbreviated-home-dir, but I'm not sure how it
works.
> I have taken to storing the org files in
> C:/Users/<User>/Desktop/org-file/work.org . It works but I would rather
> use ~/org-mode for the directory.
>
> Any thoughts on this?
>
> Thanks, Steve
Hth,
--
Marcin Borkowski This email was proudly sent
http://mbork.pl from my Emacs.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Location of .emacs in Windows 7
2015-01-17 0:38 Location of .emacs in Windows 7 Steve Graham
2015-01-17 2:02 ` Óscar Fuentes
2015-01-17 2:12 ` Marcin Borkowski
@ 2015-01-18 16:33 ` Jordan Wilson
2015-01-18 16:41 ` Eli Zaretskii
2 siblings, 1 reply; 5+ messages in thread
From: Jordan Wilson @ 2015-01-18 16:33 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
There's a file in the Emacs distribution (it's
share/emacs/site-lisp/site-start.el in 24.4 from ftp.gnu.org, it might
be in a different place on other versions) that allows you to define HOME,
i.e. what `~' expands to. Mine's attached, obviously change as suits
you.
[-- Attachment #2: my site-start.el --]
[-- Type: application/emacs-lisp, Size: 378 bytes --]
[-- Attachment #3: Type: text/plain, Size: 112 bytes --]
Basically:
(setenv "HOME" "C:/Users/Username/WHATEVER/")
--
Thanks, Jordan
Sent from Gnus v5.13, Emacs 24.4.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Location of .emacs in Windows 7
2015-01-18 16:33 ` Jordan Wilson
@ 2015-01-18 16:41 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-01-18 16:41 UTC (permalink / raw)
To: help-gnu-emacs
> From: Jordan Wilson <inopem@gmail.com>
> Date: Sun, 18 Jan 2015 16:33:16 +0000
>
> There's a file in the Emacs distribution (it's
> share/emacs/site-lisp/site-start.el in 24.4 from ftp.gnu.org, it might
> be in a different place on other versions) that allows you to define HOME,
> i.e. what `~' expands to.
IME, it's not a good idea to define HOME (or PATH or ...) inside Emacs
differently than it's defined outside, because it will cause subtle
problems, e.g. in programs not invoked from Emacs. It is best to
define HOME in the environment outside Emacs, such that both Emacs and
the other programs use the same value.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-18 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-17 0:38 Location of .emacs in Windows 7 Steve Graham
2015-01-17 2:02 ` Óscar Fuentes
2015-01-17 2:12 ` Marcin Borkowski
2015-01-18 16:33 ` Jordan Wilson
2015-01-18 16:41 ` Eli Zaretskii
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).