unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
@ 2014-12-02 22:53 Drew Adams
  2014-12-05  0:57 ` Juri Linkov
  2021-07-13 20:52 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2014-12-02 22:53 UTC (permalink / raw)
  To: 19259

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@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'





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

* bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
  2014-12-02 22:53 bug#19259: 25.0.50; Be able to use `compare-windows' in either direction Drew Adams
@ 2014-12-05  0:57 ` Juri Linkov
  2014-12-05  2:12   ` Drew Adams
  2021-07-13 20:52 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2014-12-05  0:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19259

> 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 ...'





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

* bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
  2014-12-05  0:57 ` Juri Linkov
@ 2014-12-05  2:12   ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2014-12-05  2:12 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 19259

> > 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.





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

* bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
  2014-12-02 22:53 bug#19259: 25.0.50; Be able to use `compare-windows' in either direction Drew Adams
  2014-12-05  0:57 ` Juri Linkov
@ 2021-07-13 20:52 ` Lars Ingebrigtsen
  2021-07-13 21:57   ` bug#19259: [External] : " Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-13 20:52 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19259

Drew Adams <drew.adams@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@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





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

* bug#19259: [External] : Re: bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
  2021-07-13 20:52 ` Lars Ingebrigtsen
@ 2021-07-13 21:57   ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2021-07-13 21:57 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 19259@debbugs.gnu.org

> > 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@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.





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

end of thread, other threads:[~2021-07-13 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 22:53 bug#19259: 25.0.50; Be able to use `compare-windows' in either direction Drew Adams
2014-12-05  0:57 ` Juri Linkov
2014-12-05  2:12   ` Drew Adams
2021-07-13 20:52 ` Lars Ingebrigtsen
2021-07-13 21:57   ` bug#19259: [External] : " Drew Adams

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).