all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
@ 2016-09-27 12:00 Daniel Barrett
  2016-09-27 12:33 ` npostavs
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Barrett @ 2016-09-27 12:00 UTC (permalink / raw)
  To: 24554; +Cc: dbarrett


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

-- 





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 12:00 bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second Daniel Barrett
@ 2016-09-27 12:33 ` npostavs
  2016-09-27 12:39   ` Daniel Barrett
  0 siblings, 1 reply; 10+ messages in thread
From: npostavs @ 2016-09-27 12:33 UTC (permalink / raw)
  To: Daniel Barrett; +Cc: 24554

Daniel Barrett <dbarrett@blazemonger.com> writes:
> 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.
>

Are you saying that region highlighting doesn't work in Emacs 24.5 in
graphical mode?

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





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 12:33 ` npostavs
@ 2016-09-27 12:39   ` Daniel Barrett
  2016-09-27 14:45     ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Barrett @ 2016-09-27 12:39 UTC (permalink / raw)
  To: npostavs; +Cc: Daniel Barrett, 24554

On September 27, 2016, npostavs@users.sourceforge.net wrote:
>Are you saying that region highlighting doesn't work in Emacs 24.5 in
>graphical mode?

Correct. (And in addition, kill-ring-save doesn't blink the point and mark
on the first try, but it does on the second, third, etc.)





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 12:39   ` Daniel Barrett
@ 2016-09-27 14:45     ` Eli Zaretskii
  2016-09-27 16:05       ` Daniel Barrett
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2016-09-27 14:45 UTC (permalink / raw)
  To: Daniel Barrett; +Cc: npostavs, 24554

> Date: Tue, 27 Sep 2016 08:39:09 -0400
> From: Daniel Barrett <dbarrett@blazemonger.com>
> Cc: Daniel Barrett <dbarrett@blazemonger.com>, 24554@debbugs.gnu.org
> 
> On September 27, 2016, npostavs@users.sourceforge.net wrote:
> >Are you saying that region highlighting doesn't work in Emacs 24.5 in
> >graphical mode?
> 
> Correct.

In that case, I cannot reproduce it here.  Region highlighting does
work for me in both text and GUI mode.

> (And in addition, kill-ring-save doesn't blink the point and mark
> on the first try, but it does on the second, third, etc.)

It doesn't blink on the first try because the region is highlighted,
as far as Emacs is concerned.  So the fact you don't see the highlight
is the only problem in this case, and that problem is specific to your
system, somehow.

If you invoke "emacs -Q" n GUI mode and then type

  M-x list-faces-display RET

does the 'region' face has a distinct background color?





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 14:45     ` Eli Zaretskii
@ 2016-09-27 16:05       ` Daniel Barrett
  2016-09-27 16:27         ` Eli Zaretskii
  2016-09-27 22:33         ` Daniel Barrett
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Barrett @ 2016-09-27 16:05 UTC (permalink / raw)
  To: eliz; +Cc: Daniel Barrett, npostavs, 24554

On September 27, 2016, Eli Zaretskii wrote:
>In that case, I cannot reproduce it here.  Region highlighting does
>work for me in both text and GUI mode.

Interesting. Are you using Ubuntu 16.04 with KDE/Plasma as the GUI?

>If you invoke "emacs -Q" n GUI mode and then type
>  M-x list-faces-display RET
>does the 'region' face has a distinct background color?

Cool command, didn't know about it! I will try this as soon as I am in
front of the console again.

--
Dan Barrett
dbarrett@blazemonger.com






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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 16:05       ` Daniel Barrett
@ 2016-09-27 16:27         ` Eli Zaretskii
  2016-09-27 22:33         ` Daniel Barrett
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2016-09-27 16:27 UTC (permalink / raw)
  To: Daniel Barrett; +Cc: dbarrett, npostavs, 24554

> Date: Tue, 27 Sep 2016 12:05:55 -0400
> Cc: dbarrett@blazemonger.com,
>     npostavs@users.sourceforge.net,
>     24554@debbugs.gnu.org, Daniel Barrett <dbarrett@blazemonger.com>
> From: Daniel Barrett <dbarrett@blazemonger.com>
> 
> On September 27, 2016, Eli Zaretskii wrote:
> >In that case, I cannot reproduce it here.  Region highlighting does
> >work for me in both text and GUI mode.
> 
> Interesting. Are you using Ubuntu 16.04 with KDE/Plasma as the GUI?

No.





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 16:05       ` Daniel Barrett
  2016-09-27 16:27         ` Eli Zaretskii
@ 2016-09-27 22:33         ` Daniel Barrett
  2016-09-28 14:46           ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Barrett @ 2016-09-27 22:33 UTC (permalink / raw)
  To: eliz; +Cc: Daniel Barrett, npostavs, 24554

On September 27, 2016, Eli Zaretskii wrote:
>If you invoke "emacs -Q" n GUI mode and then type
>  M-x list-faces-display RET
>does the 'region' face has a distinct background color?

Holy crap, this revealed the problem. The "region" background color is
identical to the Emacs window's background color. So the region color
is not visible. Thank you for providing the clue to solve the mystery.

So, I can use "set-face-background" to fix the issue for myself. Now
to track it down in Ubuntu. It appears to be related to X resources,
because the problem occurs when I run:

  $ emacs -q --no-site-file --no-splash

but not when I run:

  $ emacs -Q

(and -Q skips processing of X resources, according to the emacs
manpage).  Sure enough, the resource named "*background" has value
#eff0f1 (according to the "appres" Linux command), which is also the
region color.

So... any idea where I might find where these resources are set? I
don't have an .Xdefaults or .Xresources file in my home directory. I'd
like to track it down and file an Ubuntu bug report if necessary.

--
Dan Barrett
dbarrett@blazemonger.com






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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-27 22:33         ` Daniel Barrett
@ 2016-09-28 14:46           ` Eli Zaretskii
  2016-09-28 22:41             ` Daniel Barrett
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2016-09-28 14:46 UTC (permalink / raw)
  To: Daniel Barrett; +Cc: npostavs, 24554

> Date: Tue, 27 Sep 2016 18:33:59 -0400
> Cc: npostavs@users.sourceforge.net,
>     24554@debbugs.gnu.org, Daniel Barrett <dbarrett@blazemonger.com>
> From: Daniel Barrett <dbarrett@blazemonger.com>
> 
> So... any idea where I might find where these resources are set? I
> don't have an .Xdefaults or .Xresources file in my home directory.

AFAIR, it could be in any number of places, because the X startup
scripts could source any file Ubuntu wants them to.  The classical
places are as below:

  . /usr/lib/X11/app-defaults
  . files in the directory pointed to by the XAPPLRESDIR environment
    variable
  . a file in your home directory named literally "Emacs"
  . explicit arguments to xrdb invocation when the X session starts
  . a file pointed to by the XENVIRONMENT environment variable

Also look inside the file .xinitrc, if you have it, and in
/etc/X11/xinit/xinitrc, for possible clues.

Once again, Ubuntu could (and probably did) hack the heck out of this
stuff by providing their own resources somewhere and arranging for the
X session to source them at startup.  That's Ubuntu-specific, so I
have no idea, as I don't use that system actively.  Various Google
hits seem to indicate that the /etc/X11/Xsession.d directory might
hold at least some of the relevant stuff.  The Xsession man page might
help.

> I'd like to track it down and file an Ubuntu bug report if
> necessary.

That is probably a good idea anyway.





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-28 14:46           ` Eli Zaretskii
@ 2016-09-28 22:41             ` Daniel Barrett
  2016-09-29  2:47               ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Barrett @ 2016-09-28 22:41 UTC (permalink / raw)
  To: eliz; +Cc: Daniel Barrett, npostavs, 24554


I have filed an Ubuntu bug report for the color issue.

  https://bugs.launchpad.net/ubuntu/+source/emacs24/+bug/1628707

You may close this ticket. Thanks for your help.





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

* bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second
  2016-09-28 22:41             ` Daniel Barrett
@ 2016-09-29  2:47               ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2016-09-29  2:47 UTC (permalink / raw)
  To: Daniel Barrett; +Cc: 24554-done, npostavs

> Date: Wed, 28 Sep 2016 18:41:10 -0400
> Cc: dbarrett@blazemonger.com,
>     npostavs@users.sourceforge.net,
>     24554@debbugs.gnu.org, Daniel Barrett <dbarrett@blazemonger.com>
> From: Daniel Barrett <dbarrett@blazemonger.com>
> 
> 
> I have filed an Ubuntu bug report for the color issue.
> 
>   https://bugs.launchpad.net/ubuntu/+source/emacs24/+bug/1628707
> 
> You may close this ticket. Thanks for your help.

Thanks, closing.





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

end of thread, other threads:[~2016-09-29  2:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27 12:00 bug#24554: 24.5; kill-ring-save fails to give visual feedback on first run, but does on the second Daniel Barrett
2016-09-27 12:33 ` npostavs
2016-09-27 12:39   ` Daniel Barrett
2016-09-27 14:45     ` Eli Zaretskii
2016-09-27 16:05       ` Daniel Barrett
2016-09-27 16:27         ` Eli Zaretskii
2016-09-27 22:33         ` Daniel Barrett
2016-09-28 14:46           ` Eli Zaretskii
2016-09-28 22:41             ` Daniel Barrett
2016-09-29  2:47               ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.