https://www.dendron.so/ logo
#questions
Title
# questions
k

kevins8

09/28/2022, 9:21 PM
could you elaborate/give an example?
a

aleksey

09/29/2022, 1:16 AM
An example how I would use such a command? Sure. I import my Instapaper highlights into my vault under the
inbox.instapaper
hierarchy and when I do my weekly review, I move them out of the inbox and into other appropriate hierarchies. I often have multiple related notes (say highlights from PKM articles) that I would just like to move together under the
r.pkm
hierarchy without opening or renaming them individually. Right now, since note titles might not have a common word to target with a regex, I have to either batch-rename them outside of Dendron or rename them one by one using the rename command. I can think of two solutions for this: 1. A separate command to change the parent hierarchy of a custom selection of notes. With this, I can use the multi-select option in this new command's lookup to pick notes I want to move (they don't even have to be from the same hierarchy) and then specify their new parent hierarchy. 2. Allow the refactor hierarchy command to operate on a custom selection of notes instead of the whole multi-vault setup. In this option, the refactor commands needs an additional/optional step of using multi-select lookup to pick only notes to be moved and then run the refactor logic only on them. The first option is more specific and adds a new specialized command which might not be desirable; the second, overloads an existing function, which might not be the best either. :/ The third option, as you said, could be the drag & drop approach, but I wouldn't want the mouse way to be the only option. It's a nice to have, but might be cumbersome to move notes if the target hierarchy is deeply buried.
Okay, I noticed that when I trigger the refactor command, there is the following notification:
Wait, what? The refactor command supports scope already? And then I remembered that it sort of does: https://wiki.dendron.so/notes/9zwkp44wnlaa8p8dpt4w8tq/#scope The refactor command will act on the selected links. 🤯 Almost exactly what I need: - go to the parent note (
inbox.instapaper
) - create a child note index - select the notes I want to move - run the refactor on them It works great if the notes I want to move are listed consequently. If they aren't, I need to manually move them first and that's extra work/steps. :/ However, when I run the refactor on a selection of links, it does offer a multi-select lookup to chose the notes you want in your scope:
This is fantastic and I can manually (mouse-only) select only the notes I want to moved/refactored. My only gripe here is that I must use the mouse. The multi-select propmp above seem to include the query to filter the list further, but I think it's broken right now. Notice in the screenshot above 22 notes are selection. If I type
vim
, the list is shrunken down to 3 notes, but it shows that 22 notes are still selection.
If I manually uncheck the
all
box, the selection count goes down by 3 to 19 notes selected (the number of visible entries).
I think it might be mistakenly selecting all the notes behind the scene automatically after you apply the query filter. if this is indeed an error and if it's fixed, that would be almost the solution #2 I described above apart from being able to easily select notes from different hierarchies.
a

andrey-jef

09/29/2022, 3:56 AM
Thanks for reminding this updated behavior of refactor hierarchy. I didn’t notice this scope selection
k

kevins8

09/29/2022, 3:57 AM
oh yeah, almost forgot about this. yes, this should work.
> The multi-select propmp above seem to include the query to filter the list further, but I think it's broken right now. hmm, might be a bug. @hikchoi, could you look at ☝️ when you get a chance?
h

hikchoi

09/29/2022, 4:03 AM
definitely. I also think the current experience of this is a bit clunky. I have thought about ways to make this more smoother but haven't come to a convincing solution. Thanks for bringing this up. I'll look into the bug and also see if there's something we can improve here again.
a

aleksey

09/29/2022, 2:43 PM
@kevins8 @hikchoi since you confirmed this is a bug, I opened an issue for it: https://github.com/dendronhq/dendron/issues/3608
yeah, this is a pretty obscure feature and I also didn't remember about it. I do remember reading about it way back in the release notes and thinking "what on earth would I use it for?" 😄