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

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

RE: string-rectangle provides on-the-fly preview, undesirably


From: Drew Adams
Subject: RE: string-rectangle provides on-the-fly preview, undesirably
Date: Sun, 2 Jul 2017 16:51:11 -0700 (PDT)

> The command C-x r t string-rectangle in version 24 and previously
> would "Replace rectangle contents with STRING on each line
> (‘string-rectangle’)."  The same happens in version 25 but
> differently.  In version 25 the change is displayed incrementally
> character by character as you type.  With a large displayed
> rectangle
> this can cause a lot of dynamic "flicker" as every character on the
> display is moved.  This is driving me crazy.
> 
> Is there a way to return to the previous version 24 behavior?

Someone will correct me if I'm wrong, but they don't seem
to have provided for an easy opt-out of this behavior.

If I'm right, you might want to use `M-x report-emacs-bug'
to suggest that they do so.  It should be very easy to do,
based on what I see in the code.  The previewing feature
should be optional, IMO, even if someone has decided that
it should be on by default.

FWIW, here is the Emacs 24.5 code, which you should still
be able to use.

(defun string-rectangle (start end string)
  "Replace rectangle contents with STRING on each line.
The length of STRING need not be the same as the rectangle width.

Called from a program, takes three args; START, END and STRING."
  (interactive
   (progn (barf-if-buffer-read-only)
          (list
           (region-beginning)
           (region-end)
           (read-string (format "String rectangle (default %s): "
                                (or (car string-rectangle-history) ""))
                        nil 'string-rectangle-history
                        (car string-rectangle-history)))))
  (goto-char
   (apply-on-rectangle 'string-rectangle-line start end string t)))



reply via email to

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