As title. Can anyone confirm?
All evidence points to Andre's r19920 patch.
Bo
> > +/// child document can be embedded
> > +void registerEmbeddedFiles(Buffer const &, EmbeddedFiles &,
> > +ParConstIterator const &) const;
> > protected:
> > InsetInclude(InsetInclude const &);
> > ///
>
> The comment above is incorrect. We reserve /// for doxygen notation. I know
> that I am
> Btw: Anybody ever thought of putting documentation into the .cpp files?
>
> Less recompilation on documentation changes, and docs stay closer to
> the implementation, so they are more likely to be updated with the
> implementation.
IMHO, document would better stay in .h file.
Bo
On 8/30/07, José Matos <[EMAIL PROTECTED]> wrote:
> On Thursday 30 August 2007 20:22:04 Bo Peng wrote:
> > Updated patch attached. This time, embedding will always result in a
> > zipped file.
>
> There is no need to revert the feature as long as you have the status
> We need to support directories. Actually I would like to see that support
> the sooner possible.
What do you mean by directories? Right now, files under the document
directory is saved in their original subdirectories (Christian's
suggestion).
> Don't forget that what are doing requires a f
> > IMHO, document would better stay in .h file.
>
> Reasoning?
The most important reason is that comments in .h files are presented
in a more condensed form. I can understand what a class is doing by
reading .h file alone.
Cheers,
Bo
On 8/30/07, Bo Peng <[EMAIL PROTECTED]> wrote:
> As title. Can anyone confirm?
Backtrace when open user's guide:
#0 0x006d1c84 in lyx::(anonymous namespace)::Parser::parse2
(this=0x7fbfffba20, [EMAIL PROTECTED],
flags=256, mode=lyx::Inset::MATH_MODE, numbered=false)
On 8/30/07, José Matos <[EMAIL PROTECTED]> wrote:
> On Friday 31 August 2007 00:02:59 Richard Heck wrote:
> > Any attempt to export LyX (say, 1.4) from within the trunk fails with an
> > error. I don't THINK this can be because of my recent commit, but I'm
> > far from sure. Can someone who is expe
On 8/30/07, Andre Poenitz <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 31, 2007 at 12:31:52AM +0200, Andre Poenitz wrote:
> > On Thu, Aug 30, 2007 at 05:09:36PM -0500, Bo Peng wrote:
> > > On 8/30/07, Bo Peng <[EMAIL PROTECTED]> wrote:
> > > > As title. Can
On 8/30/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote:
> Andre Poenitz wrote:
> > On Fri, Aug 31, 2007 at 12:43:27AM +0200, Abdelrazak Younes wrote:
> >> Bo?
> >
> > Re-run cmake?
>
> I've done that... but I did not erase the CMakeCache, should I?
scons and autotools are fine.
Bo
nd in the file COPYING.
+ *
+ * \author Bo Peng
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef QEMBEDDEDFILES_H
+#define QEMBEDDEDFILES_H
+
+#include "EmbeddedFiles.h"
+#include "ControlEmbeddedFiles.h"
+#include "ui_EmbeddedFilesUi.h&quo
On 8/30/07, Andre Poenitz <[EMAIL PROTECTED]> wrote:
>
> The 'Q* namespace' is not really ours.
Is this really needed? Please also patch the branch if you apply this
to the trunk. Otherwise, we will have big trouble in backporting
patches.
Cheers,
Bo
> 1/ if it is not done already, support for reading/writing compressed
> lyx files should be removed: it has no interested wrt .zip file
> version.
I agree. It does not make sense to keep two compressed version. I am
not sure if lyx2lyx decompress compressed lyx file though.
> 2/ is the new zip b
> By the way, let it not be lost in this discussion how useful this will be.
OK. Let us adjust the feature after it is (almost) done.
Bo
> Because it is inconvenient to have embedding enabled by default, I
> plan to commit this patch tomorrow morning.
This patch (updated for Q->Gui change) has been submitted. I will let
you guys play with it for a little while before I post a long list of
things that need to be done for this featur
> What about using the comment field of the zip file? It appears in the
> first bits of the binary IIRC. The comment could actually be the
> manifest and start with an indication of the lyx format (and maybe
> version).
I do not know the zip format well enough to do this. Our embedded
minzip might
Dear all,
The core and basic gui of the embedding feature is there. Lot of
things need to be done before this feature becomes usable. I can do
them slowly, but experts in related areas are certainly welcome to
jump in and help me implement them in a more efficient and elegant
manner.
1. remove of
On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: bpeng
> Date: Sat Sep 1 00:02:34 2007
> New Revision: 19960
>
> URL: http://www.lyx.org/trac/changeset/19960
> Log:
> Embedding: small adjustments of interfaces, single and double click in the
> embedding dialog
The basic-embeddi
On 8/31/07, José Matos <[EMAIL PROTECTED]> wrote:
> On Friday 31 August 2007 18:02:13 Bo Peng wrote:
> > 1. remove of the compression feature (Jose, JMarc?)
> Why?
> LyX supports compressed files in a clean way, so let us leave that way.
> I don't want to appe
> Could you please apply this patch to branch?
I had the same plea.
Jurgen, what is your opinion?
Bo
On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: bpeng
> Date: Sat Sep 1 06:20:34 2007
> New Revision: 19967
>
> URL: http://www.lyx.org/trac/changeset/19967
> Log:
> Embedding: add 'addFile' to embed arbitrary file, fix a few bugs along the way
Again, no public review yet...
B
> I think that the dos time is gone long ago and a lyx suffix should stand for
> lyx files no matter what the internal format used.
This can be done easily later after you and JMarc (and others) reach
an agreement. I personally like a unique .lyx extension, even if
compression is removed.
> > Y
On 9/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: bpeng
> Date: Sat Sep 1 22:08:16 2007
> New Revision: 19977
>
> URL: http://www.lyx.org/trac/changeset/19977
> Log:
> Embedding dialog: add extract and extractAll functions
With the addition of extract and extractAll functions, the
On 9/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: bpeng
> Date: Sat Sep 1 22:48:51 2007
> New Revision: 19981
>
> URL: http://www.lyx.org/trac/changeset/19981
> Log:
> Embedding dialog: use two buttons (will have more) for the actions
This is the promised last patch for the embedd
On 9/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: bpeng
> Date: Sun Sep 2 07:36:39 2007
> New Revision: 19986
>
> URL: http://www.lyx.org/trac/changeset/19986
> Log:
> Embedding: fix a file selection and a file copy bug
This patch finishes the embedding dialog. Please review
Embed
Dear all,
Attached please find the fourth embedding patch that enables automatic
update of the embedding dialog with the addition/removal of insets
with embedded files, and open/close of buffer. The patch mimics the
way TOC is updated, I suspect that cbuf.embeddedFiles().update() can
be very expe
> > // copy buffer embeddedFiles to a local copy
> > kernel().buffer().embeddedFiles().update();
> > - kernel().buffer().embeddingChanged();
> > }
>
> A comment saying '// FIXME: Bo, please look here' would have been
> nicer...
Sorry about the compile problem. It was the result of
> Please comment and test. Because this patch changes core lyx
> functionality, I will wait for two OKs to proceed.
No comment?
There is an obvious problem with this patch in that embeddingChanged
is checked in updateLabels, along with structureChanged. That is to
say, embedding dialog is updated
> The only comment I have is that during ordinary development time no 'two
> OKs' are formally needed.
The problem here is that I have less confidence in this patch. It
looks more like a temporary fix than a formal solution.
> has a tendency to shorten after committing lots of uncontroversial
> s
Jurgen,
Attached please find a patch that combines r19916/trunk and a fix for
bug 4193. Briefly speaking, when an emergency file is loaded, its
timestamp and sum are saved, but isExternallyModified will compare
them with the timestamp and sum of the original file. Therefore, a
'file is externally
> No, I want to have compressed files (.gz or .zip, I don't care) but without
> being forced to embed all figures inside.
Document -> Embedded Files -> Enable Embedding. Select all emdedded
files -> select 'External'. You will get a zip file with file.lyx and
manifest.txt.
Bo
> I also don't like the hijacking of updateLabels(). So, if you go for a
> signal solution, then emit this signal when the embedding status is
> effectively changed and not every time you update the labels.
This is what I will have to do later.
The patch is in for now so that I can finish the emb
Patch for trunk is attached.
OK?
Bo
Index: src/Buffer.cpp
===
--- src/Buffer.cpp (revision 20037)
+++ src/Buffer.cpp (working copy)
@@ -749,8 +749,14 @@
// to not overwrite them with those of the file created in the tempdir
// whe
> As far as I understand your explanation (it makes sense) I would say yes.
Done.
Thanks.
Bo
On 9/4/07, José Matos <[EMAIL PROTECTED]> wrote:
> On Tuesday 04 September 2007 15:29:20 Bo Peng wrote:
> > Document -> Embedded Files -> Enable Embedding. Select all emdedded
> > files -> select 'External'. You will get a zip file with file.lyx and
>
> I understand this. What I do not understand is why this is an external file
> and not a section of the main file header.
Because a) I do not want to mess with lyx2lyx now, b) this does not
really belong to the main document. This is why ODF also has this
manifest file.
Bo
> Maybe POTFILES.in is needed after all?
Scons automatically generates POTFILES. I guess autoconf people need
to do something like 'make updatepo' before 'make'.
Bo
> That is either we go with the previous lyx way or we go full odf where each
> section is a file in the upper directory. And sooner or later we need to
> tackle the lyx2lyx subject.
I see. Please allow me to more or less finish the embedding feature
before we polish it. There are tones of undec
> A year with one to three patch releases in between.
That depends on the stability of the trunk during the development
cycle. If it is like 1.5.0/svn, no patch release is possible.
Bo
I am still working on the rest of the embedding feature, but it will
not hurt to bring up a few issues for discussion.
Currently, embedded files are recognized by their absolute filename
only and duplicate registrations (Inset::registerEmbeddedFiles()) are
merged. Using the current update() algori
The current trunk only has top level (File, Edit etc) menu. Can anyone confirm?
Bo
> I am not sure how this embedding dialog is supposed to work. I add a
> png file to my document and nothing happens in the dialog.
Currently, embeding dialog is only updated with structure change. So
you need to create a new paragraph. (Awkward, I know).
> Are we supposed to add all files one by
On 9/5/07, Bennett Helm <[EMAIL PROTECTED]> wrote:
> On Sep 5, 2007, at 12:22 PM, Bo Peng wrote:
>
> >> I am not sure how this embedding dialog is supposed to work. I add a
> >> png file to my document and nothing happens in the dialog.
> >
> > Curre
> > But they don't show up even then for me (on Mac).
It is *not* my fault. ViewSource dialog is not updated either.
I may have to wait until the GUI cleanup is completed before I
continue my work. This has been very annoying.
Bo
Dear all,
I have just submitted the last patch of the embedding feature. I will
turn to bug fixing/polishing state after the GUI cleanup is done.
This patch does the following:
1. When an emdedded file is loaded, the manifest is loaded first so we
know the embedded and external filenames.
2. Wh
> Well, if that means that these dialogs (Toc, Citation, View source) ...
Do not forget Embedding. It borrows code from Toc and ViewSource.
Bo
> What is the difference between embed vs 'auto' embed?
AUTO embedding is how lyx/embedding differs from other applications
such as word, and is a way to preserve the latex' way of handling
external files.
In word, figures are always embedded. If one needs to modify the
figure, s/he will have to
> So what happens if we disable embedding? What happens with these files
> that are not linked with an external source?
When you disable embedding, these embedded files will be extracted to
their original locations. All embedded files know their original
location even if it is in EMBEDDED mode.
> We should decide. Notice that this more general than this case, the same
> resolution will be used by lyx2lyx to revert to pre-embedded state.
Currently, lyx tries to extract a file. It checks (line 127,
embeddedFiles.cpp) for overwrite only when both files exists and are
different.
fs::exist
> I did not follow the discussion but I just wanted to let you know that
> docked widget can be tabbed too if it is of any help.
That would be really helpful, and should be the way to go!!!
Bo
> I would go even further a move the checkbox regarding the embed status
> of each element in its own dialog. Then the embed dock could be merged
> into the toc.
It would then be very difficult to enable/disable embedding for all
figures. Right now, if you click on an embedded file in the embeddin
> > Auto is un-natural (whatever that means :-). It would be quite to ask lyx
> > to
> > change any file to a self-contained file with all the external references
> > with a single action.
>
> Select all the files in the embedding panel, and select embed.
Note also that you usually do not do an
> I understand that this is work in progress but Bo asked for comments. :-)
The embedding feature is almost complete but I expect a lot of bug
fixes. Also, implementations may change a lot as the results of such
discussions.
Cheers,
Bo
g++ -o try1/src/MenuBackend.o -c
-I/home/bpeng/lyx-devel/lyx-1.6-rw/boost -g -O -Itry1/src -Isrc -Isrc
-Itry1/intl -Iintl src/MenuBackend.cpp
src/MenuBackend.cpp: In member function `lyx::Menu&
lyx::Menu::read(lyx::Lexer&)':
src/MenuBackend.cpp:306: error: `Elements' is not a member of `lyx::MenuIt
> I do not see why you could not retain this behaviour if the dialog is
> merged with toc dialog.
Navigation and even edition can be merged to TOC, but not status
changes and file inclusion and extraction. My 'merge', I prefer two
tabs with basically two dialog.
Bo
> If all files do have an original location (I thought you wanted to
> allow more weird things like drag-n-drop of an image without file
> name),
This can be handled as, e.g. 'PASTED78434.png' in the document
directory in the same way as others.
> then I am not sure why we need more than two chec
> Bo Peng wrote:
> > Can I apply?
>
> OK.
Committed along with a fix for another case: when a buffer is saved in
another name, the checksum of the newfile name needs to be saved.
Otherwise, 'file->new, save as new filename', 'file->new, save as
existing file&
> I agree. This auto stuff is far too complicated to understand (both for
> users and developers) and only makes your life as developer difficult.
I do not know what is so complicated about AUTO embedding. You
continue to edit your document in the latex, external, pure-text, svn
way, and if you ne
On 9/6/07, Jürgen Spitzmüller <[EMAIL PROTECTED]> wrote:
> Am Donnerstag, 6. September 2007 schrieb [EMAIL PROTECTED]:
> > URL: http://www.lyx.org/trac/changeset/20108
> > Log:
> > Fix bug 4193: Revert and saveAs treated as "file is externally modified"
>
> This is the (half-)automatic "please also
There is another possibility (compromise):
1. we keep original file information (that would store in the
plain-text .lyx file) so that we can easily locate the external
counterpart of an embedded file. This would require a manifest file
unless the 'not-within-document-directory' problem can be res
> OK. Let us use your suggestions: simple on/off.
>
> Embedded .lyx:
>
> Insert figure, always embedded, remove or modify external file does
> not matter. Difficult to update figure.
>
> Plain-text .lyx:
>
> Insert figure, not embedded, remove or modify external file matters.
> Easy to update figur
> The procedure would be exactly the same without auto, see below.
I will see. The problem is with conversion.
> I don't buy that. Without auto, you do this:
> - work on the .lyx and the external files the usual way
> - if you want to send it to a colleague, switch embedding on and send the
> fil
> > Then, you lose the original file information.
>
> I thought that you stored this info for all files.
I do, but if I use the embedded or not solution, I can throw away
external file information.
> That is a problem anyway: You either store this info (privacy problem) or
> not.
This is, IMHO,
> you need to pass the right flags to the listwidget item as in attached.
>
> i didn't look at the logic, but guess you can take it from here
This is exactly what I wanted. Thank you very much!
Bo
About manifest file and lossless conversion between bundled and
plain-text formats:
It has been clear that we need to keep the original filename
information to pack/unpack a bundled .lyx file. Such information can
be saved in a manifest file, or along with the insets, yet to be
decided.
However,
> > I agree, but the problem is that sometimes it is not easy to insert
> > all needed files (.inc, .modules, .sty) so manual adjustment may be
> > needed. This can be postponed until we implement this feature.
>
> If we can't do it, then we should not try to bundle layout files.
> Normal users are
> Source code? What do you mean?
>
> What kind of things do you intend to do with the layout?
Currently, if .layout is kept with .lyx, you can open the .lyx file
without installing .layout file to ~/.lyx. The same goes with .cls.
That is to say, if we embed some customized .layout and .cls file to
> + // FIXME, Bo this does nothing
> bool mode = false;
> + // FIXME: Bo, this is not used
> + // FIXME: Bo, this is not used
> + //int row = filesLW->row(*it);
BTW, these are the consequences of the removal of AUTO feature. The
dialog is being rewritten.
Bo
> > What do you think?
>
> I do not think that it should be possible to add arbitrary files manually.
> LyX is a writing tool, not an archiver. The .layout and .cls files would be
> the only ones needing a setting in the .lyx file.
I agree, but the problem is that sometimes it is not easy to inser
Dear all,
Thanks to Edwin, the embedding dialog is working again. It now has a
list of embedded files, with embedding status (true/false) indicated
by checkboxes. There are five buttons: select (embed selected files),
unselect (dis-embed selected files), add (add a file), extract
(extract selected
Dear all,
I have removed the AUTO feature of embedding so the status of a file
is easy now: embedded or not. Consequently, I have removed the
embedding status radio boxes and would like to have a QListView or
QTableView that holds a list of files with a check box before each
item. Can anyone do th
> I don't know how useful that would be. They'd have to unpack the files,
> install them, run texhash (or whatever), just as they do now. Right?
Not really. If you put a .cls in your document directory, lyx can make
use of it. That is to say, if your customized class is simple enough
(a single fil
> We seem to be reaching an agreement.
AUTO is being removed
Bo
> This is actually also related to the original problem with [Embedding
> discussion 1], do we want multiple entries for multiple insets
> referring to the same file?
I am solving this problem by
1, store a list of ParConstIterator for multiple insets in a EmbeddedFile item.
2. display the file i
> I am solving this problem by
A patch has already been submitted. Please test it using lyx' User's guide.
Bo
> There have been several update() methods in the different layers
> of the GUII machinery. I had to rename some when merging classes,
> and even if these changes were rather mechanical it's rather likely
> that something went wrong somewhere.
So is there any planned big changes?
Bo
> It's fixing time. The earthquake is over,
Great! I just sent a message asking this...
Bo
Currently, EmbeddedFiles stores a list of ParConstIterator that can be
used to locate the inset's paragraph. This has a number of problems:
1. I can only move the cursor to the beginning of the paragraph, not
where the inset is.
2. Such ParConstIterator need to be updated along with
structureChan
> I spent a few hours on this idea, and everything seems to be fine
> until I use inset_iterator_begin(inset_ptr) to locate the inset. Lyx
> instantly crashes. It turns out the the stored inset pointer is
> obsolete without any buffer edition.
It turns out that I can not use 'inset_iterator_begin(
Hi, Uwe,
Scons can not install lyx after the recent User's guide update. Could
you check what is going on? It seems that doc_toc.py can no longer
build toc.
Cheers,
Bo
> It seems that doc_toc.py can no longer
> build toc.
One of the problems is the title "Índice general LyX documentation"
can not be encoded at line 279 of LyX.py.
Bo
> This is strange because doc_toc.py is utf-8 encoded and the "Í" is included
> in latin1.
> But anyway, when I delete this character, I get:
>
> File "D:\LyXSVN\lyx-devel\build-msvc\Resources\lyx2lyx\LyX.py", line 544, in
> get_toc
> while par[-1].strip() == '' and par:
> IndexError: list i
> > This line is logically wrong. It should be
> >
> > while par and par[-1].strip():
>
> This fixes the list range bug, I therefore applied it.
I was not very careful, I meant 'and par[-1].strip() == '''. I have fixed it.
Bo
>. I have fixed it.
Ohmm, I have some network problem here and can not commit. Uwe, please
fix it yourself.
while par[-1].strip() == '' and par:
to
while par and par[-1].strip() == '':
Cheers,
Bo
Hi, Jose,
As we have discussed, the attached patch adds manifest to .lyx file
itself, as a separate manifest section. The idea here is that
manipulation of embedding status is independent of whether or not the
.lyx file will be saved in bundled format. This ensures lossless
conversion when we pack
--- Additional Comments From [EMAIL PROTECTED] 2007-09-10 11:51 ---
Bo, if this is tested, it can be committed to branch.
Hi, JMarc,
I am not sure which of your patches has not been put to branch, could
you take care of this?
Thanks.
Bo
> Note that reference to an inset is a very fragile thing. I guess that
> an undo-redo cycle will reallocate the inset.
Stored insets are used in two ways:
1. navigation. Because I compare a stored inset pointer with currently
available ones. If the stored pointer does not exist, navigation of
th
On 9/10/07, José Matos <[EMAIL PROTECTED]> wrote:
> On Monday 10 September 2007 05:14:18 Bo Peng wrote:
> > - for line in header + [''] + self.body:
> > + # LyX file format <= 284 does not have a manifest section
> > + if self.format <= 284:
&
> - if there is no manifest there is no need to place an empty manifest. Then
> there is no need to test for the document version.
But all files saved after format 254 will have a manifest. Note that
manifest also records non-embedded files.
Cheers,
Bo
> > Two suggestions:
> > - include the manifest in the header. Possibly it can be place before the
> > preamble although the order is irrelevant.
>
> This will lead to more work in .cpp. I will see.
Looking at the code in Buffer.cpp, I do not think this is a good idea:
Write:
// now wri
> What if the file does not reference any external file?
Then the manifest is empty, and an empty manifest will be written by
the current implementation.
I added an empty manifest to make logics in Buffer.cpp clearer.
Bo
> > Looking at the code in Buffer.cpp, I do not think this is a good idea:
> >
> > Write:
> > // now write out the buffer parameters.
> > ofs << "\\begin_header\n";
> > params().writeFile(ofs);
> > ofs << "\\end_header\n";
> >
> > Read:
> > while (lex.isOK()) {
> >
> 'boost::filesystem::basic_filesystem_error boost::filesystem::path_traits> >'
> what(): boost::filesystem::exists
> Aborted
What I can see here is that we need better error messages.
Bo
> What I can see here is that we need better error messages.
And I meant something like the follows. Because boost does not report
the file it fails to check, it would be nice to report such
information.
Cheers,
Index: src/support/filetools.cpp
==
> Which reminds me of another yet-unstarted battle: Do we really want
> hard crashs as the prefered way to tell the user that there is something
> wrong in Denmark?
I have long thought of this. Many internal errors does not really
prevent lyx from functioning, but lyx simply crashes without even a
> Then what remains is whether or not you want to move embedded_files_
> to BufferParams. I am neutral about this.
Latest patch attached. Can I apply?
Cheers,
Bo
Index: src/EmbeddedFiles.cpp
===
--- src/EmbeddedFiles.cpp (revision 20
> http://www.lyx.org/trac/changeset/19916 - Save the right timestamp and
> checksum of an opened file.
Already done.
> http://www.lyx.org/trac/changeset/20039 - Fix bug 4193 Revert ask for
> saving file before closing
Already done.
> http://www.lyx.org/trac/changeset/20093 - Forgot this: window
> > string filename = "";
> > string inzipName = "";
>
> string filename;
> string inzipName;
>
> Shorter, quicker, equivalent.
Got it. Thanks. :-)
Bo
> > http://www.lyx.org/trac/changeset/19472 - fix crash after assertion when
> > using %s with integer arguments
>
> Someone with checked-out branch should just apply that.
Done. r20199.
Bo
> Using a map for this purpose would fit exactly. If you
> need also the reverse translation then it might not be the best fit
> anymore
There are reverse translations. The problem is that *both* names have
to be checked because EmbeddedFiles does not know in advance which
name will be checked.
>
501 - 600 of 4033 matches
Mail list logo