emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in project-shell?


From: Juan José García-Ripoll
Subject: Re: Error in project-shell?
Date: Wed, 16 Mar 2022 16:15:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt)

I have been doing further tests and I think that the actual definition
should read as follows

(defun project-shell-fix ()
  "Fixed version for project-shell"
  (interactive)
  (require 'comint)
  (let* ((default-directory (expand-file-name (project-root (project-current 
t))))
         (default-project-shell-name (project-prefixed-buffer-name "shell"))
         (shell-buffer (get-buffer default-project-shell-name)))
        (if (comint-check-proc shell-buffer)
        (pop-to-buffer shell-buffer (bound-and-true-p 
display-comint-buffer-action))
      (shell (or shell-buffer default-project-shell-name)))))

The change in the last line is needed, because otherwise the shell is
created with the wrong name.

-- 
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es




reply via email to

[Prev in Thread] Current Thread [Next in Thread]