Re: 1.4.0cvs reconfigure can not detect my latex classes

2005-12-15 Thread Bo Peng
> For this a0poster, I have a0poster.layout under my ~/.lyx/layouts but > the class files have been removed. After I remove a0poster.layout, reconfiguration stops at aastex, a regular latex class: +checking for document class aastex [aastex]... yes +checking for document class aastex [aastex]...

Re: 1.4.0cvs reconfigure can not detect my latex classes

2005-12-15 Thread Bo Peng
OK. If I use a clean account (does not have .lyx directory created by lyx 1.3.6), lyx 1.4.0cvs configures fine. Another problem: instant preview figure misplaced. See attachment. Bo ipreview.png Description: PNG image

Re: 1.4.0cvs reconfigure can not detect my latex classes

2005-12-16 Thread Bo Peng
> What did you have in your .lyx/layouts directory? % ls ~/.lyx/layouts/ aastex.layout bioinfo.layout powerdot.layout sciposter.layout beamer.layout manual.layout thesis.layout They are all 1.3.x layouts. Bo

Data entry in Latex argument in 'table settings' dialog

2005-12-16 Thread Bo Peng
Dear list, This may be a bug: New document, insert table, right click, enter p{2cm} in 'LaTeX argument' field of the table settings dialog, click anther cell of the table, click the original cell, ===> the latex argument has been lost. This is lyx-1.4.0cvs, RHEL4, qt frontend. Bo

Export latex -> generate .eps files? (1.4.0cvs)

2005-12-18 Thread Bo Peng
Dear list, I have a lyx file with figures all in .pdf format and I have .eps versions under the same directory. When I export -> latex, lyx asks me whether or not overwrite existing .eps files. Is lyx converting all .pdf files to .eps format? Is this necessary? The dialog has "overwrite", "overwr

latex beamer preamble.

2005-12-18 Thread Bo Peng
Dear list, I have a latex-beamer file that works well under lyx 1.3.6. When I open the file using 1.4.0cvs, it can not be compiled. I notice that compared to 1.3.6, the exported latex code has two additional lines: \usepackage{usernames]{color} \usepackage{graphicx} I guess I need to change beam

Re: latex beamer preamble.

2005-12-18 Thread Bo Peng
> > \usepackage{usernames]{color} > ^ > Sure about that one? Yes. I uninstalled 1.3.6 and use 1.4.0cvs now so I could not actually compare the latex files. However, the lyx file was compiled OK but now I have error message: ! LaTeX Error: Option clash for package color. See the LaTe

Re: Export latex -> generate .eps files? (1.4.0cvs)

2005-12-19 Thread Bo Peng
> When you export latex, lyx assume you want to run "latex" on > the generated .tex file sometime later. ... ... there > is no latex export that assumes you will want to run pdflatex later. I understand the logic here but doing image format conversions during latex export is a bit strange to me.

Re: latex beamer preamble.

2005-12-19 Thread Bo Peng
> >>>\usepackage{usernames]{color} > That one is clearly wrong. I don't know whether the color package > has an option "usernames", but the brackets are clearly mismatched. Sorry, my typo. Lyx inserts \usepackage[usenames]{color} into the generated latex file and caused the compiling errors.

Re: Export latex -> generate .eps files? (1.4.0cvs)

2005-12-19 Thread Bo Peng
> Then you should include the original .eps files in LyX and let LyX do the > conversion to pdf. That would work in all cases... My case is more complicated. The eps files are the originals and are used by multiple lyx files. For this beamer/pdflatex file, I need to use .pdf format but since pdfla

Re: latex beamer preamble.

2005-12-19 Thread Bo Peng
> > Lyx inserts > > > > \usepackage[usenames]{color} > > this is superfluous, beamer loads by default xcolor. > Options to xcolor can be passed via the class options > Layout->Document->Layout->Options So \usepackage{color} should not be inserted at all. I tried to add options "pdftex,usenames" fo

Re: latex beamer preamble.

2005-12-19 Thread Bo Peng
> > options "pdftex,usenames" for beamer but still get the 'option clash > > why do you need the pdftex option? It could be detected > by nearly all packages itself. And beamer itself passes it > to hyperref > > use "dvipsnames,xcolor" as class options pdftex is suggested by the error message. I h

Re: latex beamer preamble.

2005-12-19 Thread Bo Peng
> it cannot work, because LyX inserts by default a > \usepackage[usenames]{color} which is > -- wrong here > -- and should always be xcolor, if really needed. Even though > a button for color/xcolor is the best way http://bugzilla.lyx.org/show_bug.cgi?id=2169 reported.

Re: Lyx installation

2005-12-21 Thread Bo Peng
On 12/21/05, K. Fischer <[EMAIL PROTECTED]> wrote: > When installing Lyx 1.3.6 into a Windows XP machine I got the following > message (towards the end of the installation): Which installer are you using? Is it the official one or the all-in-one one at http://developer.berlios.de/project/showfile

Re: [announce] sixth release of LyXWinInstaller

2005-12-22 Thread Bo Peng
> I just published the version 0.6 of the LyX installer for Windows. Just tried the complete version of the installer on a fresh winXP VM: installation goes fine and everything works as expected. Thank you for the great work! I think this installer is ready to go public or even become official. W

1.4.0 export to 1.3.x format?

2005-12-22 Thread Bo Peng
Dear list, Is there a way to convert 1.4.0 lyx file to 1.3.x format? I use 1.4.0cvs for some files, but need to send one of them to a friend who is using 1.3.6. Thank you very much. Bo

Re: 1.4.0 export to 1.3.x format?

2005-12-23 Thread Bo Peng
> Bo> Dear list, Is there a way to convert 1.4.0 lyx file to 1.3.x > Bo> format? I use 1.4.0cvs for some files, but need to send one of > Bo> them to a friend who is using 1.3.6. > > You have to invoke lyx2lyx directly in order to convert the files to > format 221. Since this feature already exist

Re: 1.4.0 export to 1.3.x format?

2005-12-23 Thread Bo Peng
> Looks like a "Save as..." feature. Yes, it is under 'save as' in word. Bo

latex error caused by long temp filename

2005-12-25 Thread Bo Peng
Dear list, I get compile errors when I insert a figure into lyx. The problem disappears when I export to latex and run pdflatex directly. By comparing the exported latex file in /tmp/lyx_..., I find that exported latex code \includegra

Re: [announce] sixth release of LyXWinInstaller

2005-12-26 Thread Bo Peng
Hi, Uwe, I notice a problem. I have a customized layout file. If I put it under c:\document and settings\username\Application Data\Lyx\layouts, lyx->reconfigure can not find it. (Lyx can detect this layout if I put it under the system layouts folder.) Can anyone confirm this bug? Cheers, Bo

Re: [announce] sixth release of LyXWinInstaller

2005-12-30 Thread Bo Peng
Dear list, Under linux, I can put a customized .bst file with the lyx file and use it in the 'bibtex bibliography" dialog. This does not work under windows. Is it because bibtex can not find the .bst file? Bo

Re: [announce] sixth release of LyXWinInstaller

2006-01-01 Thread Bo Peng
> If you View->LaTeX info->BibTeX styles, can you see the .bst file? No. The .bst file is under the same directory as the .lyx file. I use 'browse' in the bib tex dialog to use it. Under linux, this is enough. Bo

Re: [announce] sixth release of LyXWinInstaller

2006-01-01 Thread Bo Peng
> > My best guess, and it's just a guess, is that bibtex's being handed a > > path with spaces and choking on them. I am not quite sure why miktex/bibtex can not handle a path with spaces, whereas miktex/latex can. Anyway, if this is a problem that will be classified as WONTFIX, it would be better

Re: [announce] sixth release of LyXWinInstaller

2006-01-02 Thread Bo Peng
> _TeX_ cannot handle spaces. I suppose that you do not really > know the difference of TeX, LaTeX, pdfTeX, pdfLaTeX, bibTeX, MiKTeX I do not. My understanding is that miktex is another implementation of latex standard ( if there is such a standard). If miktex aims at windows platform, I assume th

Re: [announce] sixth release of LyXWinInstaller

2006-01-02 Thread Bo Peng
> The mistake is making C:\Program files the default for LyX and > friends. I totally agree. I think it is a good idea to install Lyx to c:\lyx by default. This will save us from some troubles, but not all. Most windows users save their files under "...\My Documents" or "... and Settings\Desktop"

Re: [announce] sixth release of LyXWinInstaller

2006-01-02 Thread Bo Peng
Dear all, It is confirmed that if the .bst file is in a path without space, the bibliography will be generated correctly, even if lyx is installed under c:\program files\lyx. So, 1. It is safe to install lyx to c:\program files, 2. It is not safe to put .bst files in a path with spaces. .lyx file

Re: [announce] sixth release of LyXWinInstaller

2006-01-03 Thread Bo Peng
> And personally bst files should always go into c:\localtexmf\bibtex\bst\ Since the .bst file (downloaded from a Journal's website) is only needed for a paper I am writing, it makes sense to put it along with the paper. Also, it is troublesome, and sometimes not allowed, to put it to the texmf di

Re: Packaging LyX-1.4.0

2006-01-03 Thread Bo Peng
On 1/3/06, Bennett Helm <[EMAIL PROTECTED]> wrote: > *.bind files and *.ui files have changed significantly, ... My .bind file seems to work just fine... Anyway, where is the incompatibility documented? > 1. Have a dumb installer simply move the preferences ... > 2. Create a "smarter" installer t

Re: [announce] sixth release of LyXWinInstaller

2006-01-03 Thread Bo Peng
> I doubt that, but we can work around this. See > http://bugzilla.lyx.org/show_bug.cgi?id=2186. We should do the same > with .bst files that we are doing with .bib files already. I was under the impression that this can be done in parallel to .bib files, may be some simple copy and paste to the .

Re: [announce] sixth release of LyXWinInstaller

2006-01-03 Thread Bo Peng
> .bst, .cls and .sty files are all essentially the same in this regard; they > belong > in a TeX tree. Then, why do you put a browse button next to the droplist in the bibtex dialog, if all .bst files should be under global or local texmf tree, and be listed in the droplist? My point is that i

Re: Bugs status

2006-01-04 Thread Bo Peng
> > Also, if you keep the extension to ".lyx", you are going to overwrite > > the file. What about exporting to ".lyx13"? > > Fine with me. But a more common approach is that the user is prompted for a new filename. Bo

Re: Various change tracking issues

2006-01-10 Thread Bo Peng
> I have produced a set of test cases. I thought it might be better to > send them to the mailing list before adding a couple of bugzilla entries. I am not sure whether or not this has been discussed, but I would like to add PASTED TEXT IS NOT CONSIDERED AS CHANGE 1. new doc 2. write something,

Re: sixth release of LyXWinInstaller

2006-01-11 Thread Bo Peng
> Guys, I'm amazed that this thread has gone on as long as it has. I'm going > to pop my head in at the door one final time and will then leave you to > play on your own again. I am amazed as well, in that many people even do not consider this as a bug. A bug report has been created (http://bugzil

Re: Various change tracking issues

2006-01-11 Thread Bo Peng
> >PASTED TEXT IS NOT CONSIDERED AS CHANGE > > > Very strange. I have added a bugzilla report... This is not very strange in that the *not-changed property' of copied lyx text is somehow preserved. If I paste from outside of lyx using my middle button, the added text is considered as change. Bo

Re: Various change tracking issues

2006-01-11 Thread Bo Peng
Another change tracking bug: CAN NOT ACCEPT THE FIRST CHANGE (?) 1. open a lyx document 2. type in a, newline, b, newline 3. turn on change tracking 4. add change 1 after line b 5, add change 2 after line a ( get a change 2 b change 1 ) 6. Go to the beginning of the document

Re: Various change tracking issues

2006-01-11 Thread Bo Peng
Another one (hope it has not been reported) CHANGE OF FORMULA IS NOT TRACED 1. open a lyx document 2. insert $x^2$ 3. turn on change tracking 4. go into the formula and remove ^2 5. $x$ is not marked as changed. Shall we advertise change-tracking in 1.4.0 as experimental? I understand 1.4.0 will

Re: Towards LyX 1.3.7 [status update #1]

2006-01-12 Thread Bo Peng
> +A special installer for LyX on Windows will soon be available at I think we should be clearer here about the differences. Something like (you know English is not my first language.) A special set of installers for LyX that bundles all necessary components like MikTex, aspell, ImageMagik ..

Re: Various change tracking issues

2006-01-15 Thread Bo Peng
Can anyone confirm http://bugzilla.lyx.org/show_bug.cgi?id=2214 ? I have checked that dvipost can overstrike formula and this is a latex-generating problem of lyx. Bo

Re: 1.4pre3 feature requests

2006-01-20 Thread Bo Peng
> * I liked the old format of the citation editor better where you had the > list of citations in your database always visible. I feel the same. I do not see the advantage of having a separate 'add' dialog. Bo

Re: help needed for bug 2248

2006-01-30 Thread Bo Peng
> It is already done in 1.4 :-) Really? I just tried to compile a file with 'too-long-filename' problem with 1.4.0cvs and get the same error message as in 1.3.7: "Latex Error: File: 59_home_bpeng_. nof found". Obviously, the tmp filename still uses absolute path. BTW, I notice another probl

Re: help needed for bug 2248

2006-01-30 Thread Bo Peng
> Bo> BTW, I notice another problem with 1.4.0cvs. The > Bo> sections/subsections in the file I loaded are not numbered, and > Bo> are not shown in the navigation menu. The ps/pdf output is correct > Bo> (with section numbers). What might be causing the problem? Note > Bo> that the file is in 1.3.6

Re: help needed for bug 2248

2006-01-30 Thread Bo Peng
> Try the following (added "Input numreport.inc"). This fixes the layout file. Thanks. Bo

/tmp/lyx..../file_name_ with underscore conflicts with underscore.sty

2006-01-30 Thread Bo Peng
Dear list, Just let you know that underscore.sty has a problem that causes \includegraphics{"filename_with_underscore"} to fail. Try it by 1. lyx->new document 2. preamble add 'usepackage{underscore} 3. insert a figure, compile. Even if a latex file can be compiled directly, it will fail under l

Re: /tmp/lyx..../file_name_ with underscore conflicts with underscore.sty

2006-01-30 Thread Bo Peng
> And with \usepackage[strings]{underscore}? Does not work for my suggested example. Despite the manual: You must avoid "_" in file names and in cite or ref tags, or you must use the babel package, with its active-character controls, or you must give the [strings] option, which attempts to redefi

Re: /tmp/lyx..../file_name_ with underscore conflicts with underscore.sty

2006-01-30 Thread Bo Peng
> \newcommand\UnderscoreCommands{\do\includegraphics} > \usepackage[strings]{underscore} This one works. Thanks. BTW, maybe we should use 0-directory-filename instead of 0_directory_filename? This problem may or may not qualify as a bug but the fact is that a latex file that can be compiled direc

Re: Repo moved to subversion

2006-02-10 Thread Bo Peng
> Great job!!! Indeed! Would you consider adding svn version number to the about box? Then I can report problems for cvs/revision 12345, not just 'current cvs'. Cheers, Bo

Up arrow in bibtex dialog crashes lyx.

2006-02-14 Thread Bo Peng
Use the latest 1.4.0cvs. Open the attached lyx file, click the reference, choose Rienzo2005, click up. Lyx crashes with message: ControlCitation::initialiseParams citation LatexCommand \citep{Pritchard2001,Reich2001a,Rienzo2005} \end_inset QComboBox::setCurrentItem: (citationStyleCO) Inde

Re: Up arrow in bibtex dialog crashes lyx.

2006-02-15 Thread Bo Peng
Up arrow is working now. Thanks. (rev 13242). Bo

Re: About bugs targeted at 1.4.1

2006-02-15 Thread Bo Peng
Dear list, I personally would like to see a better 1.4.0, rather than a quick 1.4.1 after it, especially when there are already many (maybe untested) patches. I am using 1.4.0cvs everyday. While it has been certainly usable, some edges need to be smoothed. For example, 1. 1.4.0cvs is significantl

How to place \usepackage{hyperref} before automatically inserted \usepackage{float}?

2006-02-22 Thread Bo Peng
Dear list, I put \usepacakge{hyperref} in my preamble and it messes up the style of my algorithms. According to http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/ , hyperref should be loaded before the float package to avoid this problem but there seems to be no way to put things befor

Feature request: automatic recognition of .cls and .layout in the document directory.

2006-02-23 Thread Bo Peng
Dear developers, This may need a lot of work and may violate many people's belief that .cls and .layout should be in their respective directory ( as in the case of .cst file which has been the topic of long argument). However, it would be really convenient to keep *everything* related to a docume

Re: RELEASE-NOTES

2006-02-23 Thread Bo Peng
> - Instant preview figures are sometimes displaced > http://bugzilla.lyx.org/show_bug.cgi?id=2167 I still think the patch for 2167 should be applied. The displaced preview figures will be an instant annoyance to users, especially when this feature (instant preview) is available in 1.3.x and the

Re: beamer.layout for lyx 1.4?

2006-03-08 Thread Bo Peng
> I have a beamer.layout that works for lyx 1.3, but it doesn't appear to be > working with 1.4. Do I need an updated beamer.layout or am I just doing > something wrong? Please try the attached layout file. I remember that I did some modifications but forget the details. Bo beamer.layout Descr

Re: beamer.layout for lyx 1.4?

2006-03-08 Thread Bo Peng
> The newer version from Bo Peng is only different in defining a > subsubsection. Now I remember. :-) Beamer supports subsubsection but the layout file does not define it. I added one by myself when I needed it. I guess this is not important to the general users. Bo

rev13312 hangs

2006-03-08 Thread Bo Peng
I just updated lyx to the latest svn and lyx will not start. Any hint? Ways to debug? Should I run a full re-make? I am using RHEL4 with gcc 3.4.3. Bo

Re: rev13312 hangs

2006-03-08 Thread Bo Peng
> Have you tried running it in the debugger and interrupting it so see > where it was hung? % gdb ./lyx GNU gdb Red Hat Linux (6.3.0.0-1.96rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or dist

Re: rev13312 hangs

2006-03-08 Thread Bo Peng
> Yes, this is familiar. Reconfigure with --disable-stdlib-debug. This indeed solves the problem. Thanks. Bo

Re: [patch] fix lib/configure.py

2006-03-12 Thread Bo Peng
> IMHO, it would be very good to have this for 1.4.x windows users because > it would get rid of the Msys dependency (if I understand correctly). This is the main reason at the beginning. There are conversion scripts but they can be easily translated to python. The biggest problems is that there

Minor problem with sciword.bind

2006-03-19 Thread Bo Peng
When I use sciword.bind, LyX: BN_BIND: Unknown LyX function `find-replace' [around line 165 of file /usr/local/share/lyx/bind/sciword.bind] Cheers, Bo

r13439 does not compile.

2006-03-20 Thread Bo Peng
RHEL4, gcc 3.4.5, qt frontend. ... make[4]: Leaving directory `/home/bpeng/tmp/lyx-devel/src/client' make all-am make[4]: Entering directory `/home/bpeng/tmp/lyx-devel/src/client' if g++ -DHAVE_CONFIG_H -I. -I. -I../../src -Winvalid-pch --include=./pch.h -I./.. -I../../boost -Wextra -Wall -I/

Re: rev13312 hangs

2006-03-20 Thread Bo Peng
> Yes, this is familiar. Reconfigure with --disable-stdlib-debug. I forgot this and lyx hung again. If this option will not help debugging (cause lyx to hang), why not disable it by default? Bo

Re: Minor problem with sciword.bind

2006-03-20 Thread Bo Peng
> I fixed it in trunk and branch. Please test. The problem with sciword.bind is fixed. I still have message unusual contents found: with a customized .layout file. I think there is something wrong with my .layout file but the error message can be more helpful. Also, when lyx is closed, there

Crash during acrolling with arrow-down

2006-03-22 Thread Bo Peng
Dear list, I can not reproduce this crash. It happens when I use down arrow key to navigate an article. The assertion is: % break on pointer: 0x8dcbe38 hint: xy size: 259 Assertion triggered in void lyxbreaker(const void*, const char*, int) by failing check "false" in file coordcache.C:30 This

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 do

[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-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 format? And id > = po

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 === --- src/BufferView_

[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 $HOME/.l

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 regardi

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

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

2006-03-23 Thread Bo Peng
system_lyxrc || num_lastfiles != system_lyxrc.num_lastfiles) { @@ -2229,6 +2257,14 @@ str = _("The file where the last-files information should be stored."); break; + case RC_USEFILEPOS: + str = _("De-select if you do not want LyX to scroll to saved position."); + break; + + case RC_FILEPOSITIONS:

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 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 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 li

[PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
Index: src/session.C === --- src/session.C (revision 0) +++ src/session.C (revision 0) @@ -0,0 +1,179 @@ +/** + * \file session.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYIN

Re: [PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
> I like it but my opinion does not count much. I hope they will not > reject this patch because it brings too many things at the same time, That is why I am stopping here and waiting for their responses. Lars and Angus seem to like independent, clean and small patches but I do not think it is a g

Re: [PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
> "load_last_session"? > "fileplaces", "filepositions"? > "lastsession"? It is quite easy to change these names. I guess I can trust you to do some global find/replaces to the patch before you apply the patch (if you will ever apply). > I think it should be written (yup, here it comes) so that w

Re: [PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
> We are going to more the main file format to xml later (1.6 most > likely) and I think it would be perhaps unwise of use to introduce a > ini format now. Also getting some experience with xml writing and > (especially) reading before we begin with the fileformat change would > be really nice. Ex

Re: [PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
LyX::ref().session().newLastFile(b->fileName()); return true; } Index: src/session.C === --- src/session.C (revision 0) +++ src/session.C (revision 0) @@ -0,0 +1,184 @@ +/** + * \file session.C + * This file is part of LyX, the docu

Re: [PATCH] Simple session management of lyx.

2006-03-24 Thread Bo Peng
OK. Let us decide first what should go into this session file, and how to name them (will be used in either .ini format or XML format). 1. lastfiles : Recently opened files, except for those help files 2. last opened files : Opened buffers when lyx is closed 3. file positions : Position of cursor

Cursor movement problem.

2006-03-24 Thread Bo Peng
Dear list, I am trying to figure out why the cursor does not go to saved cursor position when lyx starts like 'lyx file.lyx'. For example, if the saved file position (pit) is 50, I notice that 1. 'lyx file.lyx', .lyx/session is loaded, setCursor is called. in cursor.C, line 260, the DocIterator

[PATCH] Complete patch for session management.

2006-03-24 Thread Bo Peng
sion().saveFilePosition(buffer_->fileName(), + boost::tie(cursor_.pit(), cursor_.pos()) ); } // If we are closing current buffer, switch to the first in Index: src/session.C === --- src/session.C (revision 0) +++ src/session.C

Re: [PATCH] Complete patch for session management.

2006-03-25 Thread Bo Peng
> I would say we only need a single option "Remember opened documents on > startup" (disabled by default). I agree. Somebody else please do it. > We need the frontends to catch the session cues from their environments, > and have an alternative to QuitLyX to be called in the case of LyX dying > w

What is the qt functions to get/set position of the main window?

2006-03-25 Thread Bo Peng
Dear list, I am trying to preserve windows position and size for qt main window. size seems to be easy but I could not find relevant functions for windows position. Can anyone help? Cheers, Bo

Re: What is the qt functions to get/set position of the main window?

2006-03-25 Thread Bo Peng
> Does setGeometry() not work? That you for the link. I now use pos().x(), pos().y(), width(). height() to get info, and move() to set location. With only one problem: With saved location, 1. start lyx, lyx loads location/size and place/resize itself as expected. 2. do nothing, close lyx using Al

[PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-25 Thread Bo Peng
== --- src/BufferView_pimpl.h (revision 13495) +++ src/BufferView_pimpl.h (working copy) @@ -95,6 +95,8 @@ void restorePosition(unsigned int i); /// bool isSavedPosition(unsigned int i); + /// save bookmarks to .lyx/session + void saveSavedPositions(); /// void switchKeyMap(); /// Index: src/session.C ===

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-25 Thread Bo Peng
> | + ParIterator const end = b->par_iterator_end(); > | + for (; it != end; ++it) > | + if (it.pit() == pit) { > | + bv_->setCursor(makeDocIterator(it, > pos)); > | +

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-25 Thread Bo Peng
> > | > | + ParIterator const end = b->par_iterator_end(); > | > | + for (; it != end; ++it) > | > | + if (it.pit() == pit) { > | > | + > bv_->setCursor(makeDocIterator(it, pos)); > | > | +

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-25 Thread Bo Peng
pit, lyx::pos_type pos); + /// save bookmarks to .lyx/session + void saveSavedPositions(); + /// void switchKeyMap(); /// void center(); Index: src/session.C === --- src/session.C (revision 0) +++ src/session.C (revision 0) @@ -0,0

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-25 Thread Bo Peng
> + // paragraphs is now RandomAccessList > + // so simple paragraphs[pit] is not allowed. > + ParIterator it = b->par_iterator_begin(); > + ParIterator const end = b->par_iterator_end(); > +

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-26 Thread Bo Peng
> Can you please stop adding more and more features to the patch at > every step I just have to begin review again... more comments more > back and forth and then a new patch with new features and round and > round we go... I have certainly realized this problem and said 'this patch has grown bigg

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> i've hacked the get/set function for the qt frontend on macosx some time > ago. Perhaps you can clean it up. But the maintainers do not seem to like this feature. If Lars says yes, and prove on the rc options, I will clean the patch and submit to him. Thanks. Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Can we go for just width and height as a first? Both Hammer and my patches can do this. So you need to decide which approach you like better. Hammer uses lyxrc.write() to save these info as user preferences, and I use session::saveMiscInfo() to save them as session info. I would definitely vote

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-26 Thread Bo Peng
> A patchset would be easier to handle yes. How do you guys do this? (I mean handling of multiple patches locally.) The only way I know of is using SVK to have a local mirror of the main repository, and perform submit and diff locally to get the patches. But I do not like svk that much to use it.

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> I share Lars' concerns about the misc section. Is it not possible to do > without one? For example, is the frontend related information really > different on different frontends? The lyxrc approach saves/loads such info for all frontends, but that is difficult to do. For example, xform may not b

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Isn't there a difference here... With the info in lyxrc it becomes the > "default geometry", with the info in session is is "last session > geometry". His patch saves lyxrc every time when lyx exits. So, it is session info, disguised as preference. > I think I want to be able to set the size of

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> They could still be stored in a section [toolbar] or > more general [geometry]. It is tempting to have sections like this, and even for each frontend (who would run lyx with different frontends anyway?). But right now, [session info] or [frontend] should be enough for the two entries we have (wi

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Ok, so we add it to preference... does not save on exit + your session > patch and we have both features? It is ok to have both but I really do not see the need. If windows size is made persistent, which value should be used when both of them (session().loadSessionValue() and lyxrc.windowsSize)

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> I do realize that width/height falls a bit in both categories. 1. Which way is easier save window size? Go to a dialog to set value or do nothing? 2. If both features are used. lyxrc.windowSize will be used only once. I.e., when no session info exists yet. 3. All applications I have seen use th

Re: [PATCH] session menagement with bookmarks and window size (qt only) saved.

2006-03-26 Thread Bo Peng
Dear list, I just notice that bv_->setCursor(makeDocIterator(it, pos)); will trigger an error if invalid pos is passed, because of externally changed lyx file. Checking the validity of pos is therefore necessary in scrollToPosition(). Please fix this problem, or I can submit another patch after m

<    3   4   5   6   7   8   9   10   11   12   >