diff --git a/docs/khoj_emacs_menu.png b/docs/khoj_emacs_menu.png new file mode 100644 index 00000000..1b6b8c8f Binary files /dev/null and b/docs/khoj_emacs_menu.png differ diff --git a/src/interface/emacs/README.org b/src/interface/emacs/README.org index 8a998c73..7586d2f3 100644 --- a/src/interface/emacs/README.org +++ b/src/interface/emacs/README.org @@ -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#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#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-Khoj-Backend][Upgrade Backend]] - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khojel][Upgrade Khoj.el]] @@ -59,20 +63,42 @@ #+end_src ** 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~ - - On Web: Open http://localhost:8000/ + 2. Enter your query in natural language - 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 Khoj Backend