SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
301 stars 23 forks source link

Sortspec abruptly not working #150

Closed Bandit closed 4 months ago

Bandit commented 5 months ago

Sorry for using issues for tech support. This was working a week or two ago, but isn't now. Ideas?

image

(I tried with and without the trailing slashes on those month names but it made no difference)

SebastianMC commented 5 months ago

Hi @Bandit recent releases of Obsidian (1.5.4, 1.6.0, 1.6.3) came with breaking changes, which caused the plugin to stop working. A plugin release with fix followed each of these versions of Obsidian.

Version information are not included in your ticket - please ensure in first step if you have the most recent version of the custom-sort plugin installed (2.1.11 for today).

Please check the versions and let me know, before we go further

Bandit commented 4 months ago

Yeah I have the latest. Doesn't work for the months. The other stuff is working (e.g. my sortspec is the last thing in the list)

image

Bandit commented 4 months ago
---
sorting-spec: |
 README
 Check-ins
 20...
 January...
 February...
 March...
 April...
 May...
 June...
 July...
 August...
 September...
 October...
 November...
 December...
 %
 assets
 attachments
 tags
 templates
 sortspec
---
SebastianMC commented 4 months ago

Hi @Bandit

I think I got now what you want to do :-)

The simplest solution which you can incorporate is to explicitly apply your sorting specification to all folders and subfolders of the vault. In current shape of the sortspec on your screenshot there is no explicit specification of target folder(s) - in result the specification applies only to the parent folder of the sortspec note, which is the root folder of the vault (and only that folder) in your case.

If you explicitly tell the sorting engine to apply the specification to all folders and subfolders in the vault: target-folder: /* you will quickly get the expected result.

2024-06-26_15-30-00

More finetuned approaches are possible, e.g. to apply the months order selectively to subfolders resembling a year in YYYY format, but maybe the simple solution above is all that you need (for now).

Bandit commented 4 months ago

Perfect! That solves my problem. Strange it was working without this before. Thank you so much 👍