Update Emacs Usage section in Readme. Add find-similar, menu usage

This commit is contained in:
Debanjum Singh Solanky 2023-01-22 17:35:28 -03:00
parent 6908b6eed3
commit 0980c6e87f
2 changed files with 34 additions and 8 deletions

BIN
docs/khoj_emacs_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -10,6 +10,10 @@
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#1-Setup-Backend][Setup Backend]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#1-Setup-Backend][Setup Backend]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#2-Install-Khojel][Install Khoj.el]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#2-Install-Khojel][Install Khoj.el]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Use][Use]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Use][Use]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Search][Search]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Find-similar-entries][Find Similar Entries]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Advanced-usage][Advanced Usage]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Khoj-menu][Khoj Menu]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade][Upgrade]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade][Upgrade]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khoj-Backend][Upgrade Backend]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khoj-Backend][Upgrade Backend]]
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khojel][Upgrade Khoj.el]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khojel][Upgrade Khoj.el]]
@ -59,21 +63,43 @@
#+end_src #+end_src
** Use ** Use
1. Open Query Interface on Client *** Search
1. Hit ~C-c s s~ (or ~M-x khoj RET s~) to open khoj search
- In Emacs: Call ~khoj~ using keybinding ~C-c s~ or ~M-x khoj~ 2. Enter your query in natural language
- On Web: Open http://localhost:8000/
2. Query Incrementally in Natural Language e.g "What is the meaning of life?", "My life goals for 2023"
e.g "What is the meaning of life?" "What are my life goals?" *** Find Similar Entries
This feature finds entries similar to the one you are currently on.
1. Move cursor to the org-mode entry, markdown section or text paragraph you want to find similar entries for
2. Hit ~C-c s f~ (or ~M-x khoj RET f~) to find similar entries
3. Apply filters to narrow down results further. See [[https://github.com/debanjum/khoj/#query-filters][query filters]] for details *** Advanced Usage
- Add [[https://github.com/debanjum/khoj/#query-filters][query filters]] during search to narrow down results further
Include/Exclude specific words or date range from results by updating query with below query format
e.g `What is the meaning of life? -"god" +"none" dt>"last week"` e.g `What is the meaning of life? -"god" +"none" dt>"last week"`
- Use ~C-c C-o 2~ to open the current result at cursor in its source org file
- This calls ~M-x org-open-at-point~ on the current entry and opens the second link in the entry.
- The second link is the entries [[https://orgmode.org/manual/Handling-Links.html#FOOT28][org-id]], if set, or the heading text.
The first link is the line number of the entry in the source file. This link is less robust to file changes.
- Note: If you have [[https://orgmode.org/manual/Speed-Keys.html][speed keys]] enabled, ~o 2~ will also work
*** Khoj Menu
[[/docs/khoj_emacs_menu.png]]
Hit ~C-c s~ (or ~M-x khoj~) to open the khoj menu above. Then:
- Hit ~t~ until you preferred content type is selected in the khoj menu
~Content Type~ specifies the content to perform ~Search~, ~Update~ or ~Find Similar~ actions on
- Hit ~n~ twice and then enter number of results you want to see
~Results Count~ is used by the ~Search~ and ~Find Similar~ actions
- Hit ~-f u~ to ~force~ update the khoj content index
The ~Force Update~ switch is only used by the ~Update~ action
** Upgrade ** Upgrade
*** Upgrade Khoj Backend *** Upgrade Khoj Backend
#+begin_src shell #+begin_src shell