Andrius Rinkevicius
2014-07-12 15:56:01 UTC
Hi all,
there were several reports regarding preview of modified files in browser.
See for example post on May 31. On MacOSX the preview does not work at all,
even with open -a Firefox %i command form.
The reason for this is that bash exits and deletes temporal file earlier
that system launches Firefox(other browsers are the same). If I comment
line 108
g_unlink(ep->tmp_in);
in external_commands.c then preview starts to operate. Obviously the
temporary files are not deleted, so it it left to OS to handle deletion. I
am not sure if this would be OK. I think it would be good to add some code
that cleans tmp directory at bluefish exit. Also, the way tmp filename is
created needs to be modified, since at the moment each tmp file is created
in new directory, so it end up with a lot of directories with one file in
it. Any comments?
Other issue with %i modifier is that when file is moved to tmp directory,
the html files are not rendered as they should since working directory was
changed. Would be there any issues if we create tmp file in the same
directory? Now we create, for example, backup files automatically and this
is OK. Would be possible to implement some kind of facility to create tmp
file in working directory and then automatically delete it? Any suggestions?
Andrius
there were several reports regarding preview of modified files in browser.
See for example post on May 31. On MacOSX the preview does not work at all,
even with open -a Firefox %i command form.
The reason for this is that bash exits and deletes temporal file earlier
that system launches Firefox(other browsers are the same). If I comment
line 108
g_unlink(ep->tmp_in);
in external_commands.c then preview starts to operate. Obviously the
temporary files are not deleted, so it it left to OS to handle deletion. I
am not sure if this would be OK. I think it would be good to add some code
that cleans tmp directory at bluefish exit. Also, the way tmp filename is
created needs to be modified, since at the moment each tmp file is created
in new directory, so it end up with a lot of directories with one file in
it. Any comments?
Other issue with %i modifier is that when file is moved to tmp directory,
the html files are not rendered as they should since working directory was
changed. Would be there any issues if we create tmp file in the same
directory? Now we create, for example, backup files automatically and this
is OK. Would be possible to implement some kind of facility to create tmp
file in working directory and then automatically delete it? Any suggestions?
Andrius