|
From: | Philip K. |
Subject: | bug#41879: 28.0.50; [Patch]: Add project-switch-to-buffer in project.el |
Date: | Tue, 16 Jun 2020 08:11:46 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Theodor Thornhill <theo@thornhill.no> 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.
[Prev in Thread] | Current Thread | [Next in Thread] |