Subject: tramp caches non-existing podman containers
From: Konstantin Kharlamov <[email-masked]>
To: [email-masked]
Date: Tue, 11 Mar 2025 20:35:51 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

When tramp is used to connect to a container, it provides completion
based on what containers are currently running. However, after
containers exit, the completion annoyingly still enlists those dead
containers.

# Steps to reproduce

1. Run any container, e.g.: `podman run --rm -it ubuntu:24.04`
2. Start Emacs as `emacs -Q --eval "(require 'tramp)"`
3. Press `C-x C-f /podman:`, then press TAB to complete the minibuffer
text to container name (it should get completed).
4. Cancel with C-g
5. Exit the container
6. Repeat step 3

## Expected

You'd get no completion because no containers are running.

## Actual

You'd get completion for the non-existing container.

# Version

Emacs built yesterday from master, commit
94ba1b097ed12b9b77ecef4899c18b46b7e2dd36