GNU bug report logs - #19259
25.0.50; Be able to use `compare-windows' in either direction

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 2 Dec 2014 22:54:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 19259 in the body.
You can then email your comments to 19259 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#19259; Package emacs. (Tue, 02 Dec 2014 22:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 02 Dec 2014 22:54:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; Be able to use `compare-windows' in either direction
Date: Tue, 2 Dec 2014 14:53:18 -0800 (PST)
Especially when `compare-windows' is used repeatedly (e.g. bound to a
repeatable key etc.), it can be helpful to be able to sometimes
compare backward, toward bob, instead of always forward, toward eob.
Please add this enhancement.

It can be introduced at the user level by modifying how a prefix arg is
handled.  If the numeric value is 0 or greater, the behavior would be as
it is now (so no change for `C-u', for instance).  If the numeric value
is 0 or less, then comparison would be toward bob.

For example, (the parameter would be renamed ARG and) the doc string
would be updated with something like this, concerning the prefix arg:

  ...
  Variable `compare-windows-whitespace' controls how whitespace is
  skipped.  But a non-negative prefix arg means reverse the value of
  this variable.

  A non-positive prefix arg means compare backward not forward.

  If `compare-ignore-case' is non-nil then ignore changes in case.
  ...

Repeatability would need to be handled using something like
having `set-transient-map' recognize the repeated command and
reuse the same direction, unless a prefix arg is used again to
signal a direction change.

E.g., if `C-= w' were bound to `compare-windows' then

  C-- C-= w w w w C-u w w C-- w w w

would compare backward 4 times, then forward twice, then
backward 3 times.


In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm <at> gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19259; Package emacs. (Fri, 05 Dec 2014 00:59:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19259 <at> debbugs.gnu.org
Subject: Re: bug#19259: 25.0.50;
 Be able to use `compare-windows' in either direction
Date: Fri, 05 Dec 2014 02:57:41 +0200
> Especially when `compare-windows' is used repeatedly (e.g. bound to a
> repeatable key etc.), it can be helpful to be able to sometimes
> compare backward, toward bob, instead of always forward, toward eob.
> Please add this enhancement.

Why do you want this feature?  After comparing from the top of the buffer
you can return to previous matches by popping previous positions
from the mark ring with `C-u C-SPC C-SPC C-SPC ...'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19259; Package emacs. (Fri, 05 Dec 2014 02:13:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 19259 <at> debbugs.gnu.org
Subject: RE: bug#19259: 25.0.50; Be able to use `compare-windows' in either
 direction
Date: Thu, 4 Dec 2014 18:12:34 -0800 (PST)
> > Especially when `compare-windows' is used repeatedly (e.g. bound
> > to a repeatable key etc.), it can be helpful to be able to
> > sometimes compare backward, toward bob, instead of always forward,
> > toward eob.  Please add this enhancement.
> 
> Why do you want this feature?  After comparing from the top of the
> buffer you can return to previous matches by popping previous
> positions from the mark ring with `C-u C-SPC C-SPC C-SPC ...'

It's not just about returning to positions.  And you don't necessarily
want to pop, just to navigate.  And show the highlighting.

And you don't necessarily want to start at bob.  (But you might want
to wrap around to there - that is not part of this enhancement request).

Think ediff.  With ediff you can easily go back and forth, either
direction, from any difference position, restoring its highlighting.

You can even jump to a particular difference (`j').  And show the
difference/comparison at point (`g').  The idea is to make
`compare-windows' similarly useful.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19259; Package emacs. (Tue, 13 Jul 2021 20:53:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19259 <at> debbugs.gnu.org
Subject: Re: bug#19259: 25.0.50; Be able to use `compare-windows' in either
 direction
Date: Tue, 13 Jul 2021 22:52:10 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Especially when `compare-windows' is used repeatedly (e.g. bound to a
> repeatable key etc.), it can be helpful to be able to sometimes
> compare backward, toward bob, instead of always forward, toward eob.
> Please add this enhancement.

A few days after this bug report (apparently),
`compare-windows-get-window-function' was added:

commit 96e6fd3c155b1851e0acd477789535a45b8d3187
Author:     Juri Linkov <juri <at> linkov.net>
AuthorDate: Fri Dec 5 02:50:41 2014 +0200

    Compare with the most recently used window by default.
    
    * lisp/vc/compare-w.el (compare-windows-get-window-function):
    New defcustom.

This can be redefined by the user to respond to `C-u' and the like, so I
don't think there's anything more to do here, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 19259 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 13 Jul 2021 20:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19259; Package emacs. (Tue, 13 Jul 2021 21:58:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "19259 <at> debbugs.gnu.org" <19259 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#19259: 25.0.50; Be able to use
 `compare-windows' in either direction
Date: Tue, 13 Jul 2021 21:57:42 +0000
> > Especially when `compare-windows' is used repeatedly (e.g. bound to a
> > repeatable key etc.), it can be helpful to be able to sometimes
> > compare backward, toward bob, instead of always forward, toward eob.
> > Please add this enhancement.
> 
> A few days after this bug report (apparently),
> `compare-windows-get-window-function' was added:
> 
> commit 96e6fd3c155b1851e0acd477789535a45b8d3187
> Author:     Juri Linkov <juri <at> linkov.net>
> AuthorDate: Fri Dec 5 02:50:41 2014 +0200
> 
>     Compare with the most recently used window by default.
> 
>     * lisp/vc/compare-w.el (compare-windows-get-window-function):
>     New defcustom.
> 
> This can be redefined by the user to respond to `C-u' and the like, so I
> don't think there's anything more to do here, and I'm closing this bug
> report.

So your decision is "won't fix".  Telling users they
can, essentially, redefine the command is not what
this request was about.

The request is clearly about fixing `compare-windows'
so that it can go either way - acting like `ediff'.
It specifically mentions `ediff' as a model behavior
in this regard.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 231 days ago.

Previous Next


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