Subject: bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second

From: Daniel Barrett <[email-masked]>
Date: Tue, 27 Sep 2016 08:00:30 -0400

When you run emacs in its own X window, the kill-ring-save command
fails to give visual feedback of the point and mark, but ONLY THE
FIRST TIME you run it on a region. This inconsistency is confusing
and makes the user think that he mistyped the command. Subsequent runs
of kill-ring-save work properly.

1. Run "emacs -Q --debug-init" so emacs opens in its own window. In
the scratch buffer, type any line of text.

2. Position the point at the beginning of the line you typed, 
and set the mark (set-mark-command).

3. Move the point to the end of the line and press M-w (kill-ring-save).

4. Notice that the cursor does NOT provide visual feedback by "blinking"
the point and mark.  THIS IS THE BUG.

5. Now type M-w (kill-ring-save) a second time. This time, the cursor
DOES blink the point and mark to provide visual feedback. This remains
true for all subsequent runs of kill-ring-save on this region, until you
move point or mark.

Possible important detail: The problem behavior is different if you add
the "-nw" option when running emacs (say, within KDE's Konsole). In this
case, the region formed in step 3 gets HIGHLIGHTED in reverse-video when
you move the cursor to end of line, which provides visual feedback of a
different kind. The first kill-ring-save makes the highlighting
disappear. When emacs is run in its own window -nw, the region does not
appear highlighted. Perhaps in this case, emacs "thinks" the
highlighting is present and therefore doesn't bother to "blink" the
point and mark.

This is in the stock emacs 24.5 package distributed with Ubuntu 16.04
LTS (Xenial). The problem did not occur in the previous version of
Ubuntu (15.10).

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11803000
System Description:	Ubuntu 16.04.1 LTS

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/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --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/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50a2ps.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50php-elisp.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort gnus-util mail-extr warnings emacsbug message format-spec
rfc822 mml easymenu mml-sec 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 edmacro kmacro
cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 76238 5810)
 (symbols 48 18562 0)
 (miscs 40 47 100)
 (strings 32 11574 4949)
 (string-bytes 1 327206)
 (vectors 16 9502)
 (vector-slots 8 389350 11073)
 (floats 8 71 234)
 (intervals 56 217 7)
 (buffers 960 12)
 (heap 1024 26473 1596))

--