unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27974: 25.2; string-rectangle on-the-fly preview bad
@ 2017-08-05 19:56 Bob Proulx
  2017-08-05 20:27 ` Mark Oteiza
       [not found] ` <handler.27974.B.15019629994623.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Bob Proulx @ 2017-08-05 19:56 UTC (permalink / raw)
  To: 27974

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 as a dynamic preview.  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.

I raised this issue on help-gnu-emacs.  I and at least one other person
thinks this preview feature should be optional even if it is the
default.  I think it is a pretty radical change however and would wish
it were not the default.  But at the least it needs to be possible to
disable the dynamic preview.  I really hate this feature.

Thanks,
Bob

P.S. The NEWS file says:

*** 'string-rectangle' provides on-the-fly preview of the result.

In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2017-07-31, modified by Debian built on trouble
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=lucid
 --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-Ei2Old/emacs25-25.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11

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

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  csv-field-index-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
Quit
Saving file /home/bob/scratch...
Wrote /home/bob/scratch
Mark set [3 times]
Saving file /home/bob/private/slog...
Wrote /home/bob/private/slog
Use C-c C-c to remember the data.
kill-line: End of buffer
Saving file /home/bob/.notes...
Wrote /home/bob/.notes

Load-path shadows:
/usr/share/emacs/25.2/site-lisp/elpa/jabber-0.8.92/fsm hides /usr/share/emacs/25.2/site-lisp/elpa/fsm-0.2.1/fsm
/usr/share/emacs25/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs/25.2/site-lisp/elpa/magit-2.10.3/magit-popup hides /usr/share/emacs/25.2/site-lisp/elpa/magit-popup-2.10.3/magit-popup
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/25.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/site-lisp/flim/hex-util hides /usr/share/emacs/25.2/lisp/hex-util
/usr/share/emacs25/site-lisp/flim/md4 hides /usr/share/emacs/25.2/lisp/md4
/usr/share/emacs25/site-lisp/css-mode/css-mode hides /usr/share/emacs/25.2/lisp/textmodes/css-mode
/usr/share/emacs/site-lisp/remember-el/remember hides /usr/share/emacs/25.2/lisp/textmodes/remember
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.2/lisp/textmodes/rst
/usr/share/emacs25/site-lisp/flim/sasl-cram hides /usr/share/emacs/25.2/lisp/net/sasl-cram
/usr/share/emacs25/site-lisp/flim/ntlm hides /usr/share/emacs/25.2/lisp/net/ntlm
/usr/share/emacs25/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/25.2/lisp/net/sasl-ntlm
/usr/share/emacs25/site-lisp/flim/sasl hides /usr/share/emacs/25.2/lisp/net/sasl
/usr/share/emacs25/site-lisp/flim/hmac-md5 hides /usr/share/emacs/25.2/lisp/net/hmac-md5
/usr/share/emacs25/site-lisp/flim/sasl-digest hides /usr/share/emacs/25.2/lisp/net/sasl-digest
/usr/share/emacs25/site-lisp/flim/hmac-def hides /usr/share/emacs/25.2/lisp/net/hmac-def
/usr/share/emacs25/site-lisp/erc/erc-ring hides /usr/share/emacs/25.2/lisp/erc/erc-ring
/usr/share/emacs25/site-lisp/erc/erc-truncate hides /usr/share/emacs/25.2/lisp/erc/erc-truncate
/usr/share/emacs25/site-lisp/erc/erc-match hides /usr/share/emacs/25.2/lisp/erc/erc-match
/usr/share/emacs25/site-lisp/erc/erc-autoaway hides /usr/share/emacs/25.2/lisp/erc/erc-autoaway
/usr/share/emacs25/site-lisp/erc/erc-button hides /usr/share/emacs/25.2/lisp/erc/erc-button
/usr/share/emacs25/site-lisp/erc/erc-goodies hides /usr/share/emacs/25.2/lisp/erc/erc-goodies
/usr/share/emacs25/site-lisp/erc/erc-notify hides /usr/share/emacs/25.2/lisp/erc/erc-notify
/usr/share/emacs25/site-lisp/erc/erc-backend hides /usr/share/emacs/25.2/lisp/erc/erc-backend
/usr/share/emacs25/site-lisp/erc/erc-xdcc hides /usr/share/emacs/25.2/lisp/erc/erc-xdcc
/usr/share/emacs25/site-lisp/erc/erc-join hides /usr/share/emacs/25.2/lisp/erc/erc-join
/usr/share/emacs25/site-lisp/erc/erc-pcomplete hides /usr/share/emacs/25.2/lisp/erc/erc-pcomplete
/usr/share/emacs25/site-lisp/erc/erc-identd hides /usr/share/emacs/25.2/lisp/erc/erc-identd
/usr/share/emacs25/site-lisp/erc/erc-stamp hides /usr/share/emacs/25.2/lisp/erc/erc-stamp
/usr/share/emacs25/site-lisp/erc/erc-page hides /usr/share/emacs/25.2/lisp/erc/erc-page
/usr/share/emacs25/site-lisp/erc/erc hides /usr/share/emacs/25.2/lisp/erc/erc
/usr/share/emacs25/site-lisp/erc/erc-sound hides /usr/share/emacs/25.2/lisp/erc/erc-sound
/usr/share/emacs25/site-lisp/erc/erc-replace hides /usr/share/emacs/25.2/lisp/erc/erc-replace
/usr/share/emacs25/site-lisp/erc/erc-log hides /usr/share/emacs/25.2/lisp/erc/erc-log
/usr/share/emacs25/site-lisp/erc/erc-track hides /usr/share/emacs/25.2/lisp/erc/erc-track
/usr/share/emacs25/site-lisp/erc/erc-imenu hides /usr/share/emacs/25.2/lisp/erc/erc-imenu
/usr/share/emacs25/site-lisp/erc/erc-capab hides /usr/share/emacs/25.2/lisp/erc/erc-capab
/usr/share/emacs25/site-lisp/erc/erc-lang hides /usr/share/emacs/25.2/lisp/erc/erc-lang
/usr/share/emacs25/site-lisp/erc/erc-services hides /usr/share/emacs/25.2/lisp/erc/erc-services
/usr/share/emacs25/site-lisp/erc/erc-ezbounce hides /usr/share/emacs/25.2/lisp/erc/erc-ezbounce
/usr/share/emacs25/site-lisp/erc/erc-speedbar hides /usr/share/emacs/25.2/lisp/erc/erc-speedbar
/usr/share/emacs25/site-lisp/erc/erc-spelling hides /usr/share/emacs/25.2/lisp/erc/erc-spelling
/usr/share/emacs25/site-lisp/erc/erc-list hides /usr/share/emacs/25.2/lisp/erc/erc-list
/usr/share/emacs25/site-lisp/erc/erc-dcc hides /usr/share/emacs/25.2/lisp/erc/erc-dcc
/usr/share/emacs25/site-lisp/erc/erc-menu hides /usr/share/emacs/25.2/lisp/erc/erc-menu
/usr/share/emacs25/site-lisp/erc/erc-netsplit hides /usr/share/emacs/25.2/lisp/erc/erc-netsplit
/usr/share/emacs25/site-lisp/erc/erc-networks hides /usr/share/emacs/25.2/lisp/erc/erc-networks
/usr/share/emacs25/site-lisp/erc/erc-compat hides /usr/share/emacs/25.2/lisp/erc/erc-compat
/usr/share/emacs25/site-lisp/erc/erc-fill hides /usr/share/emacs/25.2/lisp/erc/erc-fill
/usr/share/emacs25/site-lisp/erc/erc-ibuffer hides /usr/share/emacs/25.2/lisp/erc/erc-ibuffer
/usr/share/emacs25/site-lisp/erc/erc-hecomplete hides /usr/share/emacs/25.2/lisp/obsolete/erc-hecomplete

Features:
(shadow mail-extr emacsbug message format-spec rfc822 mml mml-sec
password-cache epg gnus-util mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils remember cal-move
cal-menu calendar cal-loaddefs noutline outline sh-script executable
dired-aux shell pcomplete comint ring vc-git diff-mode ruby-mode smie
ebuff-menu csv-mode sort muttrc-mode man ansi-color misearch
multi-isearch advice minibuffer-complete-cycle dired term/xterm xterm
time-date time t-mouse finder-inf muse-autoloads package epg-config seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib remember-autoloads planner-autoloads debian-el
debian-el-loaddefs w3m-load erc-auto emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el
dpkg-dev-el-loaddefs bbdb-autoloads mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting font-render-setting x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 177712 15387)
 (symbols 48 25237 0)
 (miscs 40 237 538)
 (strings 32 33554 11024)
 (string-bytes 1 1076059)
 (vectors 16 22757)
 (vector-slots 8 1330894 213593)
 (floats 8 212 685)
 (intervals 56 10105 98)
 (buffers 976 40))





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

* bug#27974: 25.2; string-rectangle on-the-fly preview bad
  2017-08-05 19:56 bug#27974: 25.2; string-rectangle on-the-fly preview bad Bob Proulx
@ 2017-08-05 20:27 ` Mark Oteiza
       [not found] ` <handler.27974.B.15019629994623.ack@debbugs.gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Oteiza @ 2017-08-05 20:27 UTC (permalink / raw)
  To: Bob Proulx; +Cc: 27974


Bob Proulx <bob@proulx.com> writes:
> I raised this issue on help-gnu-emacs.  I and at least one other person
> thinks this preview feature should be optional even if it is the
> default.

It is optional.





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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
       [not found] ` <handler.27974.B.15019629994623.ack@debbugs.gnu.org>
@ 2017-08-05 21:11   ` Bob Proulx
  2017-10-16  2:05     ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Proulx @ 2017-08-05 21:11 UTC (permalink / raw)
  To: 27974

tags 27974 + patch
thanks

Filing this ticket generated more discussion and I was informed that
rectangle-preview variable controls this feature.  Yes!  This is what
I needed to know.  I really must ask, is this really a good change?
It is extremely annoying behavior.

    ;; Disable nasty on-the-fly preview from string-rectangle.
    (setq rectangle-preview nil)

However this bug ticket is still relevant because this information
should be provided in the NEWS (and perhaps Antinews) pages.

Let me suggest the following addition to the NEWS file.

 *** 'string-rectangle' provides on-the-fly preview of the result.
+This is controlled by the rectangle-preview variable.  Defaults to t.
+Set (setq rectangle-preview nil) if you want the previous behavior.

Please consider this patch.  Thanks.

Bob





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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
  2017-08-05 21:11   ` bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad) Bob Proulx
@ 2017-10-16  2:05     ` Noam Postavsky
  2017-10-16  2:37       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2017-10-16  2:05 UTC (permalink / raw)
  To: Bob Proulx; +Cc: 27974

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

Bob Proulx <bob@proulx.com> writes:

> Let me suggest the following addition to the NEWS file.
>
>  *** 'string-rectangle' provides on-the-fly preview of the result.
> +This is controlled by the rectangle-preview variable.  Defaults to t.
> +Set (setq rectangle-preview nil) if you want the previous behavior.

I think it should also be documented in the docstring of
string-rectangle:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1506 bytes --]

From 4fd248152d15218e3f9f1d3747cebdad87062513 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 15 Oct 2017 17:09:09 -0400
Subject: [PATCH v2] Document rectangle-preview option more (Bug#27974)

* lisp/rect.el (string-rectangle):
* etc/NEWS.25: Mention `rectangle-preview'.
---
 etc/NEWS.25  | 2 ++
 lisp/rect.el | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/etc/NEWS.25 b/etc/NEWS.25
index 5201a300e0..aac60c4688 100644
--- a/etc/NEWS.25
+++ b/etc/NEWS.25
@@ -712,7 +712,9 @@ CLOS class and slot documentation.
 *** Rectangle Mark mode can have corners past EOL or in the middle of a TAB.
 
 *** 'C-x C-x' in 'rectangle-mark-mode' now cycles through the four corners.
+
 *** 'string-rectangle' provides on-the-fly preview of the result.
+Customize 'rectangle-preview' to nil for the old behavior.
 
 ** New font-lock functions 'font-lock-ensure' and 'font-lock-flush'.
 These should be used in preference to 'font-lock-fontify-buffer' when
diff --git a/lisp/rect.el b/lisp/rect.el
index 12e62b6a99..4ad7a98dda 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -450,6 +450,10 @@ string-rectangle
   "Replace rectangle contents with STRING on each line.
 The length of STRING need not be the same as the rectangle width.
 
+When called interactively and option `rectangle-preview' is
+non-nil, the result is previewed as the string is entered in the
+minibuffer.
+
 Called from a program, takes three args; START, END and STRING."
   (interactive
    (progn
-- 
2.11.0


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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
  2017-10-16  2:05     ` Noam Postavsky
@ 2017-10-16  2:37       ` Eli Zaretskii
  2017-10-16  2:54         ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2017-10-16  2:37 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 27974, bob

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Sun, 15 Oct 2017 22:05:02 -0400
> Cc: 27974@debbugs.gnu.org
> 
> Bob Proulx <bob@proulx.com> writes:
> 
> > Let me suggest the following addition to the NEWS file.
> >
> >  *** 'string-rectangle' provides on-the-fly preview of the result.
> > +This is controlled by the rectangle-preview variable.  Defaults to t.
> > +Set (setq rectangle-preview nil) if you want the previous behavior.
> 
> I think it should also be documented in the docstring of
> string-rectangle:

I agree.

> +When called interactively and option `rectangle-preview' is
> +non-nil, the result is previewed as the string is entered in the
> +minibuffer.

Can you reword this to make less use of passive tense?

Thanks.





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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
  2017-10-16  2:37       ` Eli Zaretskii
@ 2017-10-16  2:54         ` Noam Postavsky
  2017-10-16 14:27           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2017-10-16  2:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 27974, bob

Eli Zaretskii <eliz@gnu.org> writes:

> Can you reword this to make less use of passive tense?

Hmm, yeah, I'm not quite satisfied with the wording.  How about this:

When called interactively and option `rectangle-preview' is
non-nil, display the result as the user enters the string into
the minibuffer.






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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
  2017-10-16  2:54         ` Noam Postavsky
@ 2017-10-16 14:27           ` Eli Zaretskii
  2017-10-17  0:14             ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2017-10-16 14:27 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 27974, bob

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Cc: 27974@debbugs.gnu.org,  bob@proulx.com
> Date: Sun, 15 Oct 2017 22:54:50 -0400
> 
> When called interactively and option `rectangle-preview' is
> non-nil, display the result as the user enters the string into
> the minibuffer.

This is fine, thanks.





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

* bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)
  2017-10-16 14:27           ` Eli Zaretskii
@ 2017-10-17  0:14             ` Noam Postavsky
  0 siblings, 0 replies; 8+ messages in thread
From: Noam Postavsky @ 2017-10-17  0:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 27974, bob

close 27974 26.1
quit

Eli Zaretskii <eliz@gnu.org> writes:

>> When called interactively and option `rectangle-preview' is
>> non-nil, display the result as the user enters the string into
>> the minibuffer.

> This is fine, thanks.

Pushed to emacs-26.

[1: 20cc68e871]: 2017-10-16 20:10:55 -0400
  Document rectangle-preview option more (Bug#27974)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=20cc68e871b8903a603aa4a89d2bc648d010781a>





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

end of thread, other threads:[~2017-10-17  0:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-05 19:56 bug#27974: 25.2; string-rectangle on-the-fly preview bad Bob Proulx
2017-08-05 20:27 ` Mark Oteiza
     [not found] ` <handler.27974.B.15019629994623.ack@debbugs.gnu.org>
2017-08-05 21:11   ` bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad) Bob Proulx
2017-10-16  2:05     ` Noam Postavsky
2017-10-16  2:37       ` Eli Zaretskii
2017-10-16  2:54         ` Noam Postavsky
2017-10-16 14:27           ` Eli Zaretskii
2017-10-17  0:14             ` Noam Postavsky

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