helm-projectile icon indicating copy to clipboard operation
helm-projectile copied to clipboard

One buffer missing when switching to project

Open pataquets opened this issue 2 years ago • 1 comments

Expected behavior

When using helm-projectile from a non-project file, the project list appears. After choosing a project, the Helm list with opened buffers and project files appears. At this point, the non-project file is still open in the only window visible. Then, if a project with two files opened in their respective buffers is selected, the open buffers listing is missing one of the open files, where there should be two listed. Happens also when only one file is open in the project, thus listing no open buffers.

Steps to reproduce the problem

  1. Open two project files in their respective buffers.
  2. Open another, non-project unrelated file in another buffer (e.g. *Messages*).
  3. Run helm-projectile (I run it via its <f6> keybind).
  4. Select the project corresponding to files opened in step 1.
  5. When the helm list presented afterwards with the project buffers and files, only one of the two open files is listed in the Project buffers section.

Note: if the error is not reproduced (which sometimes I experienced while writing these steps), try repeating twice. If files have not been visited before in the current session, first time seems to work OK.

Backtraces if necessary (M-x toggle-debug-on-error)

N/A

Environment & version information

(I've just updated packages before filing the issue and writing the repro steps)

  • helm-projectile version: 20221215.613, commit: 35a2111d00c0c0c9d8743280d3f1243bb217118a
  • helm version (in helm-pkg.el): "20230306.1500", helm-core: 3.9.0, commit emacs-helm/helm@128e162fd3a16609fb618ff74d21d1470cdf1439
  • projectile version (M-x projectile-version): 20230306.636
  • Emacs version (M-x emacs-version): GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2022-05-31
  • OS: Ubuntu Bionic

pataquets avatar Mar 06 '23 17:03 pataquets

as same as switch open project buffer command.

studytimesz avatar Oct 26 '23 05:10 studytimesz

  1. Run helm-projectile (I run it via its <f6> keybind).
  2. Select the project corresponding to files opened in step 1.
  3. When the helm list presented afterwards with the project buffers and files, only one of the two open files is listed in the Project buffers section.

What I struggle to understand is how a helm with a source for project buffers and a source for project files after switching a project in point 3.

helm-projectile, when invoked from not a project buffer, had been using helm-projectile-switch-project which in turn used projectil-switch-project-by-name. (With exception of a short period between 622e89f7a96c36ce8315f1b2a550d8d504b3273 (commit date: 2020-12-08) and 58123f14c392021714fc5d23b9f95c7f95ce07f1 (commit date: 2020-12-17) when it used helm-projectile.

However now new helm-projectils-switch-project-by-name is used that uses presents user with files only (since f1775da68b627858aee06eaf214d65c707fb8bd7), so the issue with vanishing buffer shouldn't be a case.

Regardless there's issue #177 which clearly requests that the current buffer be visible, which I am inclined to add.

pkryger avatar Aug 07 '25 13:08 pkryger