GNU bug report logs - #29709
25.3; diff-buffer-with-file arguments reversed

Previous Next

Package: emacs;

Reported by: Dan Harms <danielrharms <at> gmail.com>

Date: Thu, 14 Dec 2017 16:34:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 25.3

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

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

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

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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29709; Package emacs. (Thu, 14 Dec 2017 16:34:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan Harms <danielrharms <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Dec 2017 16:34:04 GMT) Full text and rfc822 format available.

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

From: Dan Harms <danielrharms <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; diff-buffer-with-file arguments reversed
Date: Thu, 14 Dec 2017 06:01:43 -0600
[Message part 1 (text/plain, inline)]
When I execute (diff-buffer-with-file <buffer>), the file on disk is
used as the first argument, the working buffer as the second.  This
leads to a diff-mode buffer with the base-line (the left-hand side) as
the file on disk, not my current buffer.  I would think this is opposite
of what should be the default.  Wouldn't we more often want to view the
buffer's current state as the baseline, and view what changes would be
required to transform this buffer into the file on disk?
 
 
 
 
In GNU Emacs 25.3.1 (i686-w64-mingw32)
of 2017-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
'configure --host=i686-w64-mingw32 --without-dbus
--without-compress-install 'CFLAGS=-static -O2 -g3''
 
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
 
Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
 
Major mode: Shell-script
 
Minor modes in effect:
  global-magit-file-mode: t
  magit-file-mode: t
  global-git-commit-mode: t
  bug-reference-prog-mode: t
  lisp-extra-font-lock-global-mode: t
  flycheck-popup-tip-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  workgroups-mode: t
  persp-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  diff-auto-refine-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  rich-minority-mode: t
  counsel-mode: t
  recentf-mode: t
  savehist-mode: t
  global-page-break-lines-mode: t
  shackle-mode: t
  simpleclip-mode: t
  shx-global-mode: t
  global-yascroll-bar-mode: t
  yascroll-bar-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  shell-dirtrack-mode: t
  ivy-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  winner-mode: t
  which-function-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
 
Recent messages:
funcall-interactively: End of buffer
Configuring package sh-script...done
Setting up indent for shell type -*-
Indentation variables are now local.
Indentation setup for shell type -*-
Mark saved where search started
6 matches for "\_<tshark\_>"
Mark set
Quit
Mark saved where search started
 
Load-path shadows:
c:/Users/dan.harms.XRTRADING/.emacs.d/elisp/seq hides c:/emacs-25.3/share/emacs/25.3/lisp/emacs-lisp/seq
c:/Users/dan.harms.XRTRADING/.emacs.d/elisp/let-alist hides c:/emacs-25.3/share/emacs/25.3/lisp/emacs-lisp/let-alist
 
Features:
(shadow sort mail-extr emacsbug sendmail sh-script smie executable
whiteboard-theme magit-bookmark magit-imenu git-rebase magit-extras
magit-ediff ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff magit-subtree magit-submodule magit-obsolete
magit-blame magit-stash magit-bisect magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-branch magit-collab ghub
url-auth url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf let-alist magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff magit-core
magit-autorevert magit-process magit-margin magit-mode magit-git
magit-section magit-popup git-commit magit-utils crm log-edit message
rfc822 mml mml-sec epg mm-decode mm-bodies mailabbrev mail-utils
gmm-utils mailheader pcvs-util with-editor server misearch multi-isearch
gud vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs autorevert filenotify
add-log vc-git good-word adaptive-wrap hydra lv org-rmail org-mhe
org-irc org-info org-gnus org-docview doc-view jka-compr image-mode
org-bibtex bibtex org-bbdb org-w3m ox-md ox-latex ox-icalendar ox-html
ox-ascii ox-publish ox org-element ob-sqlite ob-sql ob-sh ob-python
ob-plantuml ob-dot ob-ditaa ob-C org-crypt org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs frame-cmds frame-fns
light-blue-theme colir bug-reference nodejs-repl emr-c cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
lisp-extra-font-lock elf-mode xr-mock use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key
use-package-core remotehost-connect auto-insert-choose+
auto-insert-choose flycheck-popup-tip flycheck-bashate
flycheck-checkbashisms flycheck-package package-lint finder finder-inf
lisp-mnt package epg-config quick-peek yasnippet flymake ac-etags
auto-complete-config vlf-setup smerge-mode palette eyedropper hexrgb
custom-themes workgroups perspective windmove framemove shebang
diff-hl-flydiff diff-hl-dired diff-hl vc-dir vc vc-dispatcher diff-mode
dired-du find-dired dired-sort dired-sidebar face-remap dired-subtree
ivy-dired-history dired-filter dired-hacks-utils ls-lisp+ files+ dired+
w32-browser image-dired image-file dired-aux beginend undo-tree diff
smart-mode-line-light-theme rich-minority powerline powerline-separators
powerline-themes smex ido counsel swiper ivy-rich wgrep ange-ftp
tramp-ftp tramp-cache tramp-sh recentf tree-widget wid-edit savehist
page-break-lines shackle trace simpleclip shx color makefile-executor
make-mode elnode db web time-stamp browse-url url-util mailcap mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums fakir dotassoc kv noflet
cl-indent ert ewoc debug copyright yascroll emr-elisp emr-lisp
list-utils emr-iedit iedit iedit-lib emr-prog emr custom-environment aes
proviso-frame-title proviso switch-buffer-functions
proviso-include-files auto-complete-clang flycheck json map find-func rx
auto-complete-c-headers auto-complete popup cl proviso-grep
proviso-registers proviso-sml smart-mode-line proviso-bookmarks
bookmark+ bookmark+-key derived dired-x dired crosshairs col-highlight
vline hl-line+ hl-line bookmark+-1 bookmark+-bmu bookmark+-lit bookmark
pp proviso-gentags find-file proviso-tags proviso-etags-select
proviso-etags-table etags xref project proviso-display proviso-dired
proviso-compile proviso-fulledit em-glob esh-util proviso-clang-format
clang-format xml proviso-ag grep compile proviso-defines proviso-regexp
subr-x proviso-core load-environment-vars read-file-into-list-of-lines
tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
comint ansi-color format-spec advice seq seq-25 ivy flx delsel
ivy-overlay ffap thingatpt url-parse auth-source cl-seq eieio byte-opt
bytecomp byte-compile cl-extra cconv eieio-core cl-macs gv gnus-util
mm-util help-fns help-mode easymenu mail-prsvr password-cache url-vars f
s dash avoid paren winner ring which-func imenu edmacro kmacro
custom-backups bind-key easy-mmode cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars
term/common-win 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
w32notify w32 multi-tty make-network-process emacs)
 
Memory information:
((conses 8 575721 250760)
(symbols 32 58486 1)
(miscs 32 677 1596)
(strings 16 139326 184998)
(string-bytes 1 4399580)
(vectors 8 82280)
(vector-slots 4 1271150 107036)
(floats 8 947 681)
(intervals 28 3162 4108)
(buffers 520 28))

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29709; Package emacs. (Thu, 14 Dec 2017 17:50:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Harms <danielrharms <at> gmail.com>
Cc: 29709 <at> debbugs.gnu.org
Subject: Re: bug#29709: 25.3; diff-buffer-with-file arguments reversed
Date: Thu, 14 Dec 2017 19:49:16 +0200
> From: Dan Harms <danielrharms <at> gmail.com>
> Date: Thu, 14 Dec 2017 06:01:43 -0600
> 
> When I execute (diff-buffer-with-file <buffer>), the file on disk is
> used as the first argument, the working buffer as the second.  This
> leads to a diff-mode buffer with the base-line (the left-hand side) as
> the file on disk, not my current buffer.  I would think this is opposite
> of what should be the default.  Wouldn't we more often want to view the
> buffer's current state as the baseline, and view what changes would be
> required to transform this buffer into the file on disk?

I think the idea is that the file on disk is the original version and
the text in your buffer is the modified (a.k.a. "new") version.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29709; Package emacs. (Fri, 15 Dec 2017 11:42:01 GMT) Full text and rfc822 format available.

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

From: Dan Harms <danielrharms <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29709 <at> debbugs.gnu.org
Subject: Re: bug#29709: 25.3; diff-buffer-with-file arguments reversed
Date: Fri, 15 Dec 2017 05:41:17 -0600
Every time I use the function, I end up having to reverse the direction after calling the function.  But that’s OK, if other people think the default makes sense. 

On Dec 14, 2017, at 11:49 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Dan Harms <danielrharms <at> gmail.com>
>> Date: Thu, 14 Dec 2017 06:01:43 -0600
>> 
>> When I execute (diff-buffer-with-file <buffer>), the file on disk is
>> used as the first argument, the working buffer as the second.  This
>> leads to a diff-mode buffer with the base-line (the left-hand side) as
>> the file on disk, not my current buffer.  I would think this is opposite
>> of what should be the default.  Wouldn't we more often want to view the
>> buffer's current state as the baseline, and view what changes would be
>> required to transform this buffer into the file on disk?
> 
> I think the idea is that the file on disk is the original version and
> the text in your buffer is the modified (a.k.a. "new") version.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29709; Package emacs. (Sat, 28 Sep 2019 23:40:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Dan Harms <danielrharms <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29709 <at> debbugs.gnu.org
Subject: Re: bug#29709: 25.3; diff-buffer-with-file arguments reversed
Date: Sun, 29 Sep 2019 01:39:27 +0200
tags 29709 + wontfix
close 29709
quit

Dan Harms <danielrharms <at> gmail.com> writes:

> Every time I use the function, I end up having to reverse the direction after calling the function.  But that’s OK, if other people think the default makes sense.
>
> On Dec 14, 2017, at 11:49 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> From: Dan Harms <danielrharms <at> gmail.com>
>>> Date: Thu, 14 Dec 2017 06:01:43 -0600
>>>
>>> When I execute (diff-buffer-with-file <buffer>), the file on disk is
>>> used as the first argument, the working buffer as the second.  This
>>> leads to a diff-mode buffer with the base-line (the left-hand side) as
>>> the file on disk, not my current buffer.  I would think this is opposite
>>> of what should be the default.  Wouldn't we more often want to view the
>>> buffer's current state as the baseline, and view what changes would be
>>> required to transform this buffer into the file on disk?
>>
>> I think the idea is that the file on disk is the original version and
>> the text in your buffer is the modified (a.k.a. "new") version.

The conclusion here is that we want to keep the current behaviour.  I'm
therefore closing this as wontfix.

Best regards,
Stefan Kangas




Added tag(s) wontfix. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 28 Sep 2019 23:40:04 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 29709 <at> debbugs.gnu.org and Dan Harms <danielrharms <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 28 Sep 2019 23:40:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 154 days ago.

Previous Next


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