Subject: bug#41879: 28.0.50; [Patch]: Add project-switch-to-buffer in project.el

From: "Philip K." <[email-masked]>
Date: Tue, 16 Jun 2020 08:11:46 +0200

Theodor Thornhill <[email-masked]> writes:

> +;;;###autoload
> +(defun project-switch-to-buffer ()
> +  "Switch to a buffer in the current project."
> +  (interactive)
> +  (let ((root (project-root (project-current t))))
> +    (switch-to-buffer
> +     (read-buffer
> +      "Switch-to-buffer: " nil t
> +      (lambda (buffer)
> +        (when-let ((file (buffer-file-name (cdr buffer))))
> +          (when (file-in-directory-p file root)
> +            t)))))))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Shouldn't this just be (file-in-directory-p file root), without the
(when ... t)?

-- 
	Philip K.