Syncs /proc/self/cwd
of emacs process with changes to (default-directory)
.
Package doesn’t needs any trigger, as soon as included will start working immediately.
Installation using elpaca:
(use-package chdir
:elpaca (chdir :host github :repo "Animeshz/emacs-chdir"
:files (:default "chdir.el" "chdir-core.so")
:pre-build ("make" "all")))
Alternatively, you can use my nix derivation and install it with home-manager.
Or build nix-derivation directly:
nix build 'github:Animeshz/linux-desktop#emacs-chdir'
I use pwd-launch script to wrap launch of various applications. That allows them to open where the active/focused X window is currently.
Emacs was not updating its /proc/self/cwd
which led my applications to launch where emacs was first launched, not where it currently is. This package provides chdir() syscall to sync the /proc/self/cwd
with changes to (default-directory
elisp variable.