Zim

Equation plugin png and tex files not deleted

Bug #280343 reported by tlvince
4
Affects Status Importance Assigned to Milestone
Zim
Incomplete
Low
Unassigned

Bug Description

If I create a new equation using the Equation Editor plugin and then subsequently delete the equation from the page, the actual .png and .tex files are left behind and not deleted.

I can understand them being kept temporarily (because of UNDO/REDO), but it would be good if they could be deleted when Zim is closed.

Zim 0.23

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

This would apply to all files that are attached to notes pages. I think it is a bad idea to automatically delete attachments. The best way to do this would be to have e.g. an icon view with attachments at the bottom of the page where you can delete them explicitly. For now the advise would be to use the file browser to clean up attachments that are no longer used.

Changed in zim:
status: New → Incomplete
Changed in zim:
importance: Undecided → Low
Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

I have also noticed that when a page with equations is deleted the folder with the equations is not deleted. Do you think that the same reasoning (use the file manager to delete attachments) holds here? At least in this case should the equations (and the folders) be cleaned from the disc?

Actually I am not sure that I "buy" the idea that equations are "attachments". At least in my mind they are just another part of the text. So if I delete the text they should be gone exactly as any other part of the text. Note that I am a Mathematician, so equations are just a way to express ideas that are very natural for me. They are words in a special language.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 280343] Re: Equation plugin png and tex files not deleted

Paulo J. S. Silva wrote:
> I have also noticed that when a page with equations is deleted the
> folder with the equations is not deleted. Do you think that the same
> reasoning (use the file manager to delete attachments) holds here? At
> least in this case should the equations (and the folders) be cleaned
> from the disc?
>

Yes, these equations are stored in separate files which are in the
attachment folder of the page.

> Actually I am not sure that I "buy" the idea that equations are
> "attachments". At least in my mind they are just another part of the
> text. So if I delete the text they should be gone exactly as any other
> part of the text. Note that I am a Mathematician, so equations are just
> a way to express ideas that are very natural for me. They are words in a
> special language.
>

When I say I consider equations as an attachment that is not a semantic
statement about the nature of equations and text. It is just a practical
observation of how the data is stored on the computer.

Regards,

Jaap

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

>
>
> When I say I consider equations as an attachment that is not a semantic
> statement about the nature of equations and text. It is just a practical
> observation of how the data is stored on the computer.
>
> Regards,
>
> Jaap

So maybe, in the future we can add a feature that deletes the files from
the equations that are no longer present when a page is saved (or
erased). This should not be hard to do. Consider this a improvement
request, not a bug report.

I have seen that you are porting zim to Python. Once the port is working
I may try to add this functionality. It would be fun to do. I can
program in Python, but I know very little Perl. Zim is a very nice
program, I would de delighted to be able to contribute a little to it.

Paulo

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Fri, Aug 14, 2009 at 7:12 PM, Paulo J. S. Silva <email address hidden>wrote:

> So maybe, in the future we can add a feature that deletes the files from
> the equations that are no longer present when a page is saved (or
> erased). This should not be hard to do. Consider this a improvement
> request, not a bug report.
>

Sure, this is something to look into. Not only for equations, same would
apply for images. Ideally you want to clean them up after they are deleted
in the page, make a copy when the text including the image is copied to
another page, etc.

Problem I have with implementing that directly is that I need a way to check
if the same image is used by other pages as well. That is something I can
fix in the python port by indexing all relations.

> I have seen that you are porting zim to Python. Once the port is working
> I may try to add this functionality. It would be fun to do. I can
> program in Python, but I know very little Perl. Zim is a very nice
> program, I would de delighted to be able to contribute a little to it.
>

Port is coming along, hope to be able to go to beta soon, but still need to
implement the equation editor for that port - may do that later this week.

Regards,

Jaap

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.