Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-15 Thread Scott Kostyshak
On Fri, Oct 12, 2012 at 8:54 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 11/10/2012 12:51, Scott Kostyshak a écrit : Any comments on this? Sorry Scott, I thought it was in already. I think this patch is fine. It's in. Thanks a lot for all of your help on this, JMarc. You could

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-15 Thread Jean-Marc Lasgouttes
Le 15/10/2012 16:15, Scott Kostyshak a écrit : Thanks a lot for all of your help on this, JMarc. You could have implemented this yourself in a matter of minutes but instead you spent hours helping me stumble along and learn. Well, this was in a part of code I care about, so it felt normal to

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-15 Thread Scott Kostyshak
On Fri, Oct 12, 2012 at 8:54 AM, Jean-Marc Lasgouttes wrote: > Le 11/10/2012 12:51, Scott Kostyshak a écrit : >> >> Any comments on this? > > > > Sorry Scott, I thought it was in already. I think this patch is fine. It's in. Thanks a lot for all of your help on this, JMarc.

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-15 Thread Jean-Marc Lasgouttes
Le 15/10/2012 16:15, Scott Kostyshak a écrit : Thanks a lot for all of your help on this, JMarc. You could have implemented this yourself in a matter of minutes but instead you spent hours helping me stumble along and learn. Well, this was in a part of code I care about, so it felt normal to

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-12 Thread Jean-Marc Lasgouttes
Le 11/10/2012 12:51, Scott Kostyshak a écrit : Any comments on this? Sorry Scott, I thought it was in already. I think this patch is fine. JMarc

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-12 Thread Jean-Marc Lasgouttes
Le 11/10/2012 12:51, Scott Kostyshak a écrit : Any comments on this? Sorry Scott, I thought it was in already. I think this patch is fine. JMarc

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-11 Thread Scott Kostyshak
On Mon, Aug 27, 2012 at 12:09 PM, Scott Kostyshak skost...@princeton.edu wrote: From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, August 23, 2012 9:15 AM Then I propose to simplify things a lot by only dispatching to visible buffers (for now). No more special parameter. The

Re: [PATCH] LFUN_BUFFER_FORALL

2012-10-11 Thread Scott Kostyshak
On Mon, Aug 27, 2012 at 12:09 PM, Scott Kostyshak wrote: > From: Jean-Marc Lasgouttes [lasgout...@lyx.org] > Sent: Thursday, August 23, 2012 9:15 AM > >>Then I propose to simplify things a lot by only dispatching to visible >>buffers (for now). No more special parameter. >

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-27 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, August 23, 2012 9:15 AM Then I propose to simplify things a lot by only dispatching to visible buffers (for now). No more special parameter. The updated patch is attached. How does it look? Scottdiff --git a/src/LyXAction.cpp

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-27 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, August 23, 2012 9:15 AM >Then I propose to simplify things a lot by only dispatching to visible >buffers (for now). No more special parameter. The updated patch is attached. How does it look? Scottdiff --git a/src/LyXAction.cpp

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-23 Thread Jean-Marc Lasgouttes
Le 23/08/2012 06:19, Scott Kostyshak a écrit : Currently buffer-forall rehides each hidden buffer after the LFUN is applied. Should it not do that? Is it because they had to be made visible earlier? JMarc

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-23 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, August 23, 2012 4:41 AM Le 23/08/2012 06:19, Scott Kostyshak a écrit : Currently buffer-forall rehides each hidden buffer after the LFUN is applied. Should it not do that? Is it because they had to be made visible earlier? I

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-23 Thread Jean-Marc Lasgouttes
Le 23/08/2012 06:19, Scott Kostyshak a écrit : Currently buffer-forall rehides each hidden buffer after the LFUN is applied. Should it not do that? Is it because they had to be made visible earlier? JMarc

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-23 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, August 23, 2012 4:41 AM >Le 23/08/2012 06:19, Scott Kostyshak a écrit : >> Currently buffer-forall rehides each hidden buffer after the LFUN is applied. >> Should it not do that? >Is it because they had to be made visible earlier?

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Friday, July 20, 2012 4:45 AM 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:

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Jean-Marc Lasgouttes
Le 22/08/2012 09:04, Scott Kostyshak a écrit : I agree with the above points you made. LFUN_BUFFER_FORALL now supports multiple views and I tried to add some structure on the terms visible and hidden, which are now defined in the LFUN documentation. The language is kind of confusing, but I

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, August 22, 2012 4:12 AM Le 22/08/2012 09:04, Scott Kostyshak a écrit : + * \li Notion: A buffer is `locally visible' with respect to a view if it + is visible within that view. If not, it is `locally hidden'. +

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Jean-Marc Lasgouttes
Le 22/08/2012 11:06, Scott Kostyshak a écrit : Do you really think that 'locally visible' and especially 'locally hidden' have real use cases, or are they just added for the sake of being complete? I would think that all/visible/hidden is good enough. What do you mean by visible here? Are you

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, August 22, 2012 6:27 AM I would revert the definition: a buffer is hidden if it is internally opened in LyX, but not visible in any window (rewritten into proper English) Sounds good. To make things really simple, what if only

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Friday, July 20, 2012 4:45 AM >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.

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Jean-Marc Lasgouttes
Le 22/08/2012 09:04, Scott Kostyshak a écrit : I agree with the above points you made. LFUN_BUFFER_FORALL now supports multiple views and I tried to add some structure on the terms "visible" and "hidden", which are now defined in the LFUN documentation. The language is kind of confusing, but I

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, August 22, 2012 4:12 AM >Le 22/08/2012 09:04, Scott Kostyshak a écrit : >> + * \li Notion: A buffer is `locally visible' with respect to a view if it >> + is visible within that view. If not, it is `locally hidden'. >>

Re: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Jean-Marc Lasgouttes
Le 22/08/2012 11:06, Scott Kostyshak a écrit : Do you really think that 'locally visible' and especially 'locally hidden' have real use cases, or are they just added for the sake of being complete? I would think that all/visible/hidden is good enough. What do you mean by "visible" here? Are

RE: [PATCH] LFUN_BUFFER_FORALL

2012-08-22 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, August 22, 2012 6:27 AM >I would revert the definition: "a buffer is hidden if it is internally >opened in LyX, but not visible in any window" (rewritten into proper >English) Sounds good. >> To make things really simple, what if

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, July 19, 2012 4:15 AM Le 19/07/2012 04:46, Scott Kostyshak a écrit : If there are more windows open, buffer-forall iterates over the buffers in the current window, treating a buffer as hidden as designated in the current window.

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Jean-Marc Lasgouttes
Le 20/07/2012 08:12, Scott Kostyshak a écrit : That sounds good. I put the active window instead of this window because (at least in Linux) if you have messages open on a window, open a new window, and execute a command in the mini-buffer of the new window, the message box of the old window will

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Jean-Marc Lasgouttes
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

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Thursday, July 19, 2012 4:15 AM >Le 19/07/2012 04:46, Scott Kostyshak a écrit : >> If there are more windows open, buffer-forall iterates over the >> buffers in the current window, treating a buffer as hidden as >> designated in the current

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Jean-Marc Lasgouttes
Le 20/07/2012 08:12, Scott Kostyshak a écrit : That sounds good. I put "the active window" instead of "this window" because (at least in Linux) if you have messages open on a window, open a new window, and execute a command in the mini-buffer of the new window, the message box of the old window

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-20 Thread Jean-Marc Lasgouttes
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

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-19 Thread Jean-Marc Lasgouttes
Le 19/07/2012 04:46, Scott Kostyshak a écrit : From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, July 18, 2012 4:14 AM JMarc, Thank you for your guidance. Attached is an updated patch and below I respond to your comments. Great! Just one thing beofre committing: BTW, what

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-19 Thread Jean-Marc Lasgouttes
Le 19/07/2012 04:46, Scott Kostyshak a écrit : From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, July 18, 2012 4:14 AM JMarc, Thank you for your guidance. Attached is an updated patch and below I respond to your comments. Great! Just one thing beofre committing: BTW, what

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-18 Thread Jean-Marc Lasgouttes
Le 18/07/2012 06:39, Scott Kostyshak a écrit : From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM Moreover, this code should not be in GuiView, but in GuiApplication, since the function is at application level. Attached is my attempt to move the code to

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-18 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, July 18, 2012 4:14 AM JMarc, Thank you for your guidance. Attached is an updated patch and below I respond to your comments. Scott Try to #include GuiWorkArea.h at the start of GuiApplication.cpp. That works. + case

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-18 Thread Jean-Marc Lasgouttes
Le 18/07/2012 06:39, Scott Kostyshak a écrit : From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM >Moreover, this code should not be in GuiView, but in >GuiApplication, since the function is at application level. Attached is my attempt to move the code to

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-18 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Wednesday, July 18, 2012 4:14 AM JMarc, Thank you for your guidance. Attached is an updated patch and below I respond to your comments. Scott >Try to #include "GuiWorkArea.h" at the start of GuiApplication.cpp. That works. >> + case

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-17 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM Moreover, this code should not be in GuiView, but in GuiApplication, since the function is at application level. Attached is my attempt to move the code to GuiApplication. I am having trouble instantiating a

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-17 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM >Moreover, this code should not be in GuiView, but in >GuiApplication, since the function is at application level. Attached is my attempt to move the code to GuiApplication. I am having trouble instantiating a

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-15 Thread Jean-Marc Lasgouttes
Le 15/07/12 22:35, Scott Kostyshak a écrit : Attached is a patch that implements LFUN_BUFFER_FORALL, which applies a passed LFUN command to all buffers. My motivation was that I sometimes need to do the same thing in all of the buffers that I have open. Another advantage of implementing this

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-15 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM + case LFUN_BUFFER_FORALL: { + Buffer * const buf = currentBufferView()-buffer(); + if (!buf) + break; Why is this test needed?

Re: [PATCH] LFUN_BUFFER_FORALL

2012-07-15 Thread Jean-Marc Lasgouttes
Le 15/07/12 22:35, Scott Kostyshak a écrit : Attached is a patch that implements LFUN_BUFFER_FORALL, which applies a passed LFUN command to all buffers. My motivation was that I sometimes need to do the same thing in all of the buffers that I have open. Another advantage of implementing this

RE: [PATCH] LFUN_BUFFER_FORALL

2012-07-15 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 5:14 PM >> + case LFUN_BUFFER_FORALL: { >> + Buffer * const buf = ()->buffer(); >> + if (!buf) >> + break; >Why is this test needed? The