bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19170: 25.0.50; enhancement request: `compare-windows' use across fr


From: Drew Adams
Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames
Date: Fri, 28 Nov 2014 14:20:07 -0800 (PST)

> Thank you, Martin.  This is exactly what we need.

Looks good to me.  Please apply it.  But "matching points"
should be "match positions" - "point" can be confusing.

Possible enhancements, but not required to close this
enhancement request:

1. I do still think it would be good to provide more info
   in the message.

2. As I proposed in the past, I think it would be good to
   (as I do) bind comparison commands to the same prefix.
   I bind them to prefix `C-=' (just one possibility):

   C-= b  is ediff-buffers
   C-= d  is diff
   C-= e  is ediff-files
   C-= f  is ediff-files
   C-= w  is compare-windows-repeat

3. `compare-windows-repeat' is just a repeatable version
   of `compare-windows', so you can repeat it using, for
   example, `C-= w w w w w'.  Very handy, especially
   given the improvements you've just made.

Maybe consider doing #3 even if you don't want to do #2.
I use the definition below, but you can do it another way
(e.g., using `set-transient-map').

I use this helper function all the time.  It makes it
trivial to make a repeatable command:

(defun repeat-command (command)
    "Repeat COMMAND."
    (let ((repeat-message-function  'ignore))
      (setq last-repeatable-command  command)
      (repeat nil)))

So for example:

(defun compare-windows-repeat (ignore-whitespace)
  "Compare text in current window with text in next window.
You can repeat this by hitting the last key again...
See `compare-windows' - this is the same, except repeatable."
  (interactive "P")
  (require 'repeat)
  (repeat-command 'compare-windows))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]