texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Help with traverse-next with zcite, tag with inaccessi


From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] Help with traverse-next with zcite, tag with inaccessible content.
Date: Mon, 25 Jul 2016 11:05:04 +0200

An update,
 I tried to produce a simple test case, with a macro with the same drd-props as yours and it seems to me I can navigate properly. Do you manage to isolate a misbehaving example?

I attach my test file.

Max


Attachment: tag-navigation-test.tm
Description: Binary data



On 25 Jul 2016, at 10:52, Massimiliano Gubinelli <address@hidden> wrote:

Dear Karl,
 
 I’m not able to say if the patch is correct but I would suggest you to try to produce a simple test-case where the bug can be analysed more easily without requiring to install you integration plugin. For example, a style file with a unique tag with the buggy properties. This could help Joris to find out the problem and if your proposed solution is correct. If you have time you would also like to file a bug report, so that we can track all these glitches in a centralised way.

Best
Max



On 23 Jul 2016, at 22:37, Karl Hegbloom <address@hidden> wrote:

The attached patch fixes the problem, but I don't know what else it will affect, and so I'm not absolutely certain it's the right solution.

Joris?

On Sat, Jul 23, 2016 at 2:14 PM Karl Hegbloom <address@hidden> wrote:
In my Zotero TeXmacs integration:

    https://github.com/KarlHegbloom/zotero-texmacs-integration

... the zcite tags content is inaccessible unless you deactivate the tag. I don't want to change that, and don't know how... When the cursor is to the left of the tag, and I press the right-arrow, the cursor jumps to the right end of the tag, and then the tag is highlighted with the light-blue box. So far so good, because now I can use Backspace to deactivate it, or Tab to call the editCitation function...

The problem is that when I push Ctrl-PageDown or use the toolbar icon to call traverse-next, TeXmacs bombs with an invalid cursor error. It's also broken whenever there are zcite tags in the document even when trying to traverse between other kinds of tags. In a document with nothing in it but a number of \strong{strong content} tags in it, I can traverse-next and traverse-previous with no problem. But when I insert any zcite tags between those, I can not traverse-next, but I can traverse-previous. I noticed that with the \strong{} tags, it leaves the cursor at the start of the tag's content when I traverse-next, and at the end of the content when I traverse-previous.

So for the zcite, where the content is inaccessible, the traverse-previous, which leaves the cursor in a valid location, works fine, but the traverse-next is broken, because it produces an invalid cursor location.

I tried to overload traverse-next for the (:require (in-zcite?)) context... and have given up. It doesn't work. I think that the problem is at a lower level, in the C++ that I don't fully understand yet, and that what it needs is a check for when the cursor would be invalid, and to have it move it to a valid position instead of throwing the error. I don't know how to do that.

Karl Hegbloom

<texmacs-src-src-Data-Tree-tree_traverse_fix-move-node.diff>_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]