Subject: bug#35609: 26.2; wdired-finish-edit clears find-dired listing

From: Alvaro Ramirez <[email-masked]>
Date: Fri, 03 May 2019 09:42:45 +0100

Editing a find-dired buffer (via wdired) clears the list of files after
saving changes.

Steps:

1. M-x find-dired RET
2. RET (empty or any find args should do)
3. C-x C-q (dired-toggle-read-only)
4. Rename any file.
5. C-c C-c (wdired-finish-edit)

Expected behavior: All files listed by find command should be listed in dired buffer.

Actual behavior: No files are listed.

More info: `revert-buffer-function' originally set by `find-dired' may
be lost by wdired when switching between wdired and dired mode.

In GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.5.0, NS appkit-1671.40 Version 10.14.4 (Build 18E227))
 of 2019-05-03 built on taiyaki.local
Windowing system distributor 'Apple', version 10.3.1671
Recent messages:
find-dired *Find* finished.
Press C-c C-c when finished or C-c ESC to abort changes
Making completion list... [4 times]
user-error: Previous command was not a yank [2 times]
Quit [3 times]
Making completion list...
uncompressing wdired.el.gz...done
Mark saved where search started [2 times]
Mark set
Making completion list...

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=some/path/share/emacs/site-lisp
 --infodir=some/path/Cellar/emacs-plus/26.2/share/info/emacs
 --prefix=some/path/Cellar/emacs-plus/26.2 --with-xml2
 --without-dbus --with-gnutls --with-imagemagick --with-modules
 --with-rsvg --with-ns --disable-ns-self-contained'

Configured features:
JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2

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

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr jka-compr thingatpt find-func emacsbug message
rmc puny format-spec rfc822 mml mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-aux wdired shell
pcomplete comint ansi-color ring find-dired misearch multi-isearch
vc-git diff-mode easymenu easy-mmode map seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs elec-pair
time-date tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 221588 12374)
 (symbols 48 21417 1)
 (miscs 40 78 428)
 (strings 32 33343 1439)
 (string-bytes 1 907133)
 (vectors 16 37119)
 (vector-slots 8 753205 10098)
 (floats 8 52 262)
 (intervals 56 1173 16)
 (buffers 992 17))