Skip to content

Don't save nonexistent files in the Projectile cache #1551

@emdemir

Description

@emdemir

Expected behavior

The file would be only added to the Projectile when it's saved, or if it already exists when visited.

Actual behavior

When a file is visited, it is immediately added to the Projectile cache, which is annoying if you make a typo because then it keeps coming up in projectile-find-file unless you invalidate the cache, which also clears the MRU ordering.

Steps to reproduce the problem

  1. Open a project that Projectile knows about
  2. Visit a new file that doesn't exist

Environment & Version information

Doom v2.0.9 (9edd4f26f39fc1632d63aebd156ab028d222e733)
Branch: develop

Projectile version information

Projectile 2.2.0snapshot

Emacs version

GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)

Operating system

Debian bullseye/testing

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions