Le 20/07/2012 10:45, Jean-Marc Lasgouttes a écrit :
You are right that buffer-forall doesn't do anything useful by
default. However, when you create a new window the buffers in the
previous window are available as hidden buffers in the new window.

The problem is that the LFUN is mixing real hidden buffers (visible
nowhere) with the ones that are visible in some other window. I think
these two things are very different from a user point of view.

Conclusion: you should not ask only the current view for visibleness
(?), but all views.

I have pushed the patch to master now. Thanks for te patch (and for going through all the iterations).

I pushed the patch now because I will go in vacation this evening and did not want to let it in a limbo, but I think you should think again about multiple views.

* the default should be "all buffers visible in a view"

* It may be better to force the use of the first argument, because as it is this argument is not well defined. You could use * for all buffers, as in inset-forall

* if the action closes the only open buffer of the lyxview, does it crash?

* if you want to handle multiple view, I suspect that the logic of you main loop will have to change. An alternative would be to invoke BufferView::dispatch or even Buffer::dispatch, but this is restrictive.

JMarc

Reply via email to