On 8.03.08, Pavel Sanda wrote: > > I wonder, whether there is a lyx function that can be used to place the > > cursor in the relevant line.
> one possibility would be use paragraph-goto but it will be quite tricky > to get the right number of paragraph. not every indexing number here has its > own counter part in visible document etc... Is there some documentation for paragraph-goto? What argument does it expect (integer number, I suppose). How is a "paragraph" defined in the lyx-source? Is it possible to parse it to find out (e.g. by counting the blank lines before the line-in-question? > > (There is a function called "server-goto-file-row", however, I did > > not find out what exactly it is supposed to do or what arguments it > > expects.) > purpose of this function is to set the cursor based on the given TeX > source row. This means the LyX-readable tex source in the tmp dir, not a source generated with File>Export, right? What arguments does this function expcect? Something like server-goto-file-row /tmp/lyx_tmpdir3193YwEozQ/lyx_tmpbuf0/test.tex 320 ? > so other possibility would be to do your grep over > generated tex file and pass the result via this function. The problem is, that I want to do a) fast opening of lyx files on the (or near the) interesting point from a list of grep-results, as well as b) grep-and-replace on the source file as powerful replacement for the missing regular-expression search and search-and-replace-in-math features. For a), relying on temporary latex files in an unknown location is not an option. For b), using the tex source might work after actualisation of the PS|DVI|PDF view if the lyx->tex->lyx conversion cycle is lossless and save for production use. However, I learned that the tmp-tex files are not meant for human use :-( So it looks like paragraph-goto is the way to go (until we get a row-goto lfun alongside it). Thanks Guenter