texmacs-dev
[Top][All Lists]
Advanced

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

[Texmacs-dev] Questions about drd-props.


From: Karl Hegbloom
Subject: [Texmacs-dev] Questions about drd-props.
Date: Sat, 25 Feb 2017 20:52:33 +0000

In my package, there is a tag structure that looks sort of like this (using LaTeX like syntax rather than TeXmacs):

 \zcite{zfieldID}{zfield-Data-v}{zfield-Text-t}

where the zfield-Text-t is like:

\zciteLayoutPrefix{...}\zsubCite{...}\zciteLayoutDelimiter{...}...\zciteLayoutSuffix{...}

When the cursor is just to the right of the zcite, it is highlit by a cyan box. Pressing the left arrow key causes the cursor to jump all the way over the zcite. When the cursor is just to the right of the zcite and I press Backspace, it disactivates the tag and then I can move the cursor inside of it. While I am inside of the disactivated zcite, the cursor moves in and out of the zciteLayoutPrefix, zciteLayoutDelimiter, and zciteLayoutSuffix tags.

The desired behavior is that I want to be able to cursor inside of the zcite's zfield-Text-t, but I don't want to be able to cursor inside of the zciteLayoutPrefix, zciteLayoutDelimiter, zciteLayoutSuffix, or zsubCite tags, and of those, only the zsubCite tag can usefully support being disactivated or changing mode to allow the cursor to move inside of it's contents.

I actually like the way the cursor jumps across the zcite, leaving it as a whole thing in itself... but I am implementing cutting and pasting of zsubCite's that occur within the zcite, since a zcite field contains a citeproc citation cluster that can have more than one source cited... So if I could add another flag to the zfield-Data-v that is to hold the "drd" state of the zfield... and have it support more than one "mode": (1) Normal, where the cursor jumps across it, (2) cursor can move inside of the zfield-Text-t, but the zcite is not disactivated, (3) zcite is disactivated.

In state (2), I want the cursor to jump over zsubCite's and the other elements, which are the CSL style's citation layout prefix, delimiter, and suffix strings wrapped in tags to give them handles and semantics. In state (2), I ought to be able to use Ctrl-Space to set the mark, then arrows to select zsubCite's. It does that now, and does select entire blocks, but not as neatly, plus...

When in state (2), I want to move the cursor inside of the zfield-Text-t, but have it's movement constrained to points between the zciteLayoutPrefix, zsubCite, zciteLayoutDelimiter, or zciteLayoutSuffix, while the user chooses a location at which to perform a clipboard-paste of zsubCite's taken via clipboard-cut from another zcite field.

The constrained movement could be implemented via keyboard command overloads that respect the context the way I need... but what about drd-props to allow moving the cursor inside of the zcite, without needing to disactivate it first?

Can a scheme program alter drd-props on-the-fly?

I'm having trouble even getting changes to drd-props that I put into the tm-zotero.ts to have any effect at all. From my understanding, it ought to already be allowing the cursor to move inside of the zcite, but it does not. What's the secret to it? I've seen TeXmacs dump a C++ stack trace, and then after that, I could move the cursor inside of the zcite! What changed that allowed that? Can it be set up deliberately without an accidental segv?

reply via email to

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