Replies: 4 comments 2 replies
-
I exeprimented some time ago with the same configuration as you are using
right now on a very old netbook.
I'm a bit overwhelmed by work, but I could help you once I get back ro
normal.
I remember using epdfviewer and everything worked +/- flawlessly and with
little or no Python code involved. If you have a sec, explore that path,
pls. Look at my github https://github.com/paaguti for inspiration
Best, /PA
…On Wed, 27 Jan 2021 at 20:56, lsoksane ***@***.***> wrote:
I have experimented a bit with SyncTeX between Textadept and Xreader from
Linux Mint. The idea of SyncTeX is that you can jump from the TeX source
code to the associated position in the pdf (forward search) and vice versa
(backward search). Xreader has a D-Bus interface for this purpose, and I
wrote two hackish Python scripts for the D-Bus communication.
I want textadept.run.run to do the following for a LaTeX buffer
1. Compile with the option synctex=1
2. Switch from the message buffer to the LaTeX buffer
3. Do forward search to sync with the pdf viewer
4. Start a Python server for backward search if needed
The code in textadept-synctex
<https://github.com/lsoksane/textadept-synctex> does this, except that
instead of step 2 it simply closes the message buffer. The solution is far
from ideal in many ways, but my main concern at the moment is that step 4
creates zombie processes. The server script exits immediately if there is
already a server running, and the problem seems to be that os.spawn does
not recognize that this child process is finished and should be terminated.
This is what is see on Ubuntu 18.04
$ ps -ae | grep python
11690 pts/1 00:00:00 python
13001 ? 00:00:00 python <defunct>
with new defunct process created at each textadept.run.run after the first
one. The zombies are killed when Textadept is closed. Also my other
os.spawn calls create zombies unless I call wait() on the process, but
wait() is not an option for the server process. Am I doing something wrong
(apart from trying to pull off an ugly hack)?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#46>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZKU4HB4E3CVQSLIW4XZZLS4BVX3ANCNFSM4WV27DYQ>
.
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I managed to solve the issue by forking the actual server startup (see the code in the linked repo). Then I can always call wait after os.spawn. I would still like to solve the minor issue with step 2, i.e. switching away from the message buffer rather than closing it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Normally you should be able to do so via `textadept.history.back()`[1], but this was buggy. I've pushed a fix[2] that will show up in tonight's nightly build.
If you don't want to use history, you can try storing the LaTeX buffer somewhere and then use `view:goto_buffer()`[3].
[1]: https://orbitalquark.github.io/textadept/api.html#textadept.history.back
[2]: 639c415
[3]: https://orbitalquark.github.io/textadept/api.html#view.goto_buffer
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi
In an ideal world, I would have time to port it to GTK3.
I try to compile it with every new Ubuntu and adapt it. Any mod will appear
in my github. I don't know if that qualifies as 'maintenance' :-)
Best, /PA
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have experimented a bit with SyncTeX between Textadept and Xreader from Linux Mint. The idea of SyncTeX is that you can jump from the TeX source code to the associated position in the pdf (forward search) and vice versa (backward search). Xreader has a D-Bus interface for this purpose, and I wrote two hackish Python scripts for the D-Bus communication.
I want textadept.run.run to do the following for a LaTeX buffer
The code in textadept-synctex does this, except that instead of step 2 it simply closes the message buffer. The solution is far from ideal in many ways, but my main concern at the moment is that step 4 creates zombie processes. The server script exits immediately if there is already a server running, and the problem seems to be that os.spawn does not recognize that this child process is finished and should be terminated. This is what is see on Ubuntu 18.04
with new defunct process created at each textadept.run.run after the first one. The zombies are killed when Textadept is closed. Also my other os.spawn calls create zombies unless I call wait() on the process, but wait() is not an option for the server process. Am I doing something wrong (apart from trying to pull off an ugly hack)?
Beta Was this translation helpful? Give feedback.
All reactions