Re: [gedit-list] Issues with SyncTeX plugin



Pieter,

any chance you could file a bug report about this so we do not forget?

Cheers.

On Thu, Nov 6, 2014 at 5:10 PM, Ignacio Casal Quinteiro <nacho resa gmail com> wrote:
Pieter,

thanks a lot for the deep look on this it is very appreciated.
We will look at it and try to get it fixed.

On Thu, Nov 6, 2014 at 5:04 PM, <pieter redpanda nl> wrote:
No other errors. Just had a good look at synctex.py, the issue is that
when a file is opened, self._doc.get_language() returns None. Therefore,
self.active is set to False, resulting in the plugin not being activated.

No clue as to why self._doc.get_language() returns None — the language is
detected correctly by gedit, because the right syntax highlighting is used
after opening a LaTeX file. Also, when the plugin is un-checked and
re-checked again, get_language() behaves as it should. I checked and
self._doc.get_file().get_location().get_uri() returns the correct file.
Inspired by that, I applied a temporary fix. The idea is to replace

lang is not None and lang.get_id() == 'latex'

by

self._doc.get_file().get_location().get_uri()[-4:] == '.tex'

which works, but it's not the ultimate solution.

Cheers,
Pieter

> any other error on the terminal?
> any chance you can stick some prints on the code and check where it fails
>
> On Wed, Nov 5, 2014 at 2:44 PM, <pieter redpanda nl> wrote:
>
>> Hi Ignacio,
>>
>> I just replaced my synctex.py with the updated one from GitHub. Well,
>> the
>> TypeError seems to be gone now, but for every file I open I still have
>> to
>> un-check and re-check the SyncTeX plugin before I can use it. In some
>> more
>> detail,
>>
>> 1.) Open gedit from the terminal
>> 2.) Open some LaTeX file (.tex) in gedit
>> 3.) Try Ctrl + Click on a word, nothing happens. In addition, the
>> "Forward
>> Search" option in the Tools menu is greyed out
>> 4.) Go to the Preferences -> Plugins dialog and un-check the SyncTeX
>> plugin. Then, re-check it. In other words, disable the plugin and then
>> enable it again
>> 5.) Now the Ctrl + Click works fine, the corresponding part in Evince is
>> highlighted. Also works the other way, Ctrl + Clicking something in
>> Evince
>> highlights the right part in gedit. In addition, the "Forward Search"
>> option is available again (i.e. not greyed out anymore)
>>
>> Now, if I open another (second) file in a new tab in gedit, Ctrl + Click
>> doesn't work for that file (but it *does* still work for the first file
>> I
>> opened). Disabling/Enabling the plugin does the trick, now I can use
>> Ctrl
>> + Click for both the first and second file. After closing gedit and
>> opening it again, I have to go through the same steps to get it working
>> again.
>>
>> In short, it seems like the SyncTeX plugin isn't called/activated when a
>> new file is opened. Any ideas? I'd be happy to run some more tests or
>> checks.
>>
>> Cheers,
>> Pieter
>>
>> > Just fixed this on master and you'll get it in the next patch release
>> >
>> > Cheers
>> >
>> > On Tue, Nov 4, 2014 at 4:58 PM, Ignacio Casal Quinteiro <
>> > nacho resa gmail com> wrote:
>> >
>> >>
>> >> TypeError: on_saved_or_loaded() missing 1 required positional
>> argument:
>> >> 'data'
>> >>
>> >> this seems like the issue. I'll try to have a look at it today or
>> >> tomorrow.
>> >>
>> >> On Tue, Nov 4, 2014 at 3:54 PM, <pieter redpanda nl> wrote:
>> >>
>> >>> Well, I do get the following message when I open a file:
>> >>>
>> >>> TypeError: on_saved_or_loaded() missing 1 required positional
>> argument:
>> >>> 'data'
>> >>>
>> >>> Apart from that, I just get some warnings when the Preferences ->
>> >>> Plugins
>> >>> dialog is displayed (where I can un-check and then re-check the
>> SyncTeX
>> >>> plugin in order to make it work again):
>> >>>
>> >>> sys:1: Warning: The property GtkButton:xalign is deprecated and
>> >>> shouldn't
>> >>> be used anymore. It will be removed in a future version.
>> >>> sys:1: Warning: The property GtkAlignment:left-padding is deprecated
>> >>> and
>> >>> shouldn't be used anymore. It will be removed in a future version.
>> >>>
>> >>> Thanks,
>> >>> Pieter
>> >>>
>> >>> > Hi Pieter,
>> >>> >
>> >>> > do you get any error when you run gedit from a terminal?
>> >>> >
>> >>> > Cheers.
>> >>> >
>> >>> > On Tue, Nov 4, 2014 at 3:25 PM, <pieter redpanda nl> wrote:
>> >>> >
>> >>> >> Hi all,
>> >>> >>
>> >>> >> The SyncTeX plugin only seems to work when manually
>> adding/checking
>> >>> it
>> >>> >> in
>> >>> >> the preferences dialog. After closing gedit and restarting it,
>> the
>> >>> >> plugin
>> >>> >> is still checked, but it doesn't do anything (and the "Forward
>> >>> Search"
>> >>> >> option is greyed out). How do I fix this? I'm using gedit 3.14 on
>> a
>> >>> >> 64bit
>> >>> >> Arch Linux system.
>> >>> >>
>> >>> >> Cheers,
>> >>> >> Pieter
>> >>> >> _______________________________________________
>> >>> >> gedit-list mailing list
>> >>> >> gedit-list gnome org
>> >>> >> https://mail.gnome.org/mailman/listinfo/gedit-list
>> >>> >>
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Ignacio Casal Quinteiro
>> >>> >
>> >>>
>> >>> _______________________________________________
>> >>> gedit-list mailing list
>> >>> gedit-list gnome org
>> >>> https://mail.gnome.org/mailman/listinfo/gedit-list
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Ignacio Casal Quinteiro
>> >>
>> >
>> >
>> >
>> > --
>> > Ignacio Casal Quinteiro
>> >
>>
>> _______________________________________________
>> gedit-list mailing list
>> gedit-list gnome org
>> https://mail.gnome.org/mailman/listinfo/gedit-list
>>
>
>
>
> --
> Ignacio Casal Quinteiro
>

_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list



--
Ignacio Casal Quinteiro



--
Ignacio Casal Quinteiro


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]