I'm waking this thread up because I have discovered how to fix this
behaviour, but not yet how to prevent it recurring. Having lived with
this irritation for several months I solved it by doing this:
- make a new notebook
- copy everything manually from the original notebook to the new
notebook (except .zim and notebook.zim)
However, as soon as I run my script which generates some new pages and
saves them in the Notebook directory tree, the problem resumes. The only
way I know to stop it is as above - simply deleting .zim and
notebook.zim don't fix it.
So there appears to be something about a new notebook that's different
from just deleting them. What could that be?
And why might creating some files in a script trigger this problem, and
it be fixable by just copying everything to a newly created Notebook?
It suggests to me it is something to do with how Zim stores state (e.g.
currently selected folder, or folder tree state).
Any ideas. I'd be happy if I could just have my script delete stored
state when it adds files to the tree if that was the issue.
Thanks for a great program :-)
On 27/02/16 17:41, Mark Hughes (Zim mailing list) wrote:
> I've been using Zim v0.62 on Debian for ages, and it has recently
> started some strange behaviour, for which I am probably responsible but
> am not sure how to fix.
> The behaviour is that when I click on a page in the treeview, the page
> displays correctly but the tree focus flips back to one of the early
> nodes (usually but not always the same one). If I click on the node I
> want again, it sticks, until I click on a different node and then the
> tree focus goes back to the one "it prefers"!
> Clicking on some nodes does work ok, but most need to be clicked twice now.
> I've tried "zim --index" (and zim --index -D -V) - all ok.
> I've looked at the output of "Zim -D -V" and it complains about some
> tree paths being invalide. I suspect that is unrelated, but there are a
> few empty pages that it won't allow me to delete when I track them down.
> So, how did I break it. Well, it might just be co-incidence, but I doubt
> it. What I did was write a web scraper which automatically generates
> some .txt files that I began placing in my Zim notebook path. So I've
> polluted the tree by manually inserting some files (which all appear in
> the tree and display ok), but somehow may have confused Zim.
> If I remove those files (temporarily remove the folder, "Zim --index")
> then the behaviour remains broken, so it isn't the files themselves, if
> indeed the problem is anything to do with them.
> I also tried removing the ".zim" directory and the "notebook.zim" files
> and it is still broken.
> If I access an older version of this notebook (a lot older but with much
> the same structure) it works as expected so it appears to be not liking
> the content. There are no suspicious messages when I click on the tree
> (when using "zim -D -V").
> Finally, I can eliminate the behaviour if I open the notebook at one
> level higher. I don't want to do this obviously, because it means the
> whole tree of nodes lives under a single highest level nodes (equivalent
> to the directory containing the whole notebook).
> Any ideas how I can fix this?
> Thanks - and thanks for Zim. A truly excellent workhorse for me.
Mailing list: https://launchpad.net/~zim-wiki
Post to : email@example.com
Unsubscribe : https://launchpad.net/~zim-wiki
More help : https://help.launchpad.net/ListHelp