Hi Stephan,
debugging LyX in gdb works except for those cases where data has been
optimized away. In those cases, unless I want to recompile everything,
the poor man's way of debugging (std::cerr << ... << std::endl;) still
works :-)
Unfortunately I will leave tomorrow for a business trip, so I'm not sure
if I can debug the copy/paste bug on Mac OS (bug 6538) further:
http://www.lyx.org/trac/ticket/6538
It seems that at that point, the file name is taken as an absolute file
name, and has to be converted back to a relative file name:
Index: CutAndPaste.cpp
=======================================================
--- CutAndPaste.cpp (revision 35355)
+++ CutAndPaste.cpp (working copy)
@@ -231,6 +232,11 @@
it->setBuffer(const_cast<Buffer &>(buffer));
switch (it->lyxCode()) {
+ case GRAPHICS_CODE: {
+ InsetGraphics & ins = static_cast<InsetGraphics &>(*it);
+ const InsetGraphicsParams & params = ins.getParams();
+ support::DocFileName filename = params.filename;
+
// TODO: and now, change the file name to a relative file name.
Note: this patch probably won't work after having been sent off via e-mail.
Maybe this is not the right place to change the code; but it would be a
possibility. The code above is just for illustration, in case someone
has time to finish this patch.
I wonder, though, if converting any copied/pasted file names to relative
paths will have implications on other systems (non-MacOSX)?
--
Regards,
Cyrille Artho - http://artho.com/
Absence in love is like water upon fire; a little quickens,
but much extinguishes it.
-- Hannah More