diff --git a/Readme.md b/Readme.md index 9a520f43..7bd3d687 100644 --- a/Readme.md +++ b/Readme.md @@ -75,7 +75,7 @@ https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9 - Start Khoj app - Add this readme and [khoj.el readme](https://github.com/debanjum/khoj/tree/master/src/interface/emacs) as org-mode for Khoj to index - Search \"*Setup editor*\" on the Web and Emacs. Re-rank the results for better accuracy -- Top result is what we are looking for, the [section to Install Khoj.el on Emacs](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#installation) +- Top result is what we are looking for, the [section to Install Khoj.el on Emacs](https://github.com/debanjum/khoj/master/src/interface/emacs/#2-install-khojel)
Analysis @@ -97,7 +97,9 @@ https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9 ## Setup These are the general setup instructions for Khoj. -Check the [Khoj Obsidian Readme](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#Setup) to setup Khoj with the Obsidian Plugin. Its simpler as it can skip the configure step below. +- Check the [Khoj.el Readme](https://github.com/debanjum/khoj/master/src/interface/emacs#Setup) to setup Khoj with Emacs +- Check the [Khoj Obsidian Readme](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#Setup) to setup Khoj with the Obsidian Plugin
+ Its simpler as it can skip the configure step below. ### 1. Install diff --git a/docs/khoj_on_emacs.png b/docs/khoj_on_emacs.png new file mode 100644 index 00000000..4f8f66a0 Binary files /dev/null and b/docs/khoj_on_emacs.png differ diff --git a/src/interface/emacs/README.org b/src/interface/emacs/README.org index 51f48ca6..7ae1809e 100644 --- a/src/interface/emacs/README.org +++ b/src/interface/emacs/README.org @@ -1,12 +1,34 @@ -* Emacs Khoj +* Khoj Emacs 🦅 [[https://stable.melpa.org/#/khoj][file:https://stable.melpa.org/packages/khoj-badge.svg]] [[https://melpa.org/#/khoj][file:https://melpa.org/packages/khoj-badge.svg]] - /The Emacs interface for [[https://github.com/debanjum/khoj][Khoj]]/ + /Natural language search from within Emacs using [[https://github.com/debanjum/khoj][Khoj]]/ -** Prerequisites - - Install and Run [[https://github.com/debanjum/khoj][Khoj]] +** Table of Contents + - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#features][Features]] + - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Interface][Interface]] + - [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Setup][Setup]] + - [[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#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]] -** Installation +** Features + - *Natural*: Advanced natural language understanding using Transformer based ML Models + - *Local*: Your personal data stays local. All search, indexing is done on your machine* + - *Incremental*: Incremental search for a fast, search-as-you-type experience + +** Interface + [[/docs/khoj_on_emacs.png]] + +** Setup +*** 1. Setup Backend + #+begin_src shell + pip install khoj-assistant && khoj + #+end_src + +*** 2. Install Khoj.el **** Using MELPA #+begin_src elisp M-x package-install khoj @@ -36,7 +58,7 @@ :bind ("C-c s" . 'khoj)) #+end_src -** Usage +** Use 1. Open Query Interface on Client - In Emacs: Call ~khoj~ using keybinding ~C-c s~ or ~M-x khoj~ @@ -46,23 +68,29 @@ e.g "What is the meaning of life?" "What are my life goals?" - 3. Apply filters to narrow down results further + 3. Apply filters to narrow down results further. See [[https://github.com/debanjum/khoj/#query-filters][query filters]] for details 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"` ** Upgrade -Use your Emacs package manager to upgrade `khoj.el` +*** Upgrade Khoj Backend + #+begin_src shell + pip install --upgrade khoj-assistant + #+end_src -- For `khoj.el` from MELPA +*** Upgrade Khoj.el +Use your Emacs package manager to upgrade ~khoj.el~ + +- For ~khoj.el~ from MELPA - Method 1 - - Run `M-x package-list-packages` to list all packages - - Press `U` on `khoj` to mark it for upgrade - - Press `x` to execute the marked actions + - Run ~M-x package-list-packages~ to list all packages + - Press ~U~ on ~khoj~ to mark it for upgrade + - Press ~x~ to execute the marked actions - Method 2 - - Run `M-x package-refresh-content` - - Run `M-x package-reinstall khoj` + - Run ~M-x package-refresh-content~ + - Run ~M-x package-reinstall khoj~ -- For `khoj.el` from Straight - - Run `M-x straight-pull-package khoj` +- For ~khoj.el~ from Straight + - Run ~M-x straight-pull-package khoj~ diff --git a/src/interface/obsidian/README.md b/src/interface/obsidian/README.md index 1d9c8f47..3a2cec01 100644 --- a/src/interface/obsidian/README.md +++ b/src/interface/obsidian/README.md @@ -47,7 +47,7 @@ https://user-images.githubusercontent.com/6413477/210486007-36ee3407-e6aa-4185-8 ```shell pip install khoj-assistant && khoj --no-gui ``` -## 2. Setup Plugin +### 2. Setup Plugin 1. Open *Community plugins* tab in Obsidian settings panel 2. Click Browse and Search for *Khoj* 3. Click *Install*, after that click *Enable* on the Khoj plugin