branch: externals/denote-search
commit 0fa936f597dadd401c39d7a6dd73cc206bfac441
Author: Lucas Quintana <lm...@protonmail.com>
Commit: Lucas Quintana <lm...@protonmail.com>

    Add installation instructions
---
 README.md  | 34 ++++++++++++++++++++++++++++++++++
 README.org | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/README.md b/README.md
index f5c1c17fff..05ce416ff0 100644
--- a/README.md
+++ b/README.md
@@ -16,3 +16,37 @@ be good Emacs citizens, and don't use any dependencies other 
than
 Denote and built-in libraries.
 
 See the `README.org` file for a comprehensive manual.
+
+## Installation
+
+If you are using Emacs 29.1 onwards, you can install the package by
+evaluating the following code:
+
+```elisp
+(package-vc-install
+ '(denote-search
+   :url "https://github.com/lmq-10/denote-search";
+   :doc "README.org"))
+```
+
+Alternatively, you can use the :vc keyword from use-package, as shown
+in the sample configuration:
+
+```elisp
+(use-package denote-search
+  :ensure t
+  ;; Installation with VC
+  :vc (:url "https://github.com/lmq-10/denote-search";
+       :rev :newest)
+  :bind
+  ;; Start search with C-c s
+  ("C-c s" . denote-search)
+  :custom
+  ;; Disable help string (set it once you learn the commands)
+  ;; (denote-search-help-string "")
+  ;; Display keywords in results buffer
+  (denote-search-format-heading-function 
#'denote-search-format-heading-with-keywords))
+```
+
+Of course, you can also install it manually or use an alternative
+package manager such as quelpa.
diff --git a/README.org b/README.org
index a3469b05ab..0cbe58471c 100644
--- a/README.org
+++ b/README.org
@@ -287,10 +287,59 @@ value for ~denote-directory~), then ~denote-search~ 
should correctly
 search in the contents of the silo when inside of it, without
 additional configuration.
 
+* Installation
+
+If you are using Emacs 29.1 onwards, you can install the package by
+evaluating the following code:
+
+#+begin_src elisp
+(package-vc-install
+ '(denote-search
+   :url "https://github.com/lmq-10/denote-search";
+   :doc "README.org"))
+#+end_src
+
+Alternatively, you can use the :vc keyword from use-package, as shown
+in the [[*sample configuration][sample configuration]].
+
+Of course, you can also [[*manual installation][install it manually]] or use 
an alternative
+package manager such as quelpa.
+
+** Manual installation
+
+Assuming your Emacs files are found in =~/.emacs.d/=, execute the
+following commands in a shell prompt:
+
+#+begin_src sh
+cd ~/.emacs.d
+
+# Create a directory for manually-installed packages
+mkdir manual-packages
+
+# Go to the new directory
+cd manual-packages
+
+# Clone this repo, naming it "denote-search"
+git clone https://github.com/lmq-10/denote-search denote-search
+#+end_src
+
+Finally, in your =init.el= (or equivalent) evaluate this:
+
+#+begin_src emacs-lisp
+;; Make Elisp files in that directory available to the user.
+(add-to-list 'load-path "~/.emacs.d/manual-packages/denote-search")
+#+end_src
+
+Everything is in place to set up the package.
+
 * Sample configuration
 
 #+begin_src elisp
 (use-package denote-search
+  :ensure t
+  ;; Installation with VC
+  :vc (:url "https://github.com/lmq-10/denote-search";
+       :rev :newest)
   :bind
   ;; Start search with C-c s
   ("C-c s" . denote-search)

Reply via email to