[Top][All Lists]

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

Re: [Texmacs-dev] BUG: searching and functions

From: Leo
Subject: Re: [Texmacs-dev] BUG: searching and functions
Date: Fri, 9 May 2003 22:05:01 -0400
User-agent: KMail/1.4.3

On Friday May 09 2003 18:16, Joris van der Hoeven wrote:
> > Hi developers,
> >
> > TeXmacs-1.0.1 search algorithm (invoked by C-s) skips over the portions
> > of the text coming from the functions.
> >
> > Here is a smiple but illustrative example:
> >
> >   <assign|foo|<func|text|<value|text>>>
> >
> >   <apply|foo|hello world!>
> >
> >
> > Now try to search for 'world':  C-s world
> > The search fails even though "hello world" is displayed on the screen.
> > It looks as though the text strings returned from the functions
> > are not visited by the search algorithm.
> >
> > Is it a bug or feature??
> Yes, that is normal, because functions are really scripts.
> When you compute 1+1 --> 2 and search 1, you don't expect
> to find "1" inside "2".

I think you misunderstood what I mean. I am searching for "2" 
(not for "1") and TeXmacs-1.0.1 completely ignores all instances of
"2" if they are returned from functions!!

>From the user prespective, all displayed text should be searchable no
matter whether a string comes from literal text directly, from
macros or from functions. BTW, text stings returned by *macros* are
perfectly searchable in TeXmacs-1.0.1. It is only functions that have a

Probably I have to explain what I am doing. I wrote few scheme
functions and a *.ts style file to cross link pdf, ps, ps.gz, ps.bz2,
etc. files from any TeXmacs document. The user visible function
'link2' takes two arguments: the link-location and the
link-text. Something like

<link2|Files/radarmath.pdf|Bill Moran "Mathematics of Radar">

The second argument is displayed in blue color, while the first is
hidden. It is used by "action" primitive to open the link in an
external viewer.  Recently, I realised that searching (C-s) ignores
the link-text which, in my case, skips through authors and titles of
my bibliography texmacs file rendering it virtually useless. I tried
to redefine link2 as a macro. The link-text becomes searchable, but
macro with a hidden first argument gives me terrible headache each
time I want to edit link-location.

As I said earlier, a user would expect to search through all the text
he/she sees on the screen. The text returned by functions is visually
indistinguishable from the text entered directly.


reply via email to

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