Re: Search for Environment?

2009-03-31 Thread Abdelrazak Younes

rgheck wrote:

Abdelrazak Younes wrote:

Steve Litt wrote:

Hi all,

For years, Microsoft Word has had something that would be cool in 
LyX --- search for environment (or charstyle). I just found myself 
wondering if I had redundant copies of a story in my book, and so 
wanted to search for all text in Story environment, but there's no 
way to do it as far as I can tell.


It is very easy to extend the Navigator/Outliner to list the 
different character styles available in the document. I was actually 
thinking about implementing this before I became a very busy man :-)
Just put an enhancement entry in bugzilla/trac when it's open again 
and hopefully someone (you?) will implement it for next release.


I found myself wanting something like this the other day. Can you give 
me a quick outline of how to do it, Abdel? What I'm not sure about is 
where the method would go. Where is the one for sections?


Charstyle are insets so that's easy, just copy and paste what is done 
for other insets (updateLabels() and addToToc()).
Concerning environment, you have to read TocBackend.cpp and 
InsetText::addToToc().


Abdel.



Re: Search for Environment?

2009-03-31 Thread rgheck

Abdelrazak Younes wrote:

Steve Litt wrote:

Hi all,

For years, Microsoft Word has had something that would be cool in LyX 
--- search for environment (or charstyle). I just found myself 
wondering if I had redundant copies of a story in my book, and so 
wanted to search for all text in Story environment, but there's no 
way to do it as far as I can tell.


It is very easy to extend the Navigator/Outliner to list the different 
character styles available in the document. I was actually thinking 
about implementing this before I became a very busy man :-)
Just put an enhancement entry in bugzilla/trac when it's open again 
and hopefully someone (you?) will implement it for next release.


I found myself wanting something like this the other day. Can you give 
me a quick outline of how to do it, Abdel? What I'm not sure about is 
where the method would go. Where is the one for sections?


rh



Re: Search for Environment?

2009-03-31 Thread Guenter Milde
On 2009-03-31, Steve Litt wrote:
> On Tuesday 31 March 2009 02:45:54 am Guenter Milde wrote:

>:-) Yes, that's what I do now, but then you need to find the corresponding 
> text in LyX, so you search first with grep or Vim, and then you search again 
> in LyX.

Actually, I do the grep in my text editor and then jump to the line in the
text editor as well (fine with simple text, not so nice with "rich" text or
equations).

I am still waiting for a lfun that allows opening a lyx file and place
the cursor to the (at least approximate) position of a given line.

Unfortunately, "server-goto-file-row" does not do this (instead it goes
to the place indicated by the row in the exported latex source file).

Günter



Re: Search for Environment?

2009-03-31 Thread Steve Litt
On Tuesday 31 March 2009 02:45:54 am Guenter Milde wrote:
> On 2009-03-30, Steve Litt wrote:
> > For years, Microsoft Word has had something that would be cool in LyX
> > --- search for environment (or charstyle). I just found myself
> > wondering if I had redundant copies of a story in my book, and so
> > wanted to search for all text in Story environment, but there's no way
> > to do it as far as I can tell.
>
> You can use the grep command on the source file to find all Story
> environments and you can use Search in a text editor on the source file
> to go to the places.
>
> Not nice but practical.
>
> GÃŧnter

:-) Yes, that's what I do now, but then you need to find the corresponding 
text in LyX, so you search first with grep or Vim, and then you search again 
in LyX.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: Search for Environment?

2009-03-31 Thread Abdelrazak Younes

Steve Litt wrote:

Hi all,

For years, Microsoft Word has had something that would be cool in LyX --- 
search for environment (or charstyle). I just found myself wondering if I had 
redundant copies of a story in my book, and so wanted to search for all text 
in Story environment, but there's no way to do it as far as I can tell.


It is very easy to extend the Navigator/Outliner to list the different 
character styles available in the document. I was actually thinking 
about implementing this before I became a very busy man :-)
Just put an enhancement entry in bugzilla/trac when it's open again and 
hopefully someone (you?) will implement it for next release.


Abdel.



Re: Search for Environment?

2009-03-30 Thread Guenter Milde
On 2009-03-30, Steve Litt wrote:

> For years, Microsoft Word has had something that would be cool in LyX
> --- search for environment (or charstyle). I just found myself
> wondering if I had redundant copies of a story in my book, and so
> wanted to search for all text in Story environment, but there's no way
> to do it as far as I can tell.

You can use the grep command on the source file to find all Story
environments and you can use Search in a text editor on the source file
to go to the places.

Not nice but practical.

Günter



Re: Search for Environment?

2009-03-30 Thread Florian Rubach

Steve Litt schrieb:

Hi all,

For years, Microsoft Word has had something that would be cool in LyX --- 
search for environment (or charstyle). I just found myself wondering if I had 
redundant copies of a story in my book, and so wanted to search for all text 
in Story environment, but there's no way to do it as far as I can tell.


SteveT


Hi Steve,
I think what you are looking for is implemented by the LyX 
2.0-Advanced-Search-Feature by Tommaso Cucinotta, as you can see here: 
http://www.youtube.com/watch?v=0MR_O1ctIAY

Is that it?

Regards,
Florian


Search for Environment?

2009-03-30 Thread Steve Litt
Hi all,

For years, Microsoft Word has had something that would be cool in LyX --- 
search for environment (or charstyle). I just found myself wondering if I had 
redundant copies of a story in my book, and so wanted to search for all text 
in Story environment, but there's no way to do it as far as I can tell.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: We could really use search-for-environment and search-for-charstyle

2008-07-24 Thread Pavel Sanda
> On Wednesday 23 July 2008 19:16:49 Steve Litt wrote:
> > Hi all,
> >
> > One feature I think would be really helpful in LyX would be
> > search-for-environment and search-for-character-style. That way I wouldn't
> > need to go into Vim every time I wanted to locate a specific character
> > style.
> >
> > Thanks
> >
> > SteeveT
> 
> I am not sure we have this in bigzilla but I agree it would be nice to have 
> both in LyX and in bugzilla (if it is not there yet).
> 
> Something that I had the need to recently was to find where a given 
> bibliographic citation was used. Again another search issue.

this debate is somehow connected with this thread 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg141358.html

then some general lfun for search would be easy.
pavel


Re: We could really use search-for-environment and search-for-charstyle

2008-07-24 Thread Charles de Miramon
Abdelrazak Younes wrote:

> 
> As for character style naigation, we could have something similar in
> 1.6.x.

I was wondering yesterday if this could be used :

http://doc.trolltech.com/4.4/qtxmlpatterns.html

It works on non-xml data and you can mash-up in one structure the LyX format
and the external sources for example the bib fields or files inserted.

Cheers,
Charles
-- 
http://www.kde-france.org



Re: We could really use search-for-environment and search-for-charstyle

2008-07-24 Thread Christian Ridderström

On Wed, 23 Jul 2008, Steve Litt wrote:

One feature I think would be really helpful in LyX would be 
search-for-environment and search-for-character-style. That way I 
wouldn't need to go into Vim every time I wanted to locate a specific 
character style.


Hi Steve,

You should send this to the developers' list, as I suspect you know:-)
(Or add it to bugzilla of course)

Hope the word->LyX conversion is going well,
Christian

--
Christian Ridderström, +46-8-768 39 44http://www.md.kth.se/~chr

Re: We could really use search-for-environment and search-for-charstyle

2008-07-24 Thread Abdelrazak Younes

José Matos wrote:

On Wednesday 23 July 2008 19:16:49 Steve Litt wrote:

Hi all,

One feature I think would be really helpful in LyX would be
search-for-environment and search-for-character-style. That way I wouldn't
need to go into Vim every time I wanted to locate a specific character
style.

Thanks

SteeveT


I am not sure we have this in bigzilla but I agree it would be nice to have
both in LyX and in bugzilla (if it is not there yet).

Something that I had the need to recently was to find where a given
bibliographic citation was used. Again another search issue.


He he, in 1.6 you can use the navigator, there is a list of citation 
there in case you didn't notice :-)


As for character style naigation, we could have something similar in 1.6.x.

Abdel.



Re: We could really use search-for-environment and search-for-charstyle

2008-07-24 Thread José Matos
On Wednesday 23 July 2008 19:16:49 Steve Litt wrote:
> Hi all,
>
> One feature I think would be really helpful in LyX would be
> search-for-environment and search-for-character-style. That way I wouldn't
> need to go into Vim every time I wanted to locate a specific character
> style.
>
> Thanks
>
> SteeveT

I am not sure we have this in bigzilla but I agree it would be nice to have 
both in LyX and in bugzilla (if it is not there yet).

Something that I had the need to recently was to find where a given 
bibliographic citation was used. Again another search issue.

> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US

-- 
José Abílio


We could really use search-for-environment and search-for-charstyle

2008-07-23 Thread Steve Litt
Hi all,

One feature I think would be really helpful in LyX would be 
search-for-environment and search-for-character-style. That way I wouldn't 
need to go into Vim every time I wanted to locate a specific character style.

Thanks

SteeveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US