Subject: bug#79137: 31.0.50; (vc-buffer-sync-fileset) cannot complete if unrelated no-longer-reachable TRAMP buffers exist

From: Michael Albinus <[email-masked]>
Date: Fri, 01 Aug 2025 14:50:53 +0200

Dima Kogan <[email-masked]> writes:

Hi Dima,

>   (defun vc-buffer-sync-fileset (fileset &optional not-essential missing-in-dirs)
>     "Call `vc-buffer-sync' for most buffers visiting files in FILESET.
>   NOT-ESSENTIAL means it is okay to continue if the user says not to save.
>
>   For files named explicitly in FILESET, this function always syncs their
>   buffers.  By contrast, for directories named in FILESET, its behavior
>   depends on MISSING-IN-DIRS.  For each directory named in FILESET, it
>   considers buffers visiting any file contained within that directory or
>   its subdirectories.  If MISSING-IN-DIRS is nil, it syncs only those
>   buffers whose files exist on disk.  Otherwise it syncs all of them."
>     ;; This treatment of directories named in FILESET is wanted for, at
>     ;; least, users with `vc-find-revision-no-save' set to non-nil: not
>     ;; treating directories this way would imply calling `vc-buffer-sync'
>     ;; on all buffers generated by \\`C-x v ~' during \\`C-x v D'.
>     (let (dirs buffers)

Does it help to use here

(let ((non-essential t)
      dirs buffers)

> Thanks.

Best regards, Michael.