GNU bug report logs - #59962
29.0.60; vc commands fail in diff-mode

Previous Next

Package: emacs;

Reported by: Sven Joachim <svenjoac <at> gmx.de>

Date: Sun, 11 Dec 2022 12:26:02 UTC

Severity: normal

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59962 in the body.
You can then email your comments to 59962 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to svenjoac <at> gmx.de, bug-gnu-emacs <at> gnu.org:
bug#59962; Package emacs. (Sun, 11 Dec 2022 12:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac <at> gmx.de>:
New bug report received and forwarded. Copy sent to svenjoac <at> gmx.de, bug-gnu-emacs <at> gnu.org. (Sun, 11 Dec 2022 12:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sven Joachim <svenjoac <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; vc commands fail in diff-mode
Date: Sun, 11 Dec 2022 13:25:11 +0100
As a distribution maintainer, I find myself working with
version-controlled patches which Emacs visits in diff-mode.
Unfortunately, there is a bad interaction between diff-mode and vc,
which makes all vc commands fail.  This is what I got on C-x v l:

,----
| Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
|   file-truename(nil)
|   find-buffer-visiting(nil)
|   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
|   vc-diff(nil t)
|   funcall-interactively(vc-diff nil t)
|   call-interactively(vc-diff nil nil)
|   command-execute(vc-diff)
`----

In GNU Emacs 29.0.60 (build 7, x86_64-pc-linux-gnu, GTK+ Version
 2.24.33, cairo version 1.16.0) of 2022-12-11 built on turtle
Repository revision: 9f7e5584a4ff3c61a90301f70366a829c2c0ac04
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info/emacs-snapshot
 --mandir=/usr/share/man --with-mailutils
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/29.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.0.60/site-lisp:/usr/share/emacs/site-lisp
 --without-wide-int --without-modules --disable-silent-rules
 --without-compress-install --with-x=yes --with-x-toolkit=gtk2
 --without-gconf --without-gsettings build_alias=x86_64-linux-gnu
 host_alias=x86_64-linux-gnu 'CFLAGS=-g -O2
 -fdebug-prefix-map=/usr/local/src/emacs=. -fstack-protector-strong
 -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro
 -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -DDEBIAN
 -DSITELOAD_PURESIZE_EXTRA=5000 -DGLIB_DISABLE_DEPRECATION_WARNINGS''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11
XDBE XIM XINPUT2 XPM GTK2 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils display-line-numbers
cl-extra help-fns radix-tree cl-print byte-opt gv bytecomp byte-compile
debug backtrace help-mode find-func vc-hg vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs log-view pcvs-util vc cus-start cus-load smerge-mode diff
vc-git vc-dispatcher diff-mode easy-mmode dired-aux cl-loaddefs cl-lib
dired dired-loaddefs rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit
xinput2 x multi-tty make-network-process emacs)

Memory information:
((conses 16 73162 8220)
 (symbols 48 8827 0)
 (strings 32 25552 1356)
 (string-bytes 1 703829)
 (vectors 16 15405)
 (vector-slots 8 205042 14002)
 (floats 8 34 35)
 (intervals 56 755 0)
 (buffers 976 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59962; Package emacs. (Sun, 11 Dec 2022 16:48:01 GMT) Full text and rfc822 format available.

Message #8 received at 59962 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Sven Joachim <svenjoac <at> gmx.de>
Cc: 59962 <at> debbugs.gnu.org
Subject: Re: bug#59962: 29.0.60; vc commands fail in diff-mode
Date: Sun, 11 Dec 2022 17:46:47 +0100
Sven Joachim <svenjoac <at> gmx.de> writes:

> As a distribution maintainer, I find myself working with
> version-controlled patches which Emacs visits in diff-mode.
> Unfortunately, there is a bad interaction between diff-mode and vc,
> which makes all vc commands fail.  This is what I got on C-x v l:
>
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> |   file-truename(nil)
> |   find-buffer-visiting(nil)
> |   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
> |   vc-diff(nil t)
> |   funcall-interactively(vc-diff nil t)
> |   call-interactively(vc-diff nil nil)
> |   command-execute(vc-diff)
> `----
>

Could you detail the steps to reproduce this issue (preferably from
emacs -Q)?  I've tried C-x v l on a few Git-version-controlled .patch
files (in Diff mode) but I couldn't reproduce the error.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59962; Package emacs. (Sun, 11 Dec 2022 17:19:01 GMT) Full text and rfc822 format available.

Message #11 received at 59962 <at> debbugs.gnu.org (full text, mbox):

From: Sven Joachim <svenjoac <at> gmx.de>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 59962 <at> debbugs.gnu.org
Subject: Re: bug#59962: 29.0.60; vc commands fail in diff-mode
Date: Sun, 11 Dec 2022 18:18:44 +0100
On 2022-12-11 17:46 +0100, Daniel Martín wrote:

> Sven Joachim <svenjoac <at> gmx.de> writes:
>
>> As a distribution maintainer, I find myself working with
>> version-controlled patches which Emacs visits in diff-mode.
>> Unfortunately, there is a bad interaction between diff-mode and vc,
>> which makes all vc commands fail.  This is what I got on C-x v l:
>>
>> ,----
>> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>> |   file-truename(nil)
>> |   find-buffer-visiting(nil)
>> |   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
>> |   vc-diff(nil t)
>> |   funcall-interactively(vc-diff nil t)
>> |   call-interactively(vc-diff nil nil)
>> |   command-execute(vc-diff)
>> `----
>>
>
> Could you detail the steps to reproduce this issue (preferably from
> emacs -Q)?  I've tried C-x v l on a few Git-version-controlled .patch
> files (in Diff mode) but I couldn't reproduce the error.  Thanks.

$ git clone https://salsa.debian.org/xorg-team/app/xterm.git

Then visit any of the xterm/debian/patches/*.diff files and type
C-x v l.

Cheers,
       Sven




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59962; Package emacs. (Sun, 11 Dec 2022 17:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 59962 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Sven Joachim <svenjoac <at> gmx.de>
Cc: 59962 <at> debbugs.gnu.org
Subject: Re: bug#59962: 29.0.60; vc commands fail in diff-mode
Date: Sun, 11 Dec 2022 19:24:54 +0200
close 59962 29.0.60
thanks

> As a distribution maintainer, I find myself working with
> version-controlled patches which Emacs visits in diff-mode.
> Unfortunately, there is a bad interaction between diff-mode and vc,
> which makes all vc commands fail.  This is what I got on C-x v l:
>
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> |   file-truename(nil)
> |   find-buffer-visiting(nil)
> |   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
> |   vc-diff(nil t)
> |   funcall-interactively(vc-diff nil t)
> |   call-interactively(vc-diff nil nil)
> |   command-execute(vc-diff)
> `----

Thanks for the bug report.  It's fixed now on the emacs-29 branch.




bug marked as fixed in version 29.0.60, send any further explanations to 59962 <at> debbugs.gnu.org and Sven Joachim <svenjoac <at> gmx.de> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sun, 11 Dec 2022 17:26:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59962; Package emacs. (Sun, 11 Dec 2022 17:31:01 GMT) Full text and rfc822 format available.

Message #19 received at 59962 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Daniel Martín via "Bug reports for GNU Emacs, the
 Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Cc: 59962 <at> debbugs.gnu.org, Sven Joachim <svenjoac <at> gmx.de>,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#59962: 29.0.60; vc commands fail in diff-mode
Date: Sun, 11 Dec 2022 19:28:06 +0200
>> As a distribution maintainer, I find myself working with
>> version-controlled patches which Emacs visits in diff-mode.
>> Unfortunately, there is a bad interaction between diff-mode and vc,
>> which makes all vc commands fail.  This is what I got on C-x v l:
>>
>> ,----
>> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>> |   file-truename(nil)
>> |   find-buffer-visiting(nil)
>> |   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
>> |   vc-diff(nil t)
>> |   funcall-interactively(vc-diff nil t)
>> |   call-interactively(vc-diff nil nil)
>> |   command-execute(vc-diff)
>> `----
>
> Could you detail the steps to reproduce this issue (preferably from
> emacs -Q)?  I've tried C-x v l on a few Git-version-controlled .patch
> files (in Diff mode) but I couldn't reproduce the error.  Thanks.

The new feature of using 'C-x v v' on a diff buffer to commit it
as a patch should not be used when the diff buffer is vc-controlled.
This also means that 'C-x v v' on a file that even is not yet
vc-controlled, after the recent fix will register the file in vcs,
instead of committing it as a patch.  'C-x v v' for committing
the patch will be supported only on non-file buffers.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 Jan 2023 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 244 days ago.

Previous Next


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