Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring node in tree searched for into the displayed area #2616

Open
useross opened this issue Dec 11, 2024 · 1 comment
Open

Bring node in tree searched for into the displayed area #2616

useross opened this issue Dec 11, 2024 · 1 comment

Comments

@useross
Copy link

useross commented Dec 11, 2024

Thanks for developing Cherrytree, i am using this tool for many years in my everyday life.
Small feature improvement of the "search in multiple nodes":

Is your feature request related to a problem? Please describe.
Searching in multiple nodes opens the search window and the node page selected from the search window. In many cases, one needs to search for a topic, but from then on wants to see which nodes are hierarchical close to the search result.
In very big trees, the marked node is out of the screen and you need to scroll to see the selected node. First, one does not know in which direction to scroll and second may needs to scroll for a long time.

Describe the solution you'd like
Bring the node searched for to the displayed area of the tree.

@gitvectors
Copy link

gitvectors commented Dec 12, 2024

As another long term user of CherryTree which lies at the heart of my desktop workflow (with other tools in a toolchain) I offer this tip.

Regard each CherryTree document (but only *.ctd documents which are XML format files) as XML notes containers to be searched (but without the standard built in CT search feature).

Now install recoll and depending on how scattered your CT docs are, index either the entire desktop, or a target directory containing your CT files. I have mine scattered far and wide. Now after recoll has indexed all your files (this can take a long time on first indexing) you can apply query: [ext:ctd] "your search pattern(s)". This means: "show in recoll GUI all files with extension .ctd containing search pattern(s)". You can see examples by hovering cursor over the recoll query field and reading the recoll manual. A great combination of tools. There are other tools I pair with CherryTree to exploit its XML structure for searching content. But recoll excels.

You do need to map *.ctd mime types (XML) to CherryTree in recoll to avoid default previewing in raw XML by default editor.

Go to Recoll > Preferences > GUI configuration > Choose editor applications .. and under Native viewer scroll down MIME type column to application/xml and set command: cherrytree %file. This opens the selected %file in CherryTree .. otherwise the default preview of *.ctd is raw XML.

Of course if you have non CherryTree files which are XML MIME type and require to be mapped to another application (Adobe comes to mind) then you will need to go through this again. But it can be scripted to be toggled.

If your CherryTree files are in database format turn to using ripgrep and ripgrep-all in command line. https://github.com/phiresky/ripgrep-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants