Discussion:
[Texmacs-dev] a quick hack for bug #47338 [CJK] input disappears immediately
Zhaocong Jia
2017-09-02 13:51:17 UTC
Permalink
See the bug report here:
https://savannah.gnu.org/bugs/?47338

This bug happens when using "fcitx" input method
(or other input method I think), the "preeditString"
get disappear.

This happens for 1.99.5 with Qt5 on Linux (there's
no bug for the Qt4 pre-compiled binary). After some
bisecting, I find this bug exists in 2016-05-17, I can't
compile earlier versions to give a precise commit.
I think around that time, Qt5 support is being added,
so I presume this bug is related with Qt5.

The following patch "fix" this bug. It was supposed to
process and show the "preeditString", now I disabled that.

I hope this bug get resolved soon, because it affects almost
all CJK users.

diff --git a/src/Plugins/Qt/QTMWidget.cpp b/src/Plugins/Qt/QTMWidget.cpp
index d14b514ac..060651e89 100644
--- a/src/Plugins/Qt/QTMWidget.cpp
+++ b/src/Plugins/Qt/QTMWidget.cpp
@@ -559,8 +559,8 @@ QTMWidget::inputMethodEvent (QInputMethodEvent* event) {

r = r * as_string (pos) * ":" * from_qstring (preedit_string);
}
- if (!is_nil (tmwid))
- the_gui->process_keypress (tm_widget(), r, texmacs_time());
+ //if (!is_nil (tmwid))
+ //the_gui->process_keypress (tm_widget(), r, texmacs_time());
event->accept();
}

Best wishes,
Jia
Karl Hegbloom
2017-09-10 19:01:58 UTC
Permalink
I have a different patch to fix that, but it works differently. It's in my
syrinx-svn-trunk-guile-1.8 branch:
https://github.com/KarlHegbloom/texmacs/commit/5d96fe69ea98e4c41d8
Post by Zhaocong Jia
https://savannah.gnu.org/bugs/?47338
This bug happens when using "fcitx" input method
(or other input method I think), the "preeditString"
get disappear.
This happens for 1.99.5 with Qt5 on Linux (there's
no bug for the Qt4 pre-compiled binary). After some
bisecting, I find this bug exists in 2016-05-17, I can't
compile earlier versions to give a precise commit.
I think around that time, Qt5 support is being added,
so I presume this bug is related with Qt5.
The following patch "fix" this bug. It was supposed to
process and show the "preeditString", now I disabled that.
I hope this bug get resolved soon, because it affects almost
all CJK users.
diff --git a/src/Plugins/Qt/QTMWidget.cpp b/src/Plugins/Qt/QTMWidget.cpp
index d14b514ac..060651e89 100644
--- a/src/Plugins/Qt/QTMWidget.cpp
+++ b/src/Plugins/Qt/QTMWidget.cpp
@@ -559,8 +559,8 @@ QTMWidget::inputMethodEvent (QInputMethodEvent* event) {
r = r * as_string (pos) * ":" * from_qstring (preedit_string);
}
- if (!is_nil (tmwid))
- the_gui->process_keypress (tm_widget(), r, texmacs_time());
+ //if (!is_nil (tmwid))
+ //the_gui->process_keypress (tm_widget(), r, texmacs_time());
event->accept();
}
Best wishes,
Jia
_______________________________________________
Texmacs-dev mailing list
https://lists.gnu.org/mailman/listinfo/texmacs-dev
--
***@gmail.com
Zhaocong Jia
2017-09-11 00:01:00 UTC
Permalink
Post by Karl Hegbloom
I have a different patch to fix that, but it works differently. It's in my
https://github.com/KarlHegbloom/texmacs/commit/5d96fe69ea98e4c41d8
Your code just enable the "old input method preview", it's totally not working,
in fact, I was going to suggest to remove this chunk of code.
Daniel Bump
2017-09-11 20:08:07 UTC
Permalink
Dear TeXmacs developers,

I am trying to build TeXmacs 1.99.5 on Ubuntu 16.04.
My processor is a Xeon E3-1225. I can run your
distributed binary but it crashes too often on
this machine, so I would like to try a native build.

When I run ./configure, I get a message about gmp
not being installed.

checking for __gmpf_init in -lgmp... no
configure: error: compulsory library gmp not found

I have installed libgmp-dev, libgmp10, libgmp3-dev,
guile 1.8. There is another libgmpv4 package but
when I attempt to install it, the package manager
(synaptic) tells me it's going to uninstall guile 1.8.
Apparently libgmp10 is really gmp 6.x and I can't
remove it without breaking stuff.

Do you have any insight into this problem?

Daniel Bump
Marduk Bolaños
2017-09-12 07:42:29 UTC
Permalink
I just built TeXmacs on Ubuntu 16.04.

You are right. TeXmacs 1.99.5 segfaults when closing any dialog
window. And I got the same problem as you when trying to compile it.

What I did is compile the svn version. It works great.

You may need to install Qt4

sudo apt install libqt4-dev

sudo apt install subversion

svn co svn://svn.savannah.gnu.org/texmacs/trunk/src $HOME/Downloads/TeXmacs-svn

cd $HOME/Downloads/TeXmacs-svn

./configure

make


Then I created a symlink for the TeXmacs directory

ln -s `realpath TeXmacs` $HOME/bin/TeXmacs

That way you can update the source, recompile and keep working.


I created the following launcher script in $HOME/bin (do not forget to
chmod +x it)

texmacs-launcher

#!/usr/bin/env bash

export TEXMACS_PATH=$HOME/bin/TeXmacs
export PATH=$TEXMACS_PATH/bin:$PATH

$TEXMACS_PATH/bin/texmacs


And I created an XDG launcher in $HOME/.local/share/applications/

texmacs.desktop

[Desktop Entry]
Name=TeXmacs
Exec=/home/marduk/bin/texmacs-launcher
Icon=/home/marduk/bin/TeXmacs/misc/images/TeXmacs.png
Terminal=false
Type=Application


Enjoy!
Daniel Bump
2017-09-13 19:01:47 UTC
Permalink
Post by Marduk Bolaños
I just built TeXmacs on Ubuntu 16.04.
You are right. TeXmacs 1.99.5 segfaults when closing any dialog
window. And I got the same problem as you when trying to compile it.
It would be good if texmacs.org can distribute a binary
that doesn't crash on Ubuntu 16.04, and if the distributed
source would build off the tarball. The problem seems to be
with the gmp library.
Post by Marduk Bolaños
What I did is compile the svn version. It works great.
Thanks! Per your advice I was able to compile the svn version.
Post by Marduk Bolaños
If you do not want to build yourself, you can get a texmacs deb package
Thanks!

I did not try this since I was able to build it.

Daniel Bump
Denis RAUX
2017-09-13 19:22:16 UTC
Permalink
Hello,
yesterday I built a TeXmacs version on an Ubuntu17 system. I shortly
tried it on a 16 and it seems work.

here it is
ftp://ftp.texmacs.org/TeXmacs/tmftp/generic/TeXmacs-1.99.5-10813-i386-pc-linux-gnu-B.tar.gz

If you try it, please let me know how it works.

I also prepare a 'SDK' to make the TeXmacs build easier by providing all
the missing libraries and compile them in an automatic way in order to
have a friendly building environment.

I wish to distribute it soon.

Thanks,

Denis Raux
Post by Daniel Bump
Post by Marduk Bolaños
I just built TeXmacs on Ubuntu 16.04.
You are right. TeXmacs 1.99.5 segfaults when closing any dialog
window. And I got the same problem as you when trying to compile it.
It would be good if texmacs.org can distribute a binary
that doesn't crash on Ubuntu 16.04, and if the distributed
source would build off the tarball. The problem seems to be
with the gmp library.
Post by Marduk Bolaños
What I did is compile the svn version. It works great.
Thanks! Per your advice I was able to compile the svn version.
Post by Marduk Bolaños
If you do not want to build yourself, you can get a texmacs deb package
Thanks!
I did not try this since I was able to build it.
Daniel Bump
_______________________________________________
Texmacs-dev mailing list
https://lists.gnu.org/mailman/listinfo/texmacs-dev
Loading...