"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 more files.
| 
| Using a separate file like $HOME/.lyx/filepos means more source code
| to change and maintain so I prefer the lastfile interface.
| In my
| implementation, the first several lines are  for lastfiles, and the
| rest of the lines will be loaded for file positions.

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.

| > bookmark0? where is that stored? if it in the lyx document, then
| > please no.
| 
| The bookmark is not saved in .lyx file.

Ok. IMHO this lastpos feature should not be mixed with bookmarks.

| > Please do not use paragraph id it is not stable. Perhaps use the
| > cursor stack info instead.
| 
| Use pit() instead of id() now.

You won't be able to please the cursor accurately then.
 
| > I must admit that I prefere to not use in/out parameters.
| > I like tupples though :-)  (boost::tuple)
| 
| For two items, std::pair is better. I do not really like the
| get<0>() interface.

boost::tie

| 
| > I think we should just have a switch. LyX wide per user where (lyxrc)
| > the decides where the lastposition info should be used or not.
| 
| I do not know how to do it. It should be simple for you guys. ( I have
| a FIXME in the patch)

To add it to the lyxrc is easy enough... it is getting it into the gui
frontends that is hard...
 
| > Using paragraph id is icky. Please use offsets into the paragraphlist
| > instead. You should be able to get that from the cursor.
| 
| I use pit() and paragraphs()[ pit() ].id() etc (see attached patch). I
| am not quite confident about this part.
| 
| > This is a no-go. This information must be in the LastFiles object
| > (class).
| 
| Done. With another entry num_positions. An rc entry for it should be
| fine but I simply set it to 100.
| 
| > Using "ClassName::Func" in the class decl. is a syntax error. Just use
| > 'Func' instead.
| 
| Oops, copy/paste problem. But why did not my gcc complain?

Too old gcc. I think only gcc > 4.1 warns/errors about this.

-- 
        Lgb

Reply via email to