SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => SlickEdit User Macros => Topic started by: ehab on April 03, 2010, 04:25:59 pm

Title: Select or close non workspace buffer(s)
Post by: ehab on April 03, 2010, 04:25:59 pm
oky,

I have been cooking a macro to help me quickly select and close files that are not related to current workspace.

It happens often i end up with several files open and must manually close each one or must close all and try to open what is important again, but this macro will help do it neatly.

This macro was not possible without the help of the wizard <Graeme> which i owe a lot of gratitude.

any updates are welcome.

This example is a good starter for dialog example handling.
Title: Re: select or close non workspace buffer
Post by: Graeme on April 03, 2010, 11:01:18 pm
Hi ehab

In close_buffers_nonworkspace, cycling round the buffer ring probably won't work because the call to _save_non_active modifies the buffer ring unpredictably.  You should probably use the for_each_buffer mechanism and make a list of the files you want to close.

Graeme
Title: Re: Select or close non workspace buffer(s)
Post by: ehab on April 06, 2010, 11:37:24 am
updated and should be working.