Home Download Buy Blog Forum Support

How to get the region of a particular scope?

How to get the region of a particular scope?

Postby hsu on Thu Feb 28, 2013 12:50 pm

Hi folks,

suppose I use scope_name at the current point to find out if I'm inside some interesting scope. If positive, then I'd like to get the region for that particular scope, which isn't the one that extract_scope returns, but an outer one. How to get that region? I can only imagine move the point to out from the current scope and run extract_scope again.

Ideally it seems that the API for extract_scope could receive an additional argument:

extract_scope(point, <scope>)

TIA!
hsu
 
Posts: 25
Joined: Fri Feb 01, 2013 4:14 pm

Re: How to get the region of a particular scope?

Postby hsu on Thu Feb 28, 2013 10:18 pm

More specifically, I want to find the region of a Latex table.
hsu
 
Posts: 25
Joined: Fri Feb 01, 2013 4:14 pm

Re: How to get the region of a particular scope?

Postby hsuh on Sun Mar 03, 2013 3:00 pm

I ended up just going backward by line until I was out of the scope, and then same thing forward for finding the end. (A hack).
hsuh
 
Posts: 9
Joined: Fri Nov 16, 2012 12:40 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 10 guests