Package: emacs;
Reported by: Aleksandr Vityazev <avityazev <at> disroot.org>
Date: Sun, 14 Jan 2024 08:01:03 UTC
Severity: normal
Found in version 30.0.50
To reply to this bug, email your comments to 68443 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Sun, 14 Jan 2024 08:01:04 GMT) Full text and rfc822 format available.Aleksandr Vityazev <avityazev <at> disroot.org>
:bug-gnu-emacs <at> gnu.org
.
(Sun, 14 Jan 2024 08:01:04 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Aleksandr Vityazev <avityazev <at> disroot.org> To: bug-gnu-emacs <at> gnu.org Subject: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Sat, 13 Jan 2024 16:56:15 +0300
Hi, Steps to reproduce with emacs -q: 1. Enter git repository; 2. vc-delete-file some file; 3. vc-root-diff; 4. From *vc-diff* buffer vc-next-action; 5. In *vc-log* write summary and invoke vc-next-action; 6. get error (wrong-type-argument stringp nil) Full backtrace: Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-directory-p(nil) #f(compiled-function (files comment) #<bytecode 0x1e31e0a127714b22>)((#(".gitignore" 0 10 (fontified t face (diff-file-header diff-header))) #("buffer.c" 0 8 (fontified t face (diff-file-header diff-header))) nil) #("Summary: Delete file.\n" 0 8 (jit-lock-defer-multiline t face log-edit-header fontified t field header) 8 9 (jit-lock-defer-multiline t fontified t field header) 9 21 (jit-lock-defer-multiline t face log-edit-summary fontified t field header) 21 22 (fontified t))) vc-finish-logentry() funcall-interactively(vc-finish-logentry) log-edit-done() funcall-interactively(log-edit-done) command-execute(log-edit-done) In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) System Description: Guix System Configured using: 'configure CONFIG_SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash --prefix=/gnu/store/bm7n1h9d8x05wwbk727gckmwgf99whlv-emacs-rrr-next-30.0.50-46.d376462 --enable-fast-install --with-pgtk --without-libsystemd --with-tree-sitter --with-native-compilation --with-cairo --with-modules --with-native-compilation=aot --disable-build-details' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $EMACSLOADPATH: /home/user/.guix-home/profile/share/emacs/site-lisp:/gnu/store/bm7n1h9d8x05wwbk727gckmwgf99whlv-emacs-rrr-next-30.0.50-46.d376462/share/emacs/30.0.50/lisp value of $EMACSNATIVELOADPATH: /home/user/.guix-home/profile/lib/emacs/native-site-lisp value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Debbugs Minor modes in effect: header-line-indent-mode: t telega-adblock-mode: t telega-x-mode: t global-telega-mnz-mode: t telega-root-auto-fill-mode: t telega-active-video-chats-mode: t telega-active-locations-mode: t telega-patrons-mode: t telega-active-stories-mode: t server-mode: t eros-mode: t envrc-global-mode: t envrc-mode: t savehist-mode: t electric-pair-mode: t midnight-mode: t global-so-long-mode: t company-posframe-mode: t global-company-mode: t company-mode: t fancy-battery-mode: t reverse-im-mode: t global-guix-prettify-mode: t vertico-mode: t marginalia-mode: t mood-line-mode: t global-auto-revert-mode: t save-place-mode: t recentf-mode: t pixel-scroll-precision-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /gnu/store/pgshdvjd1d05x4rs0bs7wg1rxh39qzac-emacs-soap-client-3.2.3/share/emacs/site-lisp/soap-client-3.2.3/soap-inspect hides /gnu/store/bm7n1h9d8x05wwbk727gckmwgf99whlv-emacs-rrr-next-30.0.50-46.d376462/share/emacs/30.0.50/lisp/net/soap-inspect /gnu/store/pgshdvjd1d05x4rs0bs7wg1rxh39qzac-emacs-soap-client-3.2.3/share/emacs/site-lisp/soap-client-3.2.3/soap-client hides /gnu/store/bm7n1h9d8x05wwbk727gckmwgf99whlv-emacs-rrr-next-30.0.50-46.d376462/share/emacs/30.0.50/lisp/net/soap-client Features: (shadow nndoc debbugs-gnu debbugs-compat debbugs soap-client rng-xsd rng-dt rng-util xsd-regexp av-guix plz guix-ui-package guix-license guix-ui-store-item guix-package guix-location sh-script smie treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs tar-mode arc-mode archive-mode display-line-numbers transmission calc-bin calc-ext calc calc-loaddefs calc-macs link-hint smiley textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-bcklg sort gnus-ml disp-table qp epa-file nnmaildir nnfolder nnnil av-message ace-window face-remap telega-adblock telega-x ol-telega telega-mnz telega-dired-dwim telega-obsolete telega telega-tdlib-events telega-webpage telega-root emacsbug consult-xref mm-archive network-stream url-http url-gw nsm url-auth multitran ispell log-edit add-log goto-addr rect find-dired consult-imenu dabbrev smerge-mode diff pulsar pulse jka-compr gnus-async gnus-cite gnus-cus gnus-demon gnus-diary nndiary gnus-draft gnus-agent nnvirtual nntp gnus-cache nndraft nnmh gnus-dup gnus-fun gnus-html url-queue url-cache mm-url gnus-kill gnus-logic gnus-mh mh-comp mh-scan mh-gnus mh-e mh-buffers mh-loaddefs gnus-registry registry eieio-base rmailsum rmail gnus-salt gnus-score score-mode gnus-srvr gnus-topic gnus-uu yenc gnus-vm nnselect copyright executable hl-line dired-x diff-hl-dired gnus-dired denote project-rg rg rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs grep misearch multi-isearch av-vc guix-devel edit-indirect guix-misc guix-ui guix-ui-messages bui bui-list bui-info bui-entry bui-core bui-history bui-button guix-read guix-help-vars guix-repl guix-profiles guix-external guix-config guix-build-config guix-geiser geiser-mode geiser-xref geiser-compile guix-guile geiser-guile info-look info transient edmacro kmacro geiser geiser-debug geiser-repl geiser-image geiser-capf geiser-doc geiser-menu geiser-autodoc geiser-edit etags fileloop xref geiser-completion geiser-eval geiser-connection tq geiser-syntax geiser-impl geiser-log geiser-popup view geiser-custom geiser-base al-scheme arei arei-nrepl queue sesman scheme tramp-cmds autoinsert embark-org embark-consult embark consult mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win message sendmail yank-media rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus nnheader gnus-util mail-utils range mm-util mail-prsvr cl-print telega-match telega-info telega-chat visual-fill-column telega-modes image-mode exif telega-filter telega-sort telega-company telega-emoji telega-user telega-notifications telega-voip telega-ins telega-folders telega-inline telega-msg telega-story telega-tme telega-sticker telega-i18n telega-vvnote telega-util telega-topic rainbow-identifiers org-element org-persist org-id org-refile avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs org-version org-compat org-macs dired-aux color puny bindat telega-ffplay telega-media telega-tdlib telega-server telega-core telega-customize svg dom cursor-sensor dired-subtree dired-hacks-utils dired dired-loaddefs mule-util vertico-repeat help-fns radix-tree server time av-skempo skempo tempo skeleton mode-local derived package-lint-flymake package-lint let-alist imenu finder finder-inf find-func lisp-mnt package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers eros flymake-guile flymake tramp-sh project diff-hl log-view pcvs-util vc-dir ewoc vc debbugs-browse bug-reference envrc inheritenv savehist elec-pair ffap midnight so-long company-files company-keywords company-dabbrev-code company-dabbrev company-capf company-posframe posframe company pcase thingatpt detached tramp-cache time-stamp tramp trampver tramp-integration files-x tramp-message tramp-compat shell pcomplete parse-time iso8601 time-date format-spec auth-source-pass url-parse url-vars auth-source eieio password-cache json map byte-opt tramp-loaddefs notifications appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs fancy-battery battery dbus compile comint ansi-osc ansi-color xml reverse-im cus-start avy quail guix-prettify guix-utils bui-utils dash guix-auto-mode guix inspector-autoloads graphql-ts-mode-autoloads devicetree-ts-mode-autoloads ts-query-highlight-autoloads try-autoloads tmr-autoloads queue-autoloads sesman-autoloads arei-autoloads pulsar-autoloads oauth2-autoloads shikimori-autoloads al-scheme-autoloads av-autoloads hl-todo-autoloads async-autoloads with-editor-autoloads password-store-autoloads company-ebdb-autoloads ebdb-autoloads eieio-core cl-macs ledger-mode-autoloads rde-ledger-autoloads plz-autoloads srht-autoloads soap-client-autoloads debbugs-autoloads rde-gnus-autoloads rde-browse-url-autoloads emms-autoloads rde-emms-autoloads mastodon-alt-autoloads ts-autoloads persist-autoloads request-autoloads mastodon-autoloads telega-x-autoloads telega-contrib-autoloads rainbow-identifiers-autoloads visual-fill-column-autoloads telega-autoloads rde-telega-autoloads rde-message-autoloads denote-autoloads rde-denote-autoloads sdcwoc-autoloads multitran-autoloads info-colors-autoloads esh-help-autoloads elisp-demos-autoloads olivetti-autoloads kv-autoloads esxml-autoloads nov-el-autoloads saveplace-pdf-view-autoloads tablist-autoloads pdf-tools-autoloads rde-pdf-tools-autoloads daemons-autoloads cuirass-autoloads magit-popup-autoloads edit-indirect-autoloads bui-autoloads guix-autoloads rde-guix-autoloads geiser-guile-autoloads geiser-autoloads diff-hl-autoloads agitate-autoloads git-timemachine-autoloads git-link-autoloads rde-git-autoloads package-lint-autoloads eros-autoloads rde-elisp-autoloads flymake-guile-autoloads rde-flymake-autoloads ace-window-autoloads wgrep-autoloads rg-autoloads project-rg-autoloads rde-project-autoloads reverse-im-autoloads fancy-battery-autoloads sudo-edit-autoloads rde-tramp-autoloads s-autoloads f-autoloads eimp-autoloads dired-hacks-autoloads rde-dired-autoloads eshell-prompt-extras-autoloads eshell-syntax-highlighting-autoloads rde-eshell-autoloads rde-comint-autoloads detached-autoloads skempo-autoloads rde-abbrev-autoloads link-hint-autoloads avy-autoloads vertico-x-autoloads vertico-autoloads consult-autoloads posframe-autoloads company-posframe-autoloads company-autoloads pcmpl-args-autoloads marginalia-autoloads orderless-autoloads rde-completion-autoloads almost-mono-white-autoloads mood-line-autoloads rde-startup-autoloads rde-keymaps-autoloads rde-emacs-base-autoloads rde-compile-autoloads rde-mpv-autoloads rde-sway-autoloads rde-fonts-autoloads feature-loader-autoloads feature-loader rde-pass rde-ebdb rde-ledger rde-tab-bar rde-srht rde-debbugs rde-gnus rde-browse-url rde-emms rde-mastodon rde-telega rde-message rde-denote rde-spelling rde-info rde-help rde-nov-el rde-pdf-tools saveplace-pdf-view bookmark text-property-search rde-xref rde-guix rde-geiser rde-git vc-git diff-mode easy-mmode vc-dispatcher rde-elisp rde-flymake rde-eglot rde-window-ace rde-project rde-input-method rde-battery rde-calendar rde-tramp rde-dired rde-eshell rde-comint rde-proced rde-detached rde-shell rde-abbrev rde-avy rde-vertico vertico-x vertico rde-completion marginalia compat orderless rde-window rde-appearance almost-mono-white-theme almost-mono-themes mood-line rde-emacs-base autorevert filenotify advice cap-words superword subword saveplace recentf tree-widget rde-keymaps rde-compile rde-envrc rde-bluetooth rde-transmission rde-mpv rde-sway comp cl-seq comp-cstr cl-extra help-mode warnings gv comp-run bytecomp byte-compile comp-common rx rde-fonts xdg fontaine rde-networking inheritenv-autoloads envrc-autoloads dash-autoloads bluetooth-autoloads transmission-autoloads mpv-autoloads compat-autoloads embark-autoloads sway-autoloads fontaine-autoloads eiwc-autoloads guix-emacs cus-edit pp cus-load icons wid-edit cl-loaddefs cl-lib pixel-scroll cua-base ring subr-x rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-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 dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 2744491 768129) (symbols 48 78765 35) (strings 32 475567 143689) (string-bytes 1 12851799) (vectors 16 146471) (vector-slots 8 3443702 186575) (floats 8 214860 2010) (intervals 56 51972 7189) (buffers 992 86)) -- Best regards, Aleksandr Vityazev
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 04:26:01 GMT) Full text and rfc822 format available.Message #8 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Dmitry Gutov <dmitry <at> gutov.dev> To: Aleksandr Vityazev <avityazev <at> disroot.org>, 68443 <at> debbugs.gnu.org Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 06:25:34 +0200
Hi! Thanks for the report. On 13/01/2024 15:56, Aleksandr Vityazev via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Hi, > > Steps to reproduce with emacs -q: > > 1. Enter git repository; > 2. vc-delete-file some file; > 3. vc-root-diff; > 4. From *vc-diff* buffer vc-next-action; > 5. In *vc-log* write summary and invoke vc-next-action; > 6. get error (wrong-type-argument stringp nil) > > Full backtrace: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > file-directory-p(nil) > #f(compiled-function (files comment) #<bytecode 0x1e31e0a127714b22>)((#(".gitignore" 0 10 (fontified t face (diff-file-header diff-header))) #("buffer.c" 0 8 (fontified t face (diff-file-header diff-header))) nil) #("Summary: Delete file.\n" 0 8 (jit-lock-defer-multiline t face log-edit-header fontified t field header) 8 9 (jit-lock-defer-multiline t fontified t field header) 9 21 (jit-lock-defer-multiline t face log-edit-summary fontified t field header) 21 22 (fontified t))) > vc-finish-logentry() > funcall-interactively(vc-finish-logentry) > log-edit-done() > funcall-interactively(log-edit-done) > command-execute(log-edit-done) Try the patch below, seems to work here: diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 03efe0fdb31..83d580d98dd 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset (goto-char (point-min)) (while (progn (diff-file-next) (not (eobp))) (push (diff-find-file-name nil t) files))) - (list backend (nreverse files) nil nil 'patch))) + (list backend (delete nil (nreverse files)) nil nil 'patch))) (defun diff--filter-substring (str) (when diff-font-lock-prettify (Eli, would this be suitable for emacs-29?)
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 10:57:02 GMT) Full text and rfc822 format available.Message #11 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Aleksandr Vityazev <avityazev <at> disroot.org> To: Dmitry Gutov <dmitry <at> gutov.dev> Cc: 68443 <at> debbugs.gnu.org Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 13:56:08 +0300
On 2024-01-17 06:25, Dmitry Gutov wrote: > Hi! Thanks for the report. > > On 13/01/2024 15:56, Aleksandr Vityazev via Bug reports for GNU Emacs, > the Swiss army knife of text editors wrote: >> Hi, >> Steps to reproduce with emacs -q: >> 1. Enter git repository; >> 2. vc-delete-file some file; >> 3. vc-root-diff; >> 4. From *vc-diff* buffer vc-next-action; >> 5. In *vc-log* write summary and invoke vc-next-action; >> 6. get error (wrong-type-argument stringp nil) >> Full backtrace: >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> file-directory-p(nil) >> #f(compiled-function (files comment) #<bytecode >> 0x1e31e0a127714b22>)((#(".gitignore" 0 10 (fontified t face >> (diff-file-header diff-header))) #("buffer.c" 0 8 (fontified t face >> (diff-file-header diff-header))) nil) #("Summary: Delete file.\n" 0 >> 8 (jit-lock-defer-multiline t face log-edit-header fontified t field >> header) 8 9 (jit-lock-defer-multiline t fontified t field header) 9 >> 21 (jit-lock-defer-multiline t face log-edit-summary fontified t >> field header) 21 22 (fontified t))) >> vc-finish-logentry() >> funcall-interactively(vc-finish-logentry) >> log-edit-done() >> funcall-interactively(log-edit-done) >> command-execute(log-edit-done) > > Try the patch below, seems to work here: > > diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el > index 03efe0fdb31..83d580d98dd 100644 > --- a/lisp/vc/diff-mode.el > +++ b/lisp/vc/diff-mode.el > @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset > (goto-char (point-min)) > (while (progn (diff-file-next) (not (eobp))) > (push (diff-find-file-name nil t) files))) > - (list backend (nreverse files) nil nil 'patch))) > + (list backend (delete nil (nreverse files)) nil nil 'patch))) Yes with this patch the error is no longer present, but the deleted file is not displayed in the *log-edit-files* buffer, unlike if you run vc-next-action from *vc-dir*. Although this is another bug report. > (defun diff--filter-substring (str) > (when diff-font-lock-prettify > > > (Eli, would this be suitable for emacs-29?) > -- Best regards, Aleksandr Vityazev
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 11:35:02 GMT) Full text and rfc822 format available.Message #14 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Dmitry Gutov <dmitry <at> gutov.dev> Cc: 68443 <at> debbugs.gnu.org, avityazev <at> disroot.org Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 13:34:31 +0200
> Date: Wed, 17 Jan 2024 06:25:34 +0200 > From: Dmitry Gutov <dmitry <at> gutov.dev> > > Try the patch below, seems to work here: > > diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el > index 03efe0fdb31..83d580d98dd 100644 > --- a/lisp/vc/diff-mode.el > +++ b/lisp/vc/diff-mode.el > @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset > (goto-char (point-min)) > (while (progn (diff-file-next) (not (eobp))) > (push (diff-find-file-name nil t) files))) > - (list backend (nreverse files) nil nil 'patch))) > + (list backend (delete nil (nreverse files)) nil nil 'patch))) > > (defun diff--filter-substring (str) > (when diff-font-lock-prettify > > > (Eli, would this be suitable for emacs-29?) Yes, thanks. Just do it soon, please, if you can.
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 11:38:02 GMT) Full text and rfc822 format available.Message #17 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Dmitry Gutov <dmitry <at> gutov.dev> To: Aleksandr Vityazev <avityazev <at> disroot.org>, Juri Linkov <juri <at> linkov.net> Cc: 68443 <at> debbugs.gnu.org Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 13:36:53 +0200
On 17/01/2024 12:56, Aleksandr Vityazev wrote: > On 2024-01-17 06:25, Dmitry Gutov wrote: > >> Hi! Thanks for the report. >> >> On 13/01/2024 15:56, Aleksandr Vityazev via Bug reports for GNU Emacs, >> the Swiss army knife of text editors wrote: >>> Hi, >>> Steps to reproduce with emacs -q: >>> 1. Enter git repository; >>> 2. vc-delete-file some file; >>> 3. vc-root-diff; >>> 4. From *vc-diff* buffer vc-next-action; >>> 5. In *vc-log* write summary and invoke vc-next-action; >>> 6. get error (wrong-type-argument stringp nil) >>> Full backtrace: >>> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >>> file-directory-p(nil) >>> #f(compiled-function (files comment) #<bytecode >>> 0x1e31e0a127714b22>)((#(".gitignore" 0 10 (fontified t face >>> (diff-file-header diff-header))) #("buffer.c" 0 8 (fontified t face >>> (diff-file-header diff-header))) nil) #("Summary: Delete file.\n" 0 >>> 8 (jit-lock-defer-multiline t face log-edit-header fontified t field >>> header) 8 9 (jit-lock-defer-multiline t fontified t field header) 9 >>> 21 (jit-lock-defer-multiline t face log-edit-summary fontified t >>> field header) 21 22 (fontified t))) >>> vc-finish-logentry() >>> funcall-interactively(vc-finish-logentry) >>> log-edit-done() >>> funcall-interactively(log-edit-done) >>> command-execute(log-edit-done) >> >> Try the patch below, seems to work here: >> >> diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el >> index 03efe0fdb31..83d580d98dd 100644 >> --- a/lisp/vc/diff-mode.el >> +++ b/lisp/vc/diff-mode.el >> @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset >> (goto-char (point-min)) >> (while (progn (diff-file-next) (not (eobp))) >> (push (diff-find-file-name nil t) files))) >> - (list backend (nreverse files) nil nil 'patch))) >> + (list backend (delete nil (nreverse files)) nil nil 'patch))) > > Yes with this patch the error is no longer present, but the deleted file > is not displayed in the *log-edit-files* buffer, unlike if you run > vc-next-action from *vc-dir*. Although this is another bug report. Right, that's still a remaining problem. diff-find-file-name doesn't really want to "find" files that don't exist on disk, so it might need a replacement for such cases. Splitting reports should not be necessary, but we can install the first fix separately.
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 16:46:02 GMT) Full text and rfc822 format available.Message #20 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Juri Linkov <juri <at> linkov.net> To: Dmitry Gutov <dmitry <at> gutov.dev> Cc: 68443 <at> debbugs.gnu.org, Aleksandr Vityazev <avityazev <at> disroot.org> Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 18:32:50 +0200
>>> diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el >>> index 03efe0fdb31..83d580d98dd 100644 >>> --- a/lisp/vc/diff-mode.el >>> +++ b/lisp/vc/diff-mode.el >>> @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset >>> (goto-char (point-min)) >>> (while (progn (diff-file-next) (not (eobp))) >>> (push (diff-find-file-name nil t) files))) >>> - (list backend (nreverse files) nil nil 'patch))) >>> + (list backend (delete nil (nreverse files)) nil nil 'patch))) >> Yes with this patch the error is no longer present, but the deleted file >> is not displayed in the *log-edit-files* buffer, unlike if you run >> vc-next-action from *vc-dir*. Although this is another bug report. > > Right, that's still a remaining problem. diff-find-file-name doesn't really > want to "find" files that don't exist on disk, so it might need > a replacement for such cases. Indeed, the problem is that diff-find-file-name doesn't get the name of the deleted file even when called with OLD=t: ;; Use file-regular-p to avoid ;; /dev/null, directories, etc. ((or (null file) (file-regular-p file)) file)
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Wed, 17 Jan 2024 23:27:02 GMT) Full text and rfc822 format available.Message #23 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Dmitry Gutov <dmitry <at> gutov.dev> To: Eli Zaretskii <eliz <at> gnu.org> Cc: 68443 <at> debbugs.gnu.org, avityazev <at> disroot.org Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Thu, 18 Jan 2024 01:26:12 +0200
On 17/01/2024 13:34, Eli Zaretskii wrote: >> Date: Wed, 17 Jan 2024 06:25:34 +0200 >> From: Dmitry Gutov<dmitry <at> gutov.dev> >> >> Try the patch below, seems to work here: >> >> diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el >> index 03efe0fdb31..83d580d98dd 100644 >> --- a/lisp/vc/diff-mode.el >> +++ b/lisp/vc/diff-mode.el >> @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset >> (goto-char (point-min)) >> (while (progn (diff-file-next) (not (eobp))) >> (push (diff-find-file-name nil t) files))) >> - (list backend (nreverse files) nil nil 'patch))) >> + (list backend (delete nil (nreverse files)) nil nil 'patch))) >> >> (defun diff--filter-substring (str) >> (when diff-font-lock-prettify >> >> >> (Eli, would this be suitable for emacs-29?) > Yes, thanks. Just do it soon, please, if you can. Thanks, installed.
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Thu, 18 Jan 2024 08:06:01 GMT) Full text and rfc822 format available.Message #26 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Juri Linkov <juri <at> linkov.net> To: Dmitry Gutov <dmitry <at> gutov.dev> Cc: 68443 <at> debbugs.gnu.org, Aleksandr Vityazev <avityazev <at> disroot.org> Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Thu, 18 Jan 2024 09:50:44 +0200
>>> Yes with this patch the error is no longer present, but the deleted file >>> is not displayed in the *log-edit-files* buffer, unlike if you run >>> vc-next-action from *vc-dir*. Although this is another bug report. >> >> Right, that's still a remaining problem. diff-find-file-name doesn't really >> want to "find" files that don't exist on disk, so it might need >> a replacement for such cases. > > Indeed, the problem is that diff-find-file-name doesn't get the name > of the deleted file even when called with OLD=t: > > ;; Use file-regular-p to avoid > ;; /dev/null, directories, etc. > ((or (null file) (file-regular-p file)) > file) This can be fixed by adding special-casing to diff-vc-deduce-fileset that will check whether the diff output is for git diff, then will remove a/ and b/ prefixes from file names without checking whether these files really exist.
bug-gnu-emacs <at> gnu.org
:bug#68443
; Package emacs
.
(Thu, 18 Jan 2024 16:48:02 GMT) Full text and rfc822 format available.Message #29 received at 68443 <at> debbugs.gnu.org (full text, mbox):
From: Dmitry Gutov <dmitry <at> gutov.dev> To: Juri Linkov <juri <at> linkov.net> Cc: 68443 <at> debbugs.gnu.org, Aleksandr Vityazev <avityazev <at> disroot.org> Subject: Re: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Thu, 18 Jan 2024 18:47:07 +0200
On 18/01/2024 09:50, Juri Linkov wrote: >>>> Yes with this patch the error is no longer present, but the deleted file >>>> is not displayed in the*log-edit-files* buffer, unlike if you run >>>> vc-next-action from*vc-dir*. Although this is another bug report. >>> Right, that's still a remaining problem. diff-find-file-name doesn't really >>> want to "find" files that don't exist on disk, so it might need >>> a replacement for such cases. >> Indeed, the problem is that diff-find-file-name doesn't get the name >> of the deleted file even when called with OLD=t: >> >> ;; Use file-regular-p to avoid >> ;; /dev/null, directories, etc. >> ((or (null file) (file-regular-p file)) >> file) > This can be fixed by adding special-casing to diff-vc-deduce-fileset > that will check whether the diff output is for git diff, > then will remove a/ and b/ prefixes from file names > without checking whether these files really exist. For git, or maybe hg/bzr as well. Worth a try.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.