← Back to team overview

zim-wiki team mailing list archive

Re: Tree not synching with open page

 

Roman,

Thank you! You got it spot on and on Linux I see the files you mention
live in ~/.cache/zim/

This is what I was missing.

Ok, so I can have my script delete these files and I have a fix.

Questions remain unsolved:
- why just adding some seemingly ok .txt files to the tree cause a
problem with an existing tree state
- why just asking zim to re-index doesn't fix that problem

I guess when you add files to the tree in Zim something happens that
doesn't happen if you just have an external script create them.

Jaap - what might that be, and is there a way to fix that?

No worries if not, but it would be better if I don't have to delete the
cache.

Thanks again Roman,

Mark

On 10/09/16 20:43, Roman Korcek wrote:
> Hi Mark,
> I hope I am doing this mailing list thing right. Haven't used one in like 20 years.
> 
> I also have two Zim-related files under:
> 
> C:\Users\Username\AppData\Local\Microsoft\Windows\Temporary Internet Files\zim\zim\notebook-<My_Notebook_Path>\
> 
> There are two files:
> 
> state.conf
> index.db
> 
> I think state.conf stores the current view and index.db the notebook tree.
> 
> HTH
> Roman
> 
> On Sat, Sep 10, 2016 at 1:23 PM, Mark Hughes (Zim mailing list) <launchpad@xxxxxxxxxxxxxx<mailto:launchpad@xxxxxxxxxxxxxx>> wrote:
> Ok, so Zim appears to store the tree of a notebook somewhere that I
> can't find. Because if I...
> 
> - delete the entire folder tree of a Notebook: Notes2
> - shutdown Zim
> - start Zim, create a new Notebook: Notes2 (where the old one was)
> - open Notes2
> - Zim shows the tree I deleted even though everything was deleted
> 
> I've looked in ~/.config/zim and a few places but don't know where this
> state is being picked up from. I think this is the problem and that if I
> can delete it so it gets rebuilt it would be ok.
> 
> I'm confused because I thought this lived in Notes2/.zim or
> Notes2/notebook.zim but those have definitely been deleted and don't
> exist when I open Notes2 for the first time.
> 
> Mark
> 
> On 10/09/16 12:06, Mark Hughes (Zim mailing list) wrote:
>> 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 :-)
>>
>> Mark
>> 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.
>>>
>>> Mark
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~zim-wiki
>> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx<mailto:zim-wiki@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx<mailto:zim-wiki@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
> 



References