Code Monkey home page Code Monkey logo

Comments (7)

jgru avatar jgru commented on July 19, 2024 1

Thanks for researching and checking this behaviour, @cuprum.
As suggested by you, I changed :sort to nil in 3c2701e.
This should fix the issue.

Best regards,
jgru

from consult-org-roam.

jgru avatar jgru commented on July 19, 2024

Hi @cuprum,

thanks for your message. Can you give an MWE here?
Did you passt a sort-fn when calling consult-org-roam-node-read?
I am asking since org-roam-node-read is overriden here via advice-add.

Best regards,
jgru

from consult-org-roam.

cuprum avatar cuprum commented on July 19, 2024

Here is https://gist.github.com/cuprum/20af58bc1f09460e552baf4726662c4f from my init.el.
I use this code to preview my daily notes strickly reverse alphabetically.

from consult-org-roam.

jgru avatar jgru commented on July 19, 2024

Hi @cuprum,

Here is https://gist.github.com/cuprum/20af58bc1f09460e552baf4726662c4f from my init.el. I use this code to preview my daily notes strickly reverse alphabetically.

thanks for sending this snippet. Could you clarify why setting sort-fn to nil works?
I am asking because you pass your custom sort function in your snippet here, and this should then never be used as far as I see. Can you clarify this for me?

Best regards,
jgru

from consult-org-roam.

cuprum avatar cuprum commented on July 19, 2024

Can you clarify this for me?

I'm use bundling of Vertico + Marginalia + Orderless + Consult. So, the preceding code does not work without :sort nil in consult-org-roam.el. More precisely, in minibuffer with :sort sort-fn still show mtime's sorting order for my daily notes when i call yr/orm-node-find-wrapper.

from consult-org-roam.

jgru avatar jgru commented on July 19, 2024

Can you clarify this for me?

I'm use bundling of Vertico + Marginalia + Orderless + Consult. So, the preceding code does not work without :sort nil in consult-org-roam.el. More precisely, in minibuffer with :sort sort-fn still show mtime's sorting order for my daily notes when i call yr/orm-node-find-wrapper.

Okay, thanks. Probably, this goes back to passing the parameter sort-fn already to org-roam-node-read--completions

Would you mind to test your specific use case whether supplying nil to this func(org-roam-node-read--completions) and your sort-fn to consult-read?

Best regards,
jgru

from consult-org-roam.

cuprum avatar cuprum commented on July 19, 2024

Would you mind to test your specific use case whether supplying nil to this func(org-roam-node-read--completions) and your sort-fn to consult-read?

With the specified conditions, I see the mtime's order.

In any case, Org-roam is responsible for sorting (more precisely, org-roam-node-read--completions in this case). Apparently, one should not use :sort sort-fn additionally. Moreover, docs for consult--read says

SORT should be set to nil if the candidates are already sorted.

from consult-org-roam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.