1

Got a lot to learn in lisp but so far with

GNU Emacs 25.3.1 (x86_64-w64-mingw32)

of 2017-09-12

I'm trying to set it all up in Windows 10 to pick up just one .emacs init file but I can't configure emacs properly to see my .emacs file in C:/Users/Adam.

According to How do I set a different location for the dot emacs .emacs file on Windows 7? I put

(setq user-init-file "C:/path/to/.emacs")

in my emacs c:\dev\tools\emacs\share\emacs\site-lisp\site-start.el but this doesn't appear to have any effect.

I guess a simple command that will definitely work would be good to have. Any suggestions?

The main problem though right now is that my attempt to maximize the frame at startup isn't being read or isn't working:

(custom-set-variables '(initial-frame-alist (quote ((fullscreen . maximized)))))
(add-to-list 'default-frame-alist '(fullscreen . maximized))

but it's having no effect and I'm not seeing any errors.

Part of the problem is no doubt the way I start emacs in Windows as opposed to cygwin. I can start it from the windows toolbar with an icon doing:

C:\dev\tools\emacs\bin\emacsclientw.exe -na "" -c

or I can right click files and choose emacs which becomes associated with the file type in Windows.

Just as a note, I'm not able to edit my registry on this corporate computer so I'm unable to do several of the optimisations suggested for launching and running emacs under Windows.

  • 1
    You don't need to edit the registry to change your environment variables, see superuser.com/questions/284342/… – npostavs Nov 3 '17 at 12:24
  • OK thanks. This might sort me out, since I think the whole problem is caused by Windows telling emacs that it's HOME is somewhere different depending how and where I clicked. In fact I now realise I'm not backing up my cygwin HOME dir. Wonder if I can configure that to be somewhere else other than in the cygwin installation dir. – Adam Nov 3 '17 at 13:54
  • See the Emacs Wiki category, W32, for this. – Drew Nov 3 '17 at 15:16
  • 1
    Did you set your HOME environment variable? If not, do that first. – Drew Nov 3 '17 at 15:17
2

[ Can't help you about Windows not finding your ~/.emacs file, sorry. ]

custom-set-variables is for internal use by the Custom system. Never ever write it by hand (unless you really know what you're doing, of course).

[ I guess you saw that somewhere and copy&pasted it, in which case I suggest you go back to that place and tell them about it. ]

Try

(setq initial-frame-alist '((fullscreen . maximized)))

instead. This said, (add-to-list 'default-frame-alist '(fullscreen . maximized)) should be sufficient anyway (initial-frame-alist specifies the settings of the initial frame that should be different from the defaults applied to all frames), so I'd recommend you just get rid of the custom-set-variables line.

  • 1
    Yes, I cut and pasted it from the net, but by the time I came to write my question I couldn't find the article anymore. I shall ditch the custom-set-variables, it did seem to duplicate the next line. – Adam Nov 3 '17 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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