From b4595662d4739b6f014d6ee9a9edea9f63e24389 Mon Sep 17 00:00:00 2001 From: Akib Azmain Turja Date: Sun, 3 Sep 2023 11:00:28 +0600 Subject: [PATCH] * eat.el (eat-project-other-window): New command --- eat.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eat.el b/eat.el index 07a747d..fae03b2 100644 --- a/eat.el +++ b/eat.el @@ -6991,6 +6991,24 @@ that number, or create it if it doesn't already exist." (eat-buffer-name (project-prefixed-buffer-name "eat"))) (eat nil arg))) +;;;###autoload +(defun eat-project-other-window (&optional arg) + "Start Eat in the current project root directory in another window. + +Start a new Eat session, or switch to an already active session. +Return the buffer selected (or created). + +With a non-numeric prefix ARG, create a new session. + +With a numeric prefix ARG (like +\\[universal-argument] 42 \\[eat-project]), switch to the session with +that number, or create it if it doesn't already exist." + (interactive "P") + (require 'project) + (let* ((default-directory (project-root (project-current t))) + (eat-buffer-name (project-prefixed-buffer-name "eat"))) + (eat-other-window nil arg))) + ;;;; Tracing.