Giter Club home page Giter Club logo

Comments (5)

alphapapa avatar alphapapa commented on July 28, 2024

Org has no built-in mechanism for tracking how often headlines are visited. org-recent-headings does that, but whether a heading is considered visited depends on whether certain functions are called; see its customization options. Theoretically helm-org-rifle could consult org-recent-headings-list to sort entries, but that would be slow when there are a lot of results.

There is no existing mechanism by which relevance could be calculated. Trying to do so would reduce performance, but you're welcome to propose such a mechanism, as it could be useful at times.

from org-rifle.

codecoll avatar codecoll commented on July 28, 2024

I have the same idea that there could be an optional (controlled by a customize option) bias for entries which are often selected. For example, if I search for "java" and I have lots of matches, but there are several matches which I often select for the search "java" then rfile could offer those first. Org rifle itself could keep a file storing which entries are selected by the user for which searches and using this file it could list those items first if the user does the same search again.

from org-rifle.

alphapapa avatar alphapapa commented on July 28, 2024

@nerton That request is essentially already provided by using a Helm command that combines the helm-org-ql source with the org-recent-headings source, like so:

(use-package helm-org-ql
  :after org-ql
  :config
  (defun ap/helm-org-ql-and-recent-headings ()
    "Search `org-recent-headings', and `org-directory' files with `org-ql'"
    (interactive)
    (helm :sources (list helm-source-org-recent-headings
                         (helm-org-ql-source (org-ql-search-directories-files)
                                             :name " Org Directory Files")))))

Of course, you should have org-recent-headings installed and activated. Then headings that you've recently viewed that match the query (at least, in the heading text) will be shown first. It works well for me.

from org-rifle.

codecoll avatar codecoll commented on July 28, 2024

Of course, you should have org-recent-headings installed and activated. Then headings that you've recently viewed that match the query (at least, in the heading text) will be shown first. It works well for me.

"at least, in the heading text". That is the key. org-rifle matches the whole entry, so if I search for "inflation" for example, then it lists entries even when "inflation" is in the body. If org-rifle supported order by usage frequency then the earlier selected item could be listed first when I search for "inflation" even if the match is in the body.

from org-rifle.

alphapapa avatar alphapapa commented on July 28, 2024

That could be useful, but to be clear, I don't plan to add a usage-frequency feature to this package. If there are certain headings that you access frequently, org-recent-headings is designed for that express purpose. If there's a certain keyword in the body of an entry that leads you to it, you should probably add it to the heading or tag the entry with it. Or you could bookmark it with org-bookmark-heading (and add Helm's bookmarks source to your Helm command).

If you haven't tried org-ql yet, please do. It's like the "next-generation" of org-rifle.

from org-rifle.

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.