unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22978: 25.0.92; log-view-diff:  TMM required for non-consecutive revisions
@ 2016-03-10 17:12 Bob Rogers
  2018-06-20  4:00 ` Noam Postavsky
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Rogers @ 2016-03-10 17:12 UTC (permalink / raw)
  To: 22978

   1.  "emacs -Q" in a current Emacs working copy.

   2.  "C-x C-f BUGS RET"

   3.  "C-x v l" to create its log buffer.

   4.  "M-x transient-mark-mode RET" to disable transient mark mode.

   5.  "n n n M-<" to mark the fourth most recent commit (for me this is
19b9c46 by Julien Danjou on Dec 3 2010) and move point back to the most
recent commit.

   6.  "=" to get a diff.  This will show a hunk starting with the
deleted line "You can read the read the ..." which is just the most
recent revision.

   7.  Type "M-x transient-mark-mode RET" and then "C-x o =" to show the
expected diff between the two selected revisions.  If mark is on the
same commit, this will include the whole file.

   The documentation for log-view-diff implies that this is the correct
behavior (since the region is perpetually inactive if TMM is disabled),
but this is extremely non-featureful, as there is then no way to find
the diff between two non-consecutive revisions without enabling TMM.
The patch included at the bottom restores the original behavior for us
non-TMM users while keeping TMM behavior.

   The behavior is the same in 25.0.92 and a recent repo version; both
configuration summaries are included.  The patch was developed in
25.0.92 and the instructions above in the repo.

					-- Bob Rogers
					   Modular Genetics Inc.
					   http://www.modulargenetics.com/

================

In GNU Emacs 25.0.92.1 (x86_64-suse-linux-gnu, GTK+ Version 2.24.28)
 of 2016-03-04 built on persepolis
Windowing system distributor 'The X.Org Foundation', version 11.0.11601000
System Description:	openSUSE 13.2 (Harlequin) (x86_64)

Configured using:
 'configure --with-pop --without-dbus --prefix=/usr
 --infodir=/usr/share/info --mandir=/usr/share/man
 --sharedstatedir=/var/lib --libexecdir=/usr/lib --with-x --with-xpm=no
 --with-jpeg --with-tiff --with-gif=no --with-png --with-x-toolkit=yes
 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib64 --build
 x86_64-suse-linux 'CFLAGS=-g -O2 -fno-optimize-sibling-calls'
 LDFLAGS=-s'

Configured features:
JPEG TIFF PNG RSVG SOUND GSETTINGS NOTIFY FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

================

In GNU Emacs 25.1.50.1 (x86_64-suse-linux-gnu, GTK+ Version 2.24.28)
 of 2016-03-06 built on orion
Repository revision: 7882dc625e1ec562fcd0e1b743ef11b160cae18e
Windowing system distributor 'The X.Org Foundation', version 11.0.11601000
System Description:	openSUSE 13.2 (Harlequin) (x86_64)

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11

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

================
diff -u --label /usr/share/emacs/25.0.92/lisp/vc/log-view.el.gz --label \#\<buffer\ log-view.el.gz\> /tmp/rogers/jka-com15891oVD /tmp/rogers/buffer-content-15891CqP
--- /usr/share/emacs/25.0.92/lisp/vc/log-view.el.gz
+++ #<buffer log-view.el.gz>
@@ -591,7 +591,9 @@
 file(s)."
   (interactive
    (list (if (use-region-p) (region-beginning) (point))
-         (if (use-region-p) (region-end) (point))))
+         (if (use-region-p)
+	     (region-end)
+	     (or (and (not transient-mark-mode) (mark)) (point)))))
   (log-view-diff-common beg end))
 
 (defun log-view-diff-changeset (beg end)

Diff finished.  Thu Mar 10 12:01:03 2016





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22978: 25.0.92; log-view-diff:  TMM required for non-consecutive revisions
  2016-03-10 17:12 bug#22978: 25.0.92; log-view-diff: TMM required for non-consecutive revisions Bob Rogers
@ 2018-06-20  4:00 ` Noam Postavsky
  2018-06-20 16:25   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Noam Postavsky @ 2018-06-20  4:00 UTC (permalink / raw)
  To: Bob Rogers; +Cc: 22978

Bob Rogers <rogers@modulargenetics.com> writes:

>    The documentation for log-view-diff implies that this is the correct
> behavior (since the region is perpetually inactive if TMM is disabled),
> but this is extremely non-featureful, as there is then no way to find
> the diff between two non-consecutive revisions without enabling TMM.

You can still use C-SPC C-SPC to activate the mark temporarily.

> The patch included at the bottom restores the original behavior for us
> non-TMM users while keeping TMM behavior.

Not sure if it makes sense to change this.

> --- /usr/share/emacs/25.0.92/lisp/vc/log-view.el.gz
> +++ #<buffer log-view.el.gz>
> @@ -591,7 +591,9 @@
>  file(s)."
>    (interactive
>     (list (if (use-region-p) (region-beginning) (point))
> -         (if (use-region-p) (region-end) (point))))
> +         (if (use-region-p)
> +	     (region-end)
> +	     (or (and (not transient-mark-mode) (mark)) (point)))))
>    (log-view-diff-common beg end))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22978: 25.0.92; log-view-diff:  TMM required for non-consecutive revisions
  2018-06-20  4:00 ` Noam Postavsky
@ 2018-06-20 16:25   ` Eli Zaretskii
  2018-06-27 20:04     ` Bob Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2018-06-20 16:25 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: rogers, 22978

> From: Noam Postavsky <npostavs@gmail.com>
> Date: Wed, 20 Jun 2018 00:00:25 -0400
> Cc: 22978@debbugs.gnu.org
> 
> > The patch included at the bottom restores the original behavior for us
> > non-TMM users while keeping TMM behavior.
> 
> Not sure if it makes sense to change this.

My problem with the change is that there seems to be no escape from
it.  And since in any buffer, the mark gets set pretty soon after one
starts to move around, it means users who turn off transient-mark-mode
will have no reasonable way of diffing the revision at point with the
previous one.  By contrast, the current behavior allows you to get
diffs between revisions at region edges by "C-SPC C-SPC" etc.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22978: 25.0.92; log-view-diff:  TMM required for non-consecutive revisions
  2018-06-20 16:25   ` Eli Zaretskii
@ 2018-06-27 20:04     ` Bob Rogers
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Rogers @ 2018-06-27 20:04 UTC (permalink / raw)
  To: Noam Postavsky, Eli Zaretskii; +Cc: 22978

   From: Eli Zaretskii <eliz@gnu.org>
   Date: Wed, 20 Jun 2018 19:25:17 +0300

   . . .

   My problem with the change is that there seems to be no escape from
   it.  And since in any buffer, the mark gets set pretty soon after one
   starts to move around, it means users who turn off transient-mark-mode
   will have no reasonable way of diffing the revision at point with the
   previous one.

"C-SPC =" ?

   By contrast, the current behavior allows you to get diffs between
   revisions at region edges by "C-SPC C-SPC" etc.

So that means it's a difference of typing "C-SPC" once for the single
revision versus typing it twice for multiple revisions.  I might argue
that the latter is more backward-compatible, but I don't actually
believe this is worth arguing about.  Sorry for the noise.

					-- Bob





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-27 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 17:12 bug#22978: 25.0.92; log-view-diff: TMM required for non-consecutive revisions Bob Rogers
2018-06-20  4:00 ` Noam Postavsky
2018-06-20 16:25   ` Eli Zaretskii
2018-06-27 20:04     ` Bob Rogers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).