From 338cc9404da154ff6a0b3130e93d0d6a6fe572d9 Mon Sep 17 00:00:00 2001 From: Benni Schwerdtner Date: Sat, 28 Oct 2023 10:05:54 +0200 Subject: [PATCH] Use locate-dominating-file instead of counsel --- le-python.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/le-python.el b/le-python.el index da7aa50b..57368da5 100644 --- a/le-python.el +++ b/le-python.el @@ -298,7 +298,8 @@ it at one time." (defvar lispy--python-init-file nil) (defun lispy--python-poetry-name () - (let ((pyproject (expand-file-name "pyproject.toml" (counsel-locate-git-root)))) + (let ((pyproject + (file-name-directory (locate-dominating-file (buffer-file-name) "pyproject.toml")))) (and (file-exists-p pyproject) (not (equal python-shell-interpreter "python")) (with-current-buffer (find-file-noselect pyproject)