texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] operation on the selection


From: david
Subject: Re: [Texmacs-dev] operation on the selection
Date: Sun, 23 Mar 2003 15:48:40 +0100
User-agent: Mutt/1.5.3i

On Fri, Mar 21, 2003 at 02:43:43PM -0700, Nix N. Nix wrote:
> On Fri, 2003-03-21 at 04:34, address@hidden wrote:
> 
> > Generally, it would be nice to have simple and efficient mechanisms to
> > operate on the selection from Scheme. I can think of three approaches,
> > each useful for a different purpose:
> 
> I agree.  Before I decided to use cut and paste, I was looking through
> the Scheme code for a (get-selection) (kill-selection)
> (insert-selection) combo, but couldn't find one.  Kill selection is
> already there in the form of Edit -> Clear (although it doesn't work). 

Actually, there is lot of confusion in TeXmacs between selections and
clipboards.

Edit->Clear just clears the primary clipboard... I know that is
useless, but at least one other person believes that is fine.

It should not be too difficult to add a couple of glue accessors
"selection-start" and "selection-end" to get the paths of the bounds
of the current selection.


> I don't know whether we have a way of inserting a tree at the current
> position, a tree such as the one that would be produced by an equally
> unavailable function, such as (get-selection).

I did not check about get-selection (not to be understood as
get-clipboard). Structural insertion can be done with fundamental tree
operators (tm-assign, tm-remove, tm-insert, tm-join, tm-split,
tm-ins-unary, tm-rem-unary). Beware though, that these procedures make
no kind of sanity check whatsoever.


> Also, for some reason, in the (make-brackets) code, I tried using
> (cursor-left) in order for the cursor to end up in between the left and
> right brackets at the end of the execution of the function.  That didn't
> work, for some reason.

Visual motion commands are disable between any modification to the
document tree and the refreshing of the box tree, which is done in the
main event loop. However, you can still use structural motion commands
(tm-go-to).

                                                            -- DDAA




reply via email to

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