emanote icon indicating copy to clipboard operation
emanote copied to clipboard

Review, and document, note listing ordering

Open srid opened this issue 3 years ago • 3 comments

In sidebar, index, query listing and backlinks.

  • .timeline query in particular should be sort by date
  • calendar children shoiuld be sorted by name (thus day), just as other notes?

srid avatar Sep 24 '21 22:09 srid

Regarding ordering in the sidebar: is there an easy way to have the ordering just reflect the filename ordering? (As opposed to inferred note title, or specifying a manual ordering in YAML.)

dzackgarza avatar Nov 01 '21 01:11 dzackgarza

Currently, the order is determined from order key. If that doesn't exist, then note title is used. If there is no title, then filename is used:

https://github.com/srid/emanote/blob/71abc42e29b3355a0acdce922cf1bf53a64e12bb/src/Emanote/View/Template.hs#L175-L178

You are asking to discard the title, and compare only filename (if there is no order key), right? Is there a reason why you want to order by filename rather than title? The only use case I've thought of for automatic sorting is by title.

srid avatar Nov 01 '21 01:11 srid

For ordering by filename over note title: the use case here is to have book-like subdirectories, where it's convenient for other command-line compilation toolchains to just glob the directory and pipe text files in lex order. An example might be having 000_Preface.md and 999_Appendix.md with titles Preface and Appendix respectively, where sorting on the in-note titles seems to put the appendix first.

My particular situation is just that I have 1-2k pre-existing notes without order metadata, which do happen to be ordered correctly using timestamps in file names. A filename-first convention may not be ideal for everyone though!

dzackgarza avatar Nov 02 '21 03:11 dzackgarza

@dzackgarza That makes sense; done in df32b04.

srid avatar Aug 23 '22 22:08 srid