PROJECTS NOTES HOME

Install emacs on windows

Not sure if installation 1 or installation 2 is the good one, so when you will try to install it once again - summarize the instructions to a proper document.

1 Installation 1:

  • [ ] Great video here showcasing the steps below
  • [ ] install emacs from here
  • [ ] go to C:\Program Files\Emacs, find emacs, take the run icon
  • [ ] launch emacs, press C-x C-f, then press ~/ - shows you the directory emacs thinks of as 'HOME'
  • [ ] create init.el file in here, Save-as init.el - then the file is with correct file extension and not .txt
  • [ ]

    add basic emacs config, such as: press C-c C-, to make the source block

    (setq inhibit-startup-message t
          initial-scratch-message "Hello world"
          cursor-type 'bar) (setq inhibit-startup-message t)
    (tool-bar-mode -1)
    (menu-bar-mode -1)
    (scroll-bar-mode -1)
    (defalias 'yes-or-no-p 'y-or-n-p)
    
  • [ ] Restart emacs and check if it works (it should)
  • [ ] install fonts on windows machine https://github.com/domtronn/all-the-icons.el/tree/master/fonts go here, download fonts one by one and install
  • [ ] install python on windows https://stackoverflow.com/questions/65348890/python-was-not-found-run-without-arguments-to-install-from-the-microsoft-store
  • [ ]

    windows + linux configas

    (cond ((eq system-type 'windows-nt)
           (defun display-startup-echo-area-message ()
             (message "Writing from windows"))
           )
          ((eq system-type 'gnu/linux)
           (defun display-startup-echo-area-message ()
             (message "Writing from linux"))
           ))
    

2 Installation 2:

some useful stuff https://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Location-of-init-file

install emacs from here - http://ftp.task.gda.pl/pub/gnu/emacs/windows/emacs-27/

set home path variable like the guy in this tut - https://lucidmanager.org/productivity/emacs-windows/

do - setx HOME %USERPROFILE% in windows powershell

then you will see that HOME variable has appeared under - settings -> system -> advanced system settings -> environment variables

then open emacs and do C-h v, write user-emacs-directory and enter. It will create an .emacs.d directory under HOME path.

It works, right? okay, now you remember how to set the path.

now go back to environment variables and make it like so - C:\Users\Arvydas\emacs

You will place the .emacs file in that folder and also .emacs.d folder will appear in it. great.

put some variables in .emacs and confirm that emacs got modified

(menu-bar-mode -1) ; Disable the menu bar (tool-bar-mode -1) ; Disable the toolbar (tooltip-mode -1) ; Disable tooltips (set-fringe-mode 10) ; Give some breathing room

worked for me so far.

Time to link it with Dropbox.

add this to the .emacs file. right under use-package installation

(org-babel-load-file (expand-file-name "C:\\Users\\Arvydas\\Dropbox\\temp_emacs\\myinit.org"))

imesk theme i .emacs.d, jokiu folderiu. turetu veikti