Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#+TITLE: My Windows Emacs configuration
#+AUTHOR: DooMWhite
#+DESCRIPTION: DooMWhite's personal Emacs config
#+STARTUP: showeverything
#+OPTIONS: toc:2

* TABLE OF CONTENTS
  - [[#dependencies][Dependencies]]
  - [[#how-to-use-the-server-script][How to use the server script]]
  - [[#how-to-set-a-taskbar-shortcut-for-the-client-that-occupies-only-1-slot][How to set a taskbar shortcut for the client that occupies only 1 slot]]
  - [[#adding-the-client-to-the-gitconfig-editor][Adding the client to the gitconfig editor]]

* Dependencies
  - Windows Emacs 29+ 
    + And its bin folder in the PATH
  - IBM Plex Mono font
  - HOME environment variable to the parent folder of the configuration 

* Powershell aliases
+ Client
  #+begin_src powershell
    function mx {
        emacsclientw $args
    }
    function mxc {
        emacsclientw -c -n $args
    }
  #+end_src
+ Server
  #+begin_src powershell
    functoin mxd {
        emacs --daemon $args
    }
    function mxs {
        $emacsScriptPath = "$env:HOME\.config\emacs\scripts\windows\StartEmacsServer.bat"
        Start-Process -FilePath $emacsScriptPath -NoNewWindow
    }
  #+end_src

* How to use the server script
- Automatically start the server on startup
  + Make a symlink of the script
  + Open the startup folder of windows
    + Win+R > shell::startup
  + Place the symlink in the startup folder
  + The state of the startup script if verifiable in the task manager
- If you are having issues creating the server to attach, then try this:
    + Changing the server's folder author to the current user, instead of the Admin.
      * Select the folder.
      * Go to its properties.
      * Go to the 'Security' tab.
      * Click on the 'Advanced' button.
      * On the top of the window will have the field 'Owner', change it to your user.
- Or try debugging the server to find the error source.
    + emacs --daemon --debug-init

* How to set a taskbar shortcut for the client that occupies only 1 slot
  - A change in the Windows registry will be required, it will change the Details part of the properties from every file in OS.
    + Create a string value in HKEY_CLASSES_ROOT\lnkfile called 'FullDetails'
    + Set its value to: 
        + prop:System.PropGroup.Description;System.ItemTypeText;System.Comment;System.Link.TargetParsingPath;System.AppUserModel.ID;System.ItemFolderPathDisplay;prop:System.PropGroup.FileSystem;System.ItemNameDisplay;System.Size;System.DateCreated;System.DateModified;System.FileAttributes;*System.OfflineAvailability;*System.OfflineStatus;*System.SharedWith;*System.FileOwner;*System.ComputerName
    + Make a shortcut for the emacsclient such as: 
        + Target: emacsclientw.exe -c -n
    + Go to the shortcut's properties.
    + Go to the Details tab.
    + Find a field called 'AppUserModelId'.
    + Change it to the Emacs executable same ID.
        + Currently it's 'GNU.Emacs'.
  
* Adding the client to the gitconfig editor
  - Simply add this to the config:
    + editor = emacsclientw -a runemacs

* All-the-icons are not showing up
- Clone the repo: https://github.com/domtronn/all-the-icons.el.git
- Install all the fonts in the 'fonts' folder

* How to set the "Opens With" by file extension
- Open cmd.exe with as an Admin
- Set the file type alias
  The full path to the .exe is required
  #+begin_src cmd
    ftype EmacsFileType="emacsclientw.exe" -c -n "%1"
  #+end_src
- Set the file association
  'X' is the file extension to add the file association
  #+begin_src cmd
    assoc .X=EmacsFileType
  #+end_src
- If that it has no effect, check this link out: https://superuser.com/questions/1370681/assoc-ftype-does-not-work-properly-on-windows-10

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages