* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ @ 2016-07-27 18:42 Jorge Peixoto de Morais Neto 2016-07-28 15:05 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Jorge Peixoto de Morais Neto @ 2016-07-27 18:42 UTC (permalink / raw) To: 24089 [-- Attachment #1: Type: text/plain, Size: 17179 bytes --] 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/ [-- Attachment #2: dired-diff-bug-1.tar.gz --] [-- Type: application/x-compressed-tar, Size: 185 bytes --] [-- Attachment #3: diff-error-dummy.txt --] [-- Type: text/plain, Size: 204 bytes --] 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 [-- Attachment #4: diff-error-dummy~.txt --] [-- Type: text/plain, Size: 214 bytes --] 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 [-- Attachment #5: dribble.txt --] [-- Type: text/plain, Size: 194 bytes --] \x18d~/dire<tab>1<tab><return>jdu<tab><return>=<return>\x18o\x18\x17<backspace><backspace>2/diff-error-dummy.txt<return>\x18o\x18d.~<return>jdumm<tab><return>=<return>\x18o\x18\x17~/dire<tab>2<tab>diff<tab>\x02\x02\x02\x02~<return>\x18\x03 ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-27 18:42 bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ Jorge Peixoto de Morais Neto @ 2016-07-28 15:05 ` Eli Zaretskii 2016-07-29 11:43 ` Jorge Peixoto de Morais Neto 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2016-07-28 15:05 UTC (permalink / raw) To: Jorge Peixoto de Morais Neto; +Cc: 24089 > From: Jorge Peixoto de Morais Neto <jorge13515@gmail.com> > 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. Thanks. It seems dired-diff was not prepared to deal with the situation where the backup file is in another directory. Does the patch below produce good results? --- lisp/dired-aux.el~0 2016-05-08 07:05:52.000000000 +0300 +++ lisp/dired-aux.el 2016-07-28 18:01:02.437091400 +0300 @@ -78,8 +78,14 @@ (file-at-mark (if (and transient-mark-mode mark-active) (save-excursion (goto-char (mark t)) (dired-get-filename t t)))) + (separate-dir (and oldf + (not (equal (file-name-directory oldf) + (dired-current-directory))))) (default-file (or file-at-mark - (and oldf (file-name-nondirectory oldf)))) + (and oldf + (if separate-dir + oldf + (file-name-nondirectory oldf))))) ;; Use it as default if it's not the same as the current file, ;; and the target dir is current or there is a default file. (default (if (and (not (equal default-file current)) @@ -88,7 +94,9 @@ default-file)) default-file)) (target-dir (if default - (dired-current-directory) + (if separate-dir + (file-name-directory default) + (dired-current-directory)) (dired-dwim-target-directory))) (defaults (dired-dwim-target-defaults (list current) target-dir))) (list ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-28 15:05 ` Eli Zaretskii @ 2016-07-29 11:43 ` Jorge Peixoto de Morais Neto 2016-07-29 14:43 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Jorge Peixoto de Morais Neto @ 2016-07-29 11:43 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089 On Thu, 2016-07-28 at 18:05 +0300, Eli Zaretskii wrote: > It seems dired-diff was not prepared to deal with the situation where > the backup file is in another directory. Does the patch below produce > good results? In my brief testing, the patch solves the problem only when = <RET> is invoked with point at the original file. If it is invoked with point at the backup file (inside .~), a diff error still occurs. -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-29 11:43 ` Jorge Peixoto de Morais Neto @ 2016-07-29 14:43 ` Eli Zaretskii 2016-07-29 16:29 ` Jorge Peixoto de Morais Neto 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2016-07-29 14:43 UTC (permalink / raw) To: Jorge Peixoto de Morais Neto; +Cc: 24089 > From: Jorge Peixoto de Morais Neto <jorge13515@gmail.com> > Cc: 24089@debbugs.gnu.org > Date: Fri, 29 Jul 2016 08:43:30 -0300 > > On Thu, 2016-07-28 at 18:05 +0300, Eli Zaretskii wrote: > > It seems dired-diff was not prepared to deal with the situation where > > the backup file is in another directory. Does the patch below produce > > good results? > In my brief testing, the patch solves the problem only when = <RET> is invoked > with point at the original file. If it is invoked with point at the backup > file (inside .~), a diff error still occurs. I'm not sure why you expect that case to work. How can Emacs reverse-engineer backup-directory-alist, to figure out which of its elements was in effect when the original file was backed up? In your example, there's only one element in the alist, but in general there could be several. It sounds like in this case the users cannot just press RET, they should actually type a file name. Am I missing something? ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-29 14:43 ` Eli Zaretskii @ 2016-07-29 16:29 ` Jorge Peixoto de Morais Neto 2016-07-31 15:08 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Jorge Peixoto de Morais Neto @ 2016-07-29 16:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089 On Fri, 2016-07-29 at 17:43 +0300, Eli Zaretskii wrote: > I'm not sure why you expect that case to work. How can Emacs > reverse-engineer backup-directory-alist, to figure out which of its > elements was in effect when the original file was backed up? In your > example, there's only one element in the alist, but in general there > could be several. > > It sounds like in this case the users cannot just press RET, they > should actually type a file name. Am I missing something? I understood the intended behavior that way because of the dired-diff docstring: If the file at point is a backup file, use its original. Perhaps the docstring could be clarified? Also dired-diff could be tweaked so that, when it is is invoked on a backup file, the default would be empty. This would avoid the diff error on = <RET>. I am not sure though. Another possibility (which can be combined with the previous) is to tweak dired-diff to reverse-engineer backup-directory-alist at least for a few important easy particular cases, such as the following two: 1. (("." . ".~")) 2. (("." . "/ABSOLUTE/PATH")) and possibly others. -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-29 16:29 ` Jorge Peixoto de Morais Neto @ 2016-07-31 15:08 ` Eli Zaretskii 2016-08-03 2:04 ` Jorge Peixoto de Morais Neto 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2016-07-31 15:08 UTC (permalink / raw) To: Jorge Peixoto de Morais Neto; +Cc: 24089 > From: Jorge Peixoto de Morais Neto <jorge13515@gmail.com> > Cc: 24089@debbugs.gnu.org > Date: Fri, 29 Jul 2016 13:29:23 -0300 > > On Fri, 2016-07-29 at 17:43 +0300, Eli Zaretskii wrote: > > I'm not sure why you expect that case to work. How can Emacs > > reverse-engineer backup-directory-alist, to figure out which of its > > elements was in effect when the original file was backed up? In your > > example, there's only one element in the alist, but in general there > > could be several. > > > > It sounds like in this case the users cannot just press RET, they > > should actually type a file name. Am I missing something? > I understood the intended behavior that way because of the dired-diff > docstring: > If the file at point is a backup file, use its original. > > Perhaps the docstring could be clarified? > > Also dired-diff could be tweaked so that, when it is is invoked on a backup > file, the default would be empty. This would avoid the diff error on = <RET>. > I am not sure though. > > Another possibility (which can be combined with the previous) is to tweak > dired-diff to reverse-engineer backup-directory-alist at least for a few > important easy particular cases, such as the following two: > 1. (("." . ".~")) > 2. (("." . "/ABSOLUTE/PATH")) > and possibly others. How about the alternative patch below? It fixes the doc string, and makes the prompt be without the default in the second case. Is that good enough, in your opinion? --- lisp/dired-aux.el~0 2016-05-08 07:05:52.000000000 +0300 +++ lisp/dired-aux.el 2016-07-31 17:50:35.792144200 +0300 @@ -55,19 +55,23 @@ ;;;###autoload (defun dired-diff (file &optional switches) - "Compare file at point with file FILE using `diff'. -If called interactively, prompt for FILE. If the file at point -has a backup file, use that as the default. If the file at point -is a backup file, use its original. If the mark is active -in Transient Mark mode, use the file at the mark as the default. -\(That's the mark set by \\[set-mark-command], not by Dired's -\\[dired-mark] command.) + "Compare file at point with FILE using `diff'. +If called interactively, prompt for FILE. +If the mark is active in Transient Mark mode, use the file at the mark +as the default for FILE. (That's the mark set by \\[set-mark-command], +not by Dired's \\[dired-mark] command.) +If the file at point has a backup file, use that as the default FILE. +If the file at point is a backup file, use its original, if that exists +and can be found. Note that customizations of `backup-directory-alist' +and `make-backup-file-name-function' change where this function searches +for the backup file, and affect its ability to find the original of a +backup file. -FILE is the first file given to `diff'. The file at point -is the second file given to `diff'. +FILE is the first argument given to the `diff' function. The file at +point is the second argument given to `diff'. With prefix arg, prompt for second argument SWITCHES, which is -the string of command switches for the third argument of `diff'." +the string of command switches used as the third argument of `diff'." (interactive (let* ((current (dired-get-filename t)) ;; Get the latest existing backup file or its original. @@ -78,8 +82,20 @@ (file-at-mark (if (and transient-mark-mode mark-active) (save-excursion (goto-char (mark t)) (dired-get-filename t t)))) + (separate-dir (and oldf + (not (equal (file-name-directory oldf) + (dired-current-directory))))) (default-file (or file-at-mark - (and oldf (file-name-nondirectory oldf)))) + ;; If the file with which to compare + ;; doesn't exist, or we cannot intuit it, + ;; we forget that name and don't show it + ;; as the default, as an indication to the + ;; user that she should type the file + ;; name. + (and (if (and oldf (file-readable-p oldf)) oldf) + (if separate-dir + oldf + (file-name-nondirectory oldf))))) ;; Use it as default if it's not the same as the current file, ;; and the target dir is current or there is a default file. (default (if (and (not (equal default-file current)) @@ -88,7 +104,9 @@ default-file)) default-file)) (target-dir (if default - (dired-current-directory) + (if separate-dir + (file-name-directory default) + (dired-current-directory)) (dired-dwim-target-directory))) (defaults (dired-dwim-target-defaults (list current) target-dir))) (list ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-07-31 15:08 ` Eli Zaretskii @ 2016-08-03 2:04 ` Jorge Peixoto de Morais Neto 2016-08-06 10:18 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Jorge Peixoto de Morais Neto @ 2016-08-03 2:04 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089 On Sun, 2016-07-31 at 18:08 +0300, Eli Zaretskii wrote: > How about the alternative patch below? It fixes the doc string, and > makes the prompt be without the default in the second case. Is that > good enough, in your opinion? This new patch is better. This is already good. There is one more tweak that maybe could make it even better: with this latest patch, if the user types = <RET> in the backup file then Emacs says Attempt to compare the file to itself Wouldn't it be better if dired-diff refused the minibuffer input if it is not a valid file? This way, if the user types = <RET>, Emacs will display "[no match]", which would be more precise. Regards -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-08-03 2:04 ` Jorge Peixoto de Morais Neto @ 2016-08-06 10:18 ` Eli Zaretskii 2016-08-06 15:50 ` Jorge Peixoto de Morais Neto 2016-11-15 16:14 ` Jorge Morais Neto 0 siblings, 2 replies; 14+ messages in thread From: Eli Zaretskii @ 2016-08-06 10:18 UTC (permalink / raw) To: Jorge Peixoto de Morais Neto; +Cc: 24089-done > From: Jorge Peixoto de Morais Neto <jorge13515@gmail.com> > Cc: 24089@debbugs.gnu.org > Date: Tue, 02 Aug 2016 23:04:24 -0300 > > On Sun, 2016-07-31 at 18:08 +0300, Eli Zaretskii wrote: > > How about the alternative patch below? It fixes the doc string, and > > makes the prompt be without the default in the second case. Is that > > good enough, in your opinion? > > This new patch is better. This is already good. There is one more tweak that > maybe could make it even better: with this latest patch, if the user types = > <RET> in the backup file then Emacs says > Attempt to compare the file to itself The same happens in other situations when there's no default dired-diff can intuit. So this behavior is not new to dired-diff. > Wouldn't it be better if dired-diff refused the minibuffer input if it is not > a valid file? This way, if the user types = <RET>, Emacs will display "[no > match]", which would be more precise. No, I think the "[No match]" thing is worse: it leaves the user wondering what it means. (Match for what?) I believe the fact that there's no default value is a hint good enough for the user to become aware that she must type something. I committed the patch to the master branch, and I'm marking this bug done. Thanks a lot for reporting this subtle bug and for testing the fixes. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-08-06 10:18 ` Eli Zaretskii @ 2016-08-06 15:50 ` Jorge Peixoto de Morais Neto 2016-11-15 16:14 ` Jorge Morais Neto 1 sibling, 0 replies; 14+ messages in thread From: Jorge Peixoto de Morais Neto @ 2016-08-06 15:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089-done On Sat, 2016-08-06 at 13:18 +0300, Eli Zaretskii wrote: > I committed the patch to the master branch, and I'm marking this bug > done. Thanks a lot for reporting this subtle bug and for testing the > fixes. Thank you very much for improving Emacs! -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-08-06 10:18 ` Eli Zaretskii 2016-08-06 15:50 ` Jorge Peixoto de Morais Neto @ 2016-11-15 16:14 ` Jorge Morais Neto 2017-03-05 22:29 ` Jorge Morais Neto 2020-08-24 17:17 ` Lars Ingebrigtsen 1 sibling, 2 replies; 14+ messages in thread From: Jorge Morais Neto @ 2016-11-15 16:14 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089 On 6 August 2016 at 07:18, Eli Zaretskii <eliz@gnu.org> wrote: > I committed the patch to the master branch, and I'm marking this bug > done. Thanks a lot for reporting this subtle bug and for testing the > fixes. I found a problem with the solution to this bug. The solution could be further improved. My Emacs init file is "~/.emacs.d/init.el". It has numbered backups in "~/.emacs.d/.~/". It is true that with the existing fix, I can invoke dired-diff on init.el and immediately hit RET, and it will work as expected. However, I often want to compare with an earlier backup.Therefore, I want to be able to: 1. Pull into the minibuffer (with M-n) the path to the latest backup, so I could edit it to become the path of an earlier backup. Or even better, 2. Pull into the minibuffer (with M-n) the path to the latest backup, and get the path of earlier and earlier backups with successive invocations of M-n. The current fix lacks both of these features. Regards -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-11-15 16:14 ` Jorge Morais Neto @ 2017-03-05 22:29 ` Jorge Morais Neto 2017-03-06 3:33 ` Eli Zaretskii 2020-08-24 17:17 ` Lars Ingebrigtsen 1 sibling, 1 reply; 14+ messages in thread From: Jorge Morais Neto @ 2017-03-05 22:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 24089 On 15 November 2016 at 14:14, Jorge Morais Neto <jorge13515@gmail.com> wrote: > I found a problem with the solution to this bug. The solution could be further > improved. Hi. Will this be worked on? I am sorry for insisting, but I thought the last email could have been lost. I do not intend to insist further. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2017-03-05 22:29 ` Jorge Morais Neto @ 2017-03-06 3:33 ` Eli Zaretskii 0 siblings, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2017-03-06 3:33 UTC (permalink / raw) To: Jorge Morais Neto; +Cc: 24089 > From: Jorge Morais Neto <jorge13515@gmail.com> > Date: Sun, 5 Mar 2017 19:29:38 -0300 > Cc: 24089@debbugs.gnu.org > > On 15 November 2016 at 14:14, Jorge Morais Neto <jorge13515@gmail.com> wrote: > > I found a problem with the solution to this bug. The solution could be further > > improved. > > Hi. Will this be worked on? I don't know how to solve the issues you raise with this particular arrangement of backup files. Maybe someone else does. Sorry. > I am sorry for insisting, but I thought the last email could have been > lost. It didn't get lost, I just had nothing useful to say in response. Thanks. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2016-11-15 16:14 ` Jorge Morais Neto 2017-03-05 22:29 ` Jorge Morais Neto @ 2020-08-24 17:17 ` Lars Ingebrigtsen 2020-08-24 17:31 ` Drew Adams 1 sibling, 1 reply; 14+ messages in thread From: Lars Ingebrigtsen @ 2020-08-24 17:17 UTC (permalink / raw) To: Jorge Morais Neto; +Cc: 24089 Jorge Morais Neto <jorge13515@gmail.com> writes: > I found a problem with the solution to this bug. The solution could be further > improved. > > My Emacs init file is "~/.emacs.d/init.el". It has numbered backups in > "~/.emacs.d/.~/". It is true that with the existing fix, I can invoke > dired-diff on init.el and immediately hit RET, and it will work as expected. > However, I often want to compare with an earlier backup.Therefore, I want to be > able to: > 1. Pull into the minibuffer (with M-n) the path to the latest backup, so I could > edit it to become the path of an earlier backup. Or even better, > 2. Pull into the minibuffer (with M-n) the path to the latest backup, and get > the path of earlier and earlier backups with successive invocations of M-n. > > The current fix lacks both of these features. That makes sense to me, and is something that sounds quite useful. I grepped around Emacs, but I could find any function that just returned the list of backup files conveniently, so I added one -- 'file-backup-file-names'. (Everybody -- feel free to change the name if that's too awkward.) I wrote it by ripping everything out of 'file-newest-backup', basically. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ 2020-08-24 17:17 ` Lars Ingebrigtsen @ 2020-08-24 17:31 ` Drew Adams 0 siblings, 0 replies; 14+ messages in thread From: Drew Adams @ 2020-08-24 17:31 UTC (permalink / raw) To: Lars Ingebrigtsen, Jorge Morais Neto; +Cc: 24089 > 'file-backup-file-names'. (Everybody -- feel free to change the name if > that's too awkward.) Maybe just `file-backup-files' or even just `backup-files'. I think generally for a list of file names we just say "files", not "file-names". E.g. `directory-files*', `tags-table-files'. (Or we say `file-list'.) (There are of course other functions with "files" in the name, which _act_ on files, and don't involve a list of file names.) ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-08-24 17:31 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-07-27 18:42 bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/ Jorge Peixoto de Morais Neto 2016-07-28 15:05 ` Eli Zaretskii 2016-07-29 11:43 ` Jorge Peixoto de Morais Neto 2016-07-29 14:43 ` Eli Zaretskii 2016-07-29 16:29 ` Jorge Peixoto de Morais Neto 2016-07-31 15:08 ` Eli Zaretskii 2016-08-03 2:04 ` Jorge Peixoto de Morais Neto 2016-08-06 10:18 ` Eli Zaretskii 2016-08-06 15:50 ` Jorge Peixoto de Morais Neto 2016-11-15 16:14 ` Jorge Morais Neto 2017-03-05 22:29 ` Jorge Morais Neto 2017-03-06 3:33 ` Eli Zaretskii 2020-08-24 17:17 ` Lars Ingebrigtsen 2020-08-24 17:31 ` Drew Adams
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.