GNU bug report logs - #79319
[PATCH] * lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check buffer-file-name

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7 <at> hotmail.com>

Date: Tue, 26 Aug 2025 19:40:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Lin Sun <sunlin7 <at> hotmail.com>
To: 79319 <at> debbugs.gnu.org
Subject: bug#79319: [PATCH] * lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check buffer-file-name 
Date: Tue, 26 Aug 2025 19:33:58 +0000
[Message part 1 (text/plain, inline)]
Hi,

I got an error when try to revert a buffer:
vc-revert: Wrong type argument: stringp, nil

Here is the backtrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  vc-buffer-sync(nil)
  vc-revert()
  funcall-interactively(vc-revert)
  command-execute(vc-revert)


It caused by reverting a buffer which has no file name (like create a buffer but not saving it).
 
This patch will check the `` bebuffer-file-name` before call subsequent function.
Please help review the patch, thanks

Best Regards
Lin
[0001-lisp-vc-vc-dispatcher.el-vc-buffer-sync-Check-buffer-file-name.patch (text/x-patch, attachment)]

This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.