quickmove-extension icon indicating copy to clipboard operation
quickmove-extension copied to clipboard

Option to include path in search

Open cegfault opened this issue 2 years ago • 7 comments

I have a large, complex, folder structure. Includes multiple folders of the same name, for example: alpha/foobar, beta/foobar, gamma/foobar, etc.

If I search foobar, all the folders appear in the list (often 10+ results) and then I have to click or use arrow keys to select the specific one. It would be extremely beneficial to have an option to search with path included, for example: searching alpha/foobar which would then have just that folder pop up.

If implemented, this should probably be an option. There are likely performance implications not all users may want. (By the looks of quickmove.suffixTree = new MultiSuffixTree(allNames, allFolders);) - however, for me, I would save so much time (and make far fewer mistakes) if I could include / in the search for searching path.

cegfault avatar Nov 10 '21 12:11 cegfault

I second the idea. For me it would be great if the search would not only find matches in folder names, but (optionally) in the full path of a folder incl. /.

e.g.

(1) /mybox/home/technology
(2) /mybox/home/
(3) /mybox/work/project a/todos
(4) /mybox/work/project a/done
...
(5) /mybox/work/project e/requests

With search term 'project' it could list (3), (4) and (5), search term 'e/' could list (1), (2) and (5).

sluedecke avatar Jul 28 '22 07:07 sluedecke

fwiw the quickJump / quickMove functions in my Add-on QuickFolders already implement these functions. you can use / for matching direct consecutive parents and > for skipping parents. to avoid too many matches partial folder names are matched based on word beginnings (with space, period, underscore and dash being regarded as word boundaries) so you can also find a folder bills/my bar/03_foo using the pattern ba>bil>foo.

Edit: correction on the shortcut for skipping folders which I falsely typed as ^.

RealRaven2000 avatar Jul 28 '22 08:07 RealRaven2000

I am trying to search with ^ and /, but I cannot get any results in move (Shift-M) or goto (Shift-G). I tried the word beginnings, word parts for folders, all to no avail. What am I missing?

sluedecke avatar Jul 28 '22 08:07 sluedecke

Currently the search function (https://github.com/kewisch/quickmove-extension/blob/4a448c437417229a72b310eb841f8c9b901a7a22/src/content/quickmove.js#L329) appears to call MultiSuffixTree::findMatches (https://phabricator.services.mozilla.com/source/comm-central/browse/default/mailnews/db/gloda/modules/SuffixTree.jsm, line 87), but I don't find any special processing of / and ^ characters there...

sluedecke avatar Jul 28 '22 08:07 sluedecke

I am trying to search with ^ and /, but I cannot get any results in move (Shift-M) or goto (Shift-G). I tried the word beginnings, word parts for folders, all to no avail. What am I missing?

Are you sure that the shortcuts are not hijacked by the quickmove extension? When you use QuickFolders shortcuts - which you have to activate in settings / Licenses tab.

then the search field should show on the toolbar: image

Also sorry, the shortcut for skipping folders is > not ^. You can see an explanation of the Syntax by clicking the help panel to the right

RealRaven2000 avatar Jul 28 '22 09:07 RealRaven2000

@sluedecke you can also test out the feature by clicking (or dragging mail to) the button to test it out - only the Pro license allows the shortcuts. @kewisch could implement the functionality for quickmove, but its also an added layer of complication…

RealRaven2000 avatar Jul 29 '22 08:07 RealRaven2000

Ah, now I get it. You talk about a different add on. Thanks for mentioning it!

sluedecke avatar Jul 31 '22 20:07 sluedecke

There is an option to show full path now, I guess that fixes it? There is another issue open here that asks to not split path and folder name as well.

Please open a new issue if I missed something.

kewisch avatar Aug 19 '23 19:08 kewisch

@kewisch this isn't working for me - adding / in the search bar doesn't filter folder paths (eg, alpha/foobar does not show that folder, but foobar will). It's not clear if you meant that this request conflicts with another open issue?

cegfault avatar Aug 26 '23 19:08 cegfault