Re: Help isolating an exmh text selection problem on recent Tk

Emile CARCAMO <[email protected]> Sun, 19 Jun 2016 22:39:51 +0200
Newsgroups gmane.mail.exmh.user
Message-ID <[email protected]>
>  I'm a long term exmh user, mostly on Ubuntu for the past few years.
> We are in the process of updating from Ubuntu 14.04 to Ubuntu 16.04,
> and on 16.04 I've found that my exmh install has an unfortunate bug in
> text selection in the message display. The bug itself is that if you
> double-click on the first word in a paragraph, Tk includes whitespace
> before the word in the selection. If the first word is indented,
> you get the whitespace from the start of the line to the word; if the
> first word is not indented, you get the whitespace back to the previous
> non-whitespace line (ie, you get an entire blank line).
> =

> (This doesn't happen if the 'word' is/starts with non-alphabetic
> characters, like '>' or '-' or '*'.)
> =

> My current assumption is that exmh isn't doing anything weird with
> selection handling in its Tk text widgets, so I expect that this is a
> Tk bug and/or change in the Tk version that Ubuntu 16.04 has (8.6.5,
> the latest version; 14.04 has 8.6.1 and doesn't have this problem),
> and will have to be fixed or patched around by the Tk people. I intend
> to report a bug to them (once I figure out how), but I'd like to have
> a minimal test case for them.
> =

> So: does anyone know exmh Tk code well enough to tell me how it creates
> and configures its message display text widgets? Armed with this
> information I think I can create a minimal Tcl/TK program that creates
> a text widget, puts some text in, and then lets you click/select away,
> which should presumably reproduce this issue in a nice simple form for
> the Tk people. I have tried to go through the Exmh code and I can sort
> of see it doing things in eg lib/widgetText.tcl, but I am not a Tcl/TK
> programmer and I know I'm missing things.
> =

> (For instance, I've read that you have to do some extra work to make a
> text widget not editable, but I can't see this in the code. So either
> I'm missing something in the code or I'm wrong in my understanding of Tk.)
> =

>  Thanks in advance. (And I'd be interested to know if anyone else
> is seeing this issue.)
> =

> PS: In looking at the code some more, I suspect that this is some sort
> of behavior change in the text widget 'wordstart' operation. There are
> even some 2015 Tk changes in this area (apparently after 8.6.4 was
> released):
>  2015-04-09 (bug)[e4ed00] [$text index "1.0 display wordstart"] crash (vo=
gel)
>  2015-04-09 (bug)[562118] Unicode support of "wordstart" modifier (vogel)
> =

> 	- cks
> =


Hello Chris,

	Since I sometimes noticed that upgrading my Fedora Linux laptop
	brings a strange behaviour on TCL/TK display, I've recompiled
	TCL/TK under /usr/local :

lrwxrwxrwx. 1 emile carcamo    8 Sep 22  2015 /usr/local/bin/tclsh -> tclsh=
8.6
lrwxrwxrwx. 1 emile carcamo    7 Sep 22  2015 /usr/local/bin/wish -> wish8.6
-rwxr-xr-x. 1 emile carcamo 5556 Jul 15  2013 /usr/local/bin/tclsh8.6
-rwxr-xr-x. 1 emile carcamo 5564 Jul 15  2013 /usr/local/bin/wish8.6
<dell540.wifi>[emile]<130>

dell540.wifi>[emile]<134>grep wish /usr/local/exmh/bin/exmh
#!/usr/local/bin/wish -f
set wish /usr/local/bin/wish
<dell540.wifi>[emile]<135>

	and decided to use this flavour with exmh installed from tarball
	( /usr/local/exmh/{lib,bin} ).

	It avoids me all bad surprises like the one you mentionned above.
	I'm quite happy with these versions =


-rwxr-xr-x. 1 emile carcamo 4239836 Jul 15  2013 /usr/local/archive/tk8.6.0=
-src.tar.gz
-rwxr-xr-x. 1 emile carcamo 8636908 Jul 15  2013 /usr/local/archive/tcl8.6.=
0-src.tar.gz

	Make sure that tcl is compiled with option -DTK_NO_SECURITY like
	it is explained in the exmh documentation.

	Good luck and with best regards,

-- =

Emile_CARCAMO                       mailto:[email protected]
HPC System Engineer                 (+33)1-3080-3090
Bull (now part of Atos Group)       (+33)6-8363-2200

 /  Les erreurs Windows, c'est un peu comme les r=EAves, il faut  \
 \ savoir les interpr=E9ter, parfois =E7a peut vouloir dire qqchose /