Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Bo Peng [EMAIL PROTECTED] writes: | +void FilePositions::readFile(string const filename) | +{ | + // we will not complain if we can't find filename nor will | + // we issue a warning. (Lgb) | + ifstream ifs(filename.c_str()); | + string

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Jean-Marc Lasgouttes
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars Just as a test... load a document move the cursor save. Exit Lars lyx. Start lyx. Load a different document. Load the first doc. Lars Where is the cursor placed now? To make things fail you have to edit the file before saving. Something

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | Bo Peng [EMAIL PROTECTED] writes: | | +void FilePositions::readFile(string const filename) | | +{ | | + // we will not complain if we can't find filename nor will | | + // we issue a warning. (Lgb) |

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | If this is meant to be code to read a comma-separated list, then it's not | robust. This file can be edited by hand... If you edit it by hand you are on your own. But sure if we can make it more robust. | Bo, have a look at Boost.Tokenizer.

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | | If this is meant to be code to read a comma-separated list, then it's not | | robust. This file can be edited by hand... | | If you edit it by hand you are on your own. | But sure if we can make it

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes [EMAIL PROTECTED] writes: I am still not sure. boost::regex reg(([^,]+),[ ]+(.*)); Does your regex work over multiple lines, for example? Regexes are expensive to construct and a pain to maintain. As case in point, what is that (.*) group doing? If you want to handle

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | I am still not sure. | boost::regex reg(([^,]+),[ ]+(.*)); | | Does your regex work over multiple lines, for example? It does not have to. | Regexes are expensive to construct and a pain to maintain. |

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Jean-Marc Lasgouttes
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes | Does your regex work over multiple lines, for example? Lars It does not have to. I even think it should not.

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
We have 'lastfiles' and 'lastpos' as configurable filenames, I am not sure that they should be. IMHO we should just hardcode them. Opinions on that? I just tried to make features of lastpos parallel to lastfiles. I do not think these filenames need to be configured. lastfile::dostat may not be

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Juergen Spitzmueller
Bo Peng wrote: I think lastpos is a better name to this feature As long as it cannot be confused with cursor.lastpos() (I didn't read your patch, so the comment might be irrelevant). Jürgen

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Abdelrazak Younes
Bo Peng a écrit : We have 'lastfiles' and 'lastpos' as configurable filenames, I am not sure that they should be. IMHO we should just hardcode them. Opinions on that? I just tried to make features of lastpos parallel to lastfiles. I do not think these filenames need to be configured.

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
On 3/24/06, Abdelrazak Younes [EMAIL PROTECTED] wrote: could you implement the (optional) reloading of all file that where opened on last exit? ;-) That is a separate feature that is definitely nice to have. It is possible though, to make $HOME/.lyx/lastfilepos something like *, 32, file1 *,

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Georg Baum
Abdelrazak Younes wrote: IMHO this is session management and all session management should go into a single file with a wide spread format (say XML or INI like). I disagree a bit. Being able to open a file at the last position is not session management IMHO. session management is recreate the

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Abdelrazak Younes
Georg Baum a écrit : Abdelrazak Younes wrote: IMHO this is session management and all session management should go into a single file with a wide spread format (say XML or INI like). I disagree a bit. Being able to open a file at the last position is not session management IMHO. session

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
Where you're at it Bo, could you implement the (optional) reloading of all file that where opened on last exit? ;-) This is indeed session management. If we only need to open files at their original positions, we do not really need qt api etc. I can expand filepositions to something like

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread John C. Spray
On Fri, 2006-03-24 at 15:29 +0100, Georg Baum wrote: I disagree a bit. Being able to open a file at the last position is not session management IMHO. session management is recreate the exact same state as LyX was in before shutdown, and it should be implemented using the qt/gtk API. Do you

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Georg Baum
John C. Spray wrote: Do you mean things like Was the math panel open? and Where was the math panel?. Seems like a good idea, although perhaps more basic things like allowing hiding/showing of toolbars from the View menu would be better done first. No. What I mean are more basic things:

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > "Bo Peng" <[EMAIL PROTECTED]> writes: > | +void FilePositions::readFile(string const & filename) > | +{ > | + // we will not complain if we can't find filename nor will > | + // we issue a warning. (Lgb) > | + ifstream ifs(filename.c_str());

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Just as a test... load a document move the cursor save. Exit Lars> lyx. Start lyx. Load a different document. Load the first doc. Lars> Where is the cursor placed now? To make things fail you have to edit the file before

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | > "Bo Peng" <[EMAIL PROTECTED]> writes: | > | +void FilePositions::readFile(string const & filename) | > | +{ | > | + // we will not complain if we can't find filename nor will | > | + // we issue a

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | If this is meant to be code to read a comma-separated list, then it's not > | robust. This file can be edited by hand... > > If you edit it by hand you are on your own. > But sure if we can make it more robust. > | Bo, have a look at

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | > | If this is meant to be code to read a comma-separated list, then it's not | > | robust. This file can be edited by hand... | > | > If you edit it by hand you are on your own. | > But sure if we can

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Angus Leeming
Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > I am still not sure. > boost::regex reg("([^,]+),[ ]+(.*)"); Does your regex work over multiple lines, for example? Regexes are expensive to construct and a pain to maintain. As case in point, what is that (.*) group doing? If you want to handle

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | > I am still not sure. | > boost::regex reg("([^,]+),[ ]+(.*)"); | | Does your regex work over multiple lines, for example? It does not have to. | Regexes are expensive to construct and a pain to

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes | Does your regex work over multiple lines, for example? Lars> It does not have to. I even think it should not.

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
> We have 'lastfiles' and 'lastpos' as configurable filenames, I am not > sure that they should be. IMHO we should just hardcode them. Opinions > on that? I just tried to make features of lastpos parallel to lastfiles. I do not think these filenames need to be configured. lastfile::dostat may not

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Juergen Spitzmueller
Bo Peng wrote: > I think lastpos is a better name to this feature As long as it cannot be confused with cursor.lastpos() (I didn't read your patch, so the comment might be irrelevant). Jürgen

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Abdelrazak Younes
Bo Peng a écrit : We have 'lastfiles' and 'lastpos' as configurable filenames, I am not sure that they should be. IMHO we should just hardcode them. Opinions on that? I just tried to make features of lastpos parallel to lastfiles. I do not think these filenames need to be configured.

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
On 3/24/06, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: > could you implement the (optional) reloading of > all file that where opened on last exit? ;-) That is a separate feature that is definitely nice to have. It is possible though, to make $HOME/.lyx/lastfilepos something like *, 32, file1

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Georg Baum
Abdelrazak Younes wrote: > IMHO this is session management and all session management should go > into a single file with a wide spread format (say XML or INI like). I disagree a bit. Being able to open a file at the last position is not session management IMHO. session management is "recreate

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Abdelrazak Younes
Georg Baum a écrit : Abdelrazak Younes wrote: IMHO this is session management and all session management should go into a single file with a wide spread format (say XML or INI like). I disagree a bit. Being able to open a file at the last position is not session management IMHO. session

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Bo Peng
> > Where you're at it Bo, could you implement the (optional) reloading of > > all file that where opened on last exit? ;-) > > This is indeed session management. If we only need to open files at their original positions, we do not really need qt api etc. I can expand filepositions to something

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread John C. Spray
On Fri, 2006-03-24 at 15:29 +0100, Georg Baum wrote: > I disagree a bit. Being able to open a file at the last position is not > session management IMHO. session management is "recreate the exact same > state as LyX was in before shutdown", and it should be implemented using > the qt/gtk API. Do

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-24 Thread Georg Baum
John C. Spray wrote: > Do you mean things like "Was the math panel open?" and "Where was the > math panel?". Seems like a good idea, although perhaps more basic > things like allowing hiding/showing of toolbars from the View menu would > be better done first. No. What I mean are more basic

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Georg Baum
Martin Vermeer wrote: On Wed, 2006-03-22 at 23:19 -0600, Bo Peng wrote: Dear list, It does not look so difficult to implement this feature so I tried to implement it by myself. Attached is my patch. Since I rarely submit a patch here so I am afraid that there might be many problems

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jean-Marc Lasgouttes
christian == christian ridderstrom [EMAIL PROTECTED] writes: christian On Wed, 22 Mar 2006, Bo Peng wrote: Dear list, I am not sure if others will like this idea. When I edit a long file, it may be troublesome to locate and continue from where I was working on, after the file is re-opened.

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jose' Matos
On Wednesday 22 March 2006 22:44, [EMAIL PROTECTED] wrote: On Wed, 22 Mar 2006, Bo Peng wrote: Dear list, I am not sure if others will like this idea. When I edit a long file, it may be troublesome to locate and continue from where I was working on, after the file is re-opened. I would

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread christian . ridderstrom
On Thu, 23 Mar 2006, Jean-Marc Lasgouttes wrote: I can think of two ways to do this: 1. (More intrusive). Remember the location under .lyx and jump to it when a lyx file is opened. I think this is what vim is doing. christian For good or worse, this also means that when working with

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
src/lastfiles.C: I do not want to change the Files structure so I use a map to store position information. lastfile format is changed to id, pos filename if position information is available, and filename if not. Would it be easier to always have the id, pos filename format? And id =

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
An updated patch that loads all position information while keeping only num_files Files entries. Question: is 0 a valid paragraph ID? I currently use -1 to indicate invalid ID. Bo Index: src/BufferView_pimpl.C === ---

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Jose' Matos [EMAIL PROTECTED] writes: | On Wednesday 22 March 2006 22:44, [EMAIL PROTECTED] wrote: | On Wed, 22 Mar 2006, Bo Peng wrote: | Dear list, | | I am not sure if others will like this idea. When I edit a long file, | it may be troublesome to locate and continue from where I was

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Dear list, | | It does not look so difficult to implement this feature so I tried to | implement it by myself. Attached is my patch. Since I rarely submit a | patch here so I am afraid that there might be many problems (format, | logic, bugs). Please have a

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | An updated patch that loads all position information while keeping | only num_files Files entries. | | Question: is 0 a valid paragraph ID? I currently use -1 to indicate | invalid ID. As said, I'd prefere a separate file in .lyx/; but even if I didn't: |

[PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
Dear list, This time, a formal patch. Here are the rationals: I am not sure if I like lastfiles to be the files that store this info. One of the reason is that we only store a very limited number of files there... lastpostion info should hold more files. Using a separate file like

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Dear list, | | This time, a formal patch. Here are the rationals: | | I am not sure if I like lastfiles to be the files that store this | info. One of the reason is that we only store a very limited number of | files there... lastpostion info should hold

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jose' Matos
On Thursday 23 March 2006 18:39, Lars Gullik Bjønnes wrote: Too old gcc. I think only gcc 4.1 warns/errors about this. gcc = 4.1 :-) -- Lgb -- José Abílio

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Index: src/BufferView_pimpl.C | === | --- src/BufferView_pimpl.C(revision 13463) | +++ src/BufferView_pimpl.C(working copy) | @@ -293,6 +293,20 @@ | | setBuffer(b); |

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
I do not like this one bit. IMO completely ortogonal feature that happens to share some of the omplementation. IMHO you have just made a super simple LastFiles a lot more complex. It is much more troublesome to have a separate implementation. Afterall, lastfiles do mean information regarding

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
Alternatively, more similar to what you had earlier: int pit; int pos; boost::tie(pit, pos) = LyX::ref().lastfiles().loadFilePosition(s); This is good to know. Can you please drop the bookmark part of the patch for now? If we decide that we do want bookmark[0] to

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | I do not like this one bit. | IMO completely ortogonal feature that happens to share some of the | omplementation. IMHO you have just made a super simple LastFiles a lot | more complex. | | It is much more troublesome to have a separate implementation. |

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Just as a test... load a document move the cursor save. | Exit lyx. Start lyx. Load a different document. Load the first doc. | Where is the cursor placed now? | | It will move to the position when the first file was closed. My test | goes well except that

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
No. We need to have the last position feature in addition, not mixed with lastfile. OK, since you insist, here comes a much larger patch. The patch works on my system. However, there are two problems that make this feature almost useless. Please help me resolve them. 1. Alt-F4 and

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | No. We need to have the last position feature in addition, not mixed | with lastfile. | | OK, since you insist, here comes a much larger patch. I like this patch a lot better. Thanks for doing this. One thing we should think about though; not caused by

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Georg Baum
Martin Vermeer wrote: > On Wed, 2006-03-22 at 23:19 -0600, Bo Peng wrote: >> Dear list, >> >> It does not look so difficult to implement this feature so I tried to >> implement it by myself. Attached is my patch. Since I rarely submit a >> patch here so I am afraid that there might be many

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jean-Marc Lasgouttes
> "christian" == christian ridderstrom <[EMAIL PROTECTED]> writes: christian> On Wed, 22 Mar 2006, Bo Peng wrote: >> Dear list, >> >> I am not sure if others will like this idea. When I edit a long >> file, it may be troublesome to locate and continue from where I was >> working on, after

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jose' Matos
On Wednesday 22 March 2006 22:44, [EMAIL PROTECTED] wrote: > On Wed, 22 Mar 2006, Bo Peng wrote: > > Dear list, > > > > I am not sure if others will like this idea. When I edit a long file, > > it may be troublesome to locate and continue from where I was working > > on, after the file is

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread christian . ridderstrom
On Thu, 23 Mar 2006, Jean-Marc Lasgouttes wrote: > >> I can think of two ways to do this: > >> > >> 1. (More intrusive). Remember the location under .lyx and jump to > >> it when a lyx file is opened. I think this is what vim is doing. > > christian> For good or worse, this also means that when

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
> > src/lastfiles.C: > > I do not want to change the Files structure so I use a map to store > > position information. lastfile format is changed to " > > filename" if position information is available, and "filename" if not. > > Would it be easier to always have the filename

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
An updated patch that loads all position information while keeping only num_files Files entries. Question: is 0 a valid paragraph ID? I currently use -1 to indicate invalid ID. Bo Index: src/BufferView_pimpl.C === ---

Re: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
Jose' Matos <[EMAIL PROTECTED]> writes: | On Wednesday 22 March 2006 22:44, [EMAIL PROTECTED] wrote: | > On Wed, 22 Mar 2006, Bo Peng wrote: | > > Dear list, | > > | > > I am not sure if others will like this idea. When I edit a long file, | > > it may be troublesome to locate and continue from

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | Dear list, | | It does not look so difficult to implement this feature so I tried to | implement it by myself. Attached is my patch. Since I rarely submit a | patch here so I am afraid that there might be many problems (format, | logic, bugs). Please have

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | An updated patch that loads all position information while keeping | only num_files Files entries. | | Question: is 0 a valid paragraph ID? I currently use -1 to indicate | invalid ID. As said, I'd prefere a separate file in .lyx/; but even if I didn't:

[PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
Dear list, This time, a formal patch. Here are the rationals: > I am not sure if I like lastfiles to be the files that store this > info. One of the reason is that we only store a very limited number of > files there... lastpostion info should hold more files. Using a separate file like

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | Dear list, | | This time, a formal patch. Here are the rationals: | | > I am not sure if I like lastfiles to be the files that store this | > info. One of the reason is that we only store a very limited number of | > files there... lastpostion info should

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Jose' Matos
On Thursday 23 March 2006 18:39, Lars Gullik Bjønnes wrote: > Too old gcc. I think only gcc > 4.1 warns/errors about this. gcc >= 4.1 :-) > -- > Lgb -- José Abílio

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | Index: src/BufferView_pimpl.C | === | --- src/BufferView_pimpl.C(revision 13463) | +++ src/BufferView_pimpl.C(working copy) | @@ -293,6 +293,20 @@ | | setBuffer(b); |

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
> I do not like this one bit. > IMO completely ortogonal feature that happens to share some of the > omplementation. IMHO you have just made a super simple LastFiles a lot > more complex. It is much more troublesome to have a separate implementation. Afterall, lastfiles do mean information

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
> Alternatively, more similar to what you had earlier: > > int pit; > int pos; > boost::tie(pit, pos) = LyX::ref().lastfiles().loadFilePosition(s); This is good to know. > Can you please drop the bookmark part of the patch for now? > If we decide that we do want

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > I do not like this one bit. | > IMO completely ortogonal feature that happens to share some of the | > omplementation. IMHO you have just made a super simple LastFiles a lot | > more complex. | | It is much more troublesome to have a separate

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > Just as a test... load a document move the cursor save. | > Exit lyx. Start lyx. Load a different document. Load the first doc. | > Where is the cursor placed now? | | It will move to the position when the first file was closed. My test | goes well

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Bo Peng
> No. We need to have the "last position" feature in addition, not mixed > with lastfile. OK, since you insist, here comes a much larger patch. The patch works on my system. However, there are two problems that make this feature almost useless. Please help me resolve them. 1. Alt-F4 and

Re: [PATCH} Was: Feature request: Remember the editing location when a file is closed.

2006-03-23 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > No. We need to have the "last position" feature in addition, not mixed | > with lastfile. | | OK, since you insist, here comes a much larger patch. I like this patch a lot better. Thanks for doing this. One thing we should think about though; not

Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Bo Peng
Dear list, I am not sure if others will like this idea. When I edit a long file, it may be troublesome to locate and continue from where I was working on, after the file is re-opened. I would be happy if lyx can automatically goes to the page at which lyx was closed. I can think of two ways to

Re: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread christian . ridderstrom
On Wed, 22 Mar 2006, Bo Peng wrote: Dear list, I am not sure if others will like this idea. When I edit a long file, it may be troublesome to locate and continue from where I was working on, after the file is re-opened. I would be happy if lyx can automatically goes to the page at which

[Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Bo Peng
Dear list, It does not look so difficult to implement this feature so I tried to implement it by myself. Attached is my patch. Since I rarely submit a patch here so I am afraid that there might be many problems (format, logic, bugs). Please have a look and give me some feedbacks. Many files have

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Martin Vermeer
On Wed, 2006-03-22 at 23:19 -0600, Bo Peng wrote: Dear list, It does not look so difficult to implement this feature so I tried to implement it by myself. Attached is my patch. Since I rarely submit a patch here so I am afraid that there might be many problems (format, logic, bugs). Please

Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Bo Peng
Dear list, I am not sure if others will like this idea. When I edit a long file, it may be troublesome to locate and continue from where I was working on, after the file is re-opened. I would be happy if lyx can automatically goes to the page at which lyx was closed. I can think of two ways to

Re: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread christian . ridderstrom
On Wed, 22 Mar 2006, Bo Peng wrote: > Dear list, > > I am not sure if others will like this idea. When I edit a long file, > it may be troublesome to locate and continue from where I was working > on, after the file is re-opened. I would be happy if lyx can > automatically goes to the page at

[Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Bo Peng
Dear list, It does not look so difficult to implement this feature so I tried to implement it by myself. Attached is my patch. Since I rarely submit a patch here so I am afraid that there might be many problems (format, logic, bugs). Please have a look and give me some feedbacks. Many files have

Re: [Pre-Patch] Was: Feature request: Remember the editing location when a file is closed.

2006-03-22 Thread Martin Vermeer
On Wed, 2006-03-22 at 23:19 -0600, Bo Peng wrote: > Dear list, > > It does not look so difficult to implement this feature so I tried to > implement it by myself. Attached is my patch. Since I rarely submit a > patch here so I am afraid that there might be many problems (format, > logic, bugs).