Subject: bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/

From: Jorge Peixoto de Morais Neto <[email-masked]>
Date: Wed, 27 Jul 2016 15:42:26 -0300

Please extract the attached gzipped tarball into ~.

Inside ~, start Emacs with an init file containing the following:
--8<---------------cut here---------------start------------->8---
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(backup-directory-alist (quote (("." . ".~"))))
)

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
--8<---------------cut here---------------end--------------->8---

Perform the following steps:
1. C-x d ~/dired-diff-bug-1 <RET>
2. j dummy <RET>
3. = <RET>
I expected (according to the documentation of dired-diff) to see the
diff of dummy with its backup.  Instead a diff error occurs.  I have
saved the diff error buffer to diff-error-dummy.txt and attached it.

Now perform the following steps:
1. C-x d ~/dired-diff-bug-1/.~ <RET>
2. j dummy~ <RET>
3. = <RET>.
A similar diff error occurs. It is also unexpected.  I have saved the
diff error buffer in diff-error-dummy~.txt and attached it.

I have also attached a dribble file.

report-emacs-bug was invoked from another Emacs session, also invoked with an
init file having the contents specified above.

In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-25 built on jorge-HP-G42
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Ubuntu 16.04.1 LTS

Configured using:
 'configure --prefix=/usr/local/emacs/ --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LC_MONETARY: en_DK.UTF-8
  value of $LC_NUMERIC: en_DK.UTF-8
  value of $LC_TIME: en_DK.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-fortran hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-fortran
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-mhe hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-mhe
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-docview hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-docview
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-eshell hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-eshell
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-tangle hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-tangle
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-plot hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-plot
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-calc hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-calc
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-crypt hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-crypt
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-js hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-js
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-irc hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-irc
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-publish hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-publish
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-latex hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-latex
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-scala hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-scala
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-icalendar hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-icalendar
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-gnuplot hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-gnuplot
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-beamer hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-beamer
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-C hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-C
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-bibtex hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-bibtex
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-entities hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-entities
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-core hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-core
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-colview hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-colview
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-ocaml hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-ocaml
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-id hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-id
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-install hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-install
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-loaddefs hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-loaddefs
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-pcomplete hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-pcomplete
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-odt hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-odt
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-sass hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-sass
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-org hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-org
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-table hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-table
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-eval hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-eval
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-compat hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-compat
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-octave hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-octave
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-ascii hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-ascii
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-org hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-org
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-ledger hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-ledger
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-capture hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-capture
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-io hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-io
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-R hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-R
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-texinfo hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-texinfo
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-gnus hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-gnus
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-emacs-lisp hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-emacs-lisp
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-sql hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-sql
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-bbdb hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-bbdb
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-exp hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-exp
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-clojure hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-clojure
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-plantuml hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-plantuml
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-table hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-table
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-man hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-man
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-feed hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-feed
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-awk hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-awk
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-keys hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-keys
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-ruby hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-ruby
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-info hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-info
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-dot hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-dot
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-ditaa hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-ditaa
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-ref hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-ref
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-habit hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-habit
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-maxima hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-maxima
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-inlinetask hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-inlinetask
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-macs hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-macs
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-timer hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-timer
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-clock hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-clock
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-md hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-md
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-lisp hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-lisp
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-lob hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-lob
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-html hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-html
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-rmail hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-rmail
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-sqlite hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-sqlite
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-archive hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-archive
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-agenda hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-agenda
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-version hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-version
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-css hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-css
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-screen hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-screen
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-footnote hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-footnote
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-faces hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-faces
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-asymptote hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-asymptote
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-python hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-python
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-scheme hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-scheme
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-comint hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-comint
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-ctags hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-ctags
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-makefile hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-makefile
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-list hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-list
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-java hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-java
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-src hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-src
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-w3m hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-w3m
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-indent hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-indent
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-mscgen hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-mscgen
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-element hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-element
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-picolisp hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-picolisp
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-attach hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-attach
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-haskell hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-haskell
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-macro hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-macro
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ox-latex hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ox-latex
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-shen hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-shen
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-mobile hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-mobile
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-perl hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-perl
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-mouse hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-mouse
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-matlab hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-matlab
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-datetree hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-datetree
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/org-protocol hides
/usr/local/emacs/share/emacs/25.1/lisp/org/org-protocol
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160725/ob-lilypond hides
/usr/local/emacs/share/emacs/25.1/lisp/org/ob-lilypond

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils finder-inf
info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev 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 dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 110174 5697)
 (symbols 48 22087 0)
 (miscs 40 485 158)
 (strings 32 22517 5631)
 (string-bytes 1 745738)
 (vectors 16 15009)
 (vector-slots 8 473639 3924)
 (floats 8 196 3)
 (intervals 56 247 1)
 (buffers 976 20)
 (heap 1024 44160 1133))
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, LaTeX, Opus, WebM and 7z.
• Free software for Android: https://f-droid.org/

diff -u /home/jorge/dired-diff-bug-1/dummy\~ /home/jorge/dired-diff-bug-1/dummy
diff: /home/jorge/dired-diff-bug-1/dummy~: No such file or directory

Diff finished (diff error).  Wed Jul 27 12:01:56 2016
diff -u /home/jorge/dired-diff-bug-1/.\~/dummy\~ /home/jorge/dired-diff-bug-1/.\~/dummy
diff: /home/jorge/dired-diff-bug-1/.~/dummy: No such file or directory

Diff finished (diff error).  Wed Jul 27 12:02:33 2016