diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-11 13:04:45 +0530 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-11 13:04:45 +0530 |
commit | 40240bbfd7d508570856fdaa43274baa31a30e53 (patch) | |
tree | 005d7c14f4ce1b2fdeec5f529c10a90397fd6fe9 /Emacs | |
parent | 88ae6fc2e813147a6ef509a0f500903cf68019cc (diff) | |
download | dotfiles-40240bbfd7d508570856fdaa43274baa31a30e53.tar.gz dotfiles-40240bbfd7d508570856fdaa43274baa31a30e53.tar.bz2 dotfiles-40240bbfd7d508570856fdaa43274baa31a30e53.zip |
(Emacs/app)~changed project-root function and added aliases
project-root now uses project.el. aliases for goto and project-root.
Diffstat (limited to 'Emacs')
-rw-r--r-- | Emacs/.config/emacs/.config/eshell/aliases | 6 | ||||
-rw-r--r-- | Emacs/.config/emacs/app.org | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Emacs/.config/emacs/.config/eshell/aliases b/Emacs/.config/emacs/.config/eshell/aliases index 17fa780..17b23f2 100644 --- a/Emacs/.config/emacs/.config/eshell/aliases +++ b/Emacs/.config/emacs/.config/eshell/aliases @@ -1,3 +1,5 @@ -alias ff find-file-other-window $1 +alias p~ project-root +alias gt goto +alias clear clear-scrollback alias d dired $1 -alias clear clear-scrollback
\ No newline at end of file +alias ff find-file-other-window $1 diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index d4ac94d..6448ea5 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -547,12 +547,12 @@ directory. "Use `read-directory-name' to change directories." (eshell/cd (list (read-directory-name "Directory?: ")))) - (with-eval-after-load "projectile" - (defun eshell/goto-project-root (&rest args) - "Change to directory `projectile-project-root'" - (if (projectile-project-root) - (eshell/cd (list (projectile-project-root))) - (eshell/echo "Projectile not active here...")))) + (defun eshell/project-root (&rest args) + "Change to directory `project-root'" + (if (project-current) + (eshell/cd (list (project-root (project-current)))) + (eshell/echo (format "[%s]: No project in current directory" + (propertize "Error" 'font-lock-face '(:foreground "red")))))) (defun +eshell/current-buffer () (interactive) |