[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xeft 8b8c4bd37a 27/55: Improve README
From: |
ELPA Syncer |
Subject: |
[elpa] externals/xeft 8b8c4bd37a 27/55: Improve README |
Date: |
Fri, 13 Jan 2023 23:58:38 -0500 (EST) |
branch: externals/xeft
commit 8b8c4bd37afe8ab5df2ee3c90fffcdca02396e12
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Improve README
* Makefile: Remove whitespaces.
* README.md: IMPROVE.
* demo.gif: New file.
---
Makefile | 10 +++----
README.md | 90 ++++++++++++++++++++++++++++++++++++++------------------------
demo.gif | Bin 0 -> 1192465 bytes
3 files changed, 60 insertions(+), 40 deletions(-)
diff --git a/Makefile b/Makefile
index 32bddbd723..1c48d520b3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
.POSIX:
-PREFIX = /usr/local
-CXX = g++
-CXXFLAGS = -fPIC -I$(PREFIX)/include
-LDFLAGS = -L$(PREFIX)/lib
-LDLIBS = -lxapian
+PREFIX=/usr/local # Even if this is unnecessary, it doesn’t hurt.
+CXX=g++
+CXXFLAGS=-fPIC -I$(PREFIX)/include
+LDFLAGS=-L$(PREFIX)/lib
+LDLIBS=-lxapian
xeft-module.so: xeft-module.cc
$(CXX) $< -o $@ -shared $(CXXFLAGS) $(LDFLAGS) $(LDLIBS)
diff --git a/README.md b/README.md
index f776aeb398..36e16358b5 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+![Demo gif](./demo.gif)
+
# What is Xeft
1. A dynamic module that exposes a very basic indexing feature to
@@ -9,47 +11,32 @@
;;=> (0.031512 0 0.0)
```
-2. A note taking interface like Deft, built on the dynamic module.
+2. A note taking interface like Deft, built on top of the dynamic module.
-# How to use the dynamic module
+# Usage
-Because it’s so basic, the dynamic module is very easy to use and
-also very flexible. To index files, use
+To use Xeft the note searching interface, install it and type `M-x
+xeft RET` to bring up the panel. If the dynamic module isn’t compiled,
+you are prompted to compile it. Refer to the next section for
+prerequisites for compiling the module.
-```emacs-lisp
-(dolist (file (directory-files "my-note-dir"))
- (xeft-reindex-file file dbpath))
-```
+Once the xeft buffer is up, type the search phrase in the first line.
+Press `C-n` and `C-p` to go through each file. You can preview a file
+in another window by pressing `SPC` on a file, or click the file with
+the mouse. Press `RET` to open the file in the current window.
-This indexes each file in `my-note-dir`, saving them to the database
-at `dbpath`. If the database doesn’t exist yet, it is created.
+Directory `xeft-directory` stores note files, directory
+`xeft-database` stores the database. Xeft uses
+`xeft-default-extension` to create new files, and it ignores files
+with `xeft-ignore-extension`.
-To search for a term, use
+By default, Xeft only searches for first level files in
+`xeft-directory`, to make it search recursively, set `xeft-recursiv`
+to t.
-```emacs-lisp
-(xeft-query-term "search term" dbpath 0 10)
-```
+See the “xeft” customize group for more custom options and faces.
-This returns a list of paths of the files that contains `search term`,
-ranked by relevance. The `0` and `10` means “return 10 results
-starting from the 0th place”, it is essentially used for paging. If
-you want all the result, use `0` and `999999`.
-
-When a file is modified, call `xeft-reindex-file` again on that file.
-If a file is removed, you don’t need to remove it from the database,
-it will be automatically removed. If the file has been indexed and
-haven’t been modified, `xeft-reindex-file` is (kind of) a no-op (i.e.
-fast).
-
-Both file path and database path must be absolute path.
-
-# How to use the note-taking interface
-
-It is essentially the same as [Zeft](https://github.com/casouri/zeft).
-To try it out, build the dynamic module or download prebuilt ones from
-release page. Then type `M-x xeft RET`.
-
-# How to build the dynamic module
+# building the dynamic module
To build the module, you need to have Xapian installed. On Mac, it can
be installed with macports by
@@ -65,7 +52,8 @@ make PREFIX=/opt/local
```
Here `/opt/local` is the default prefix of macports, which is what I
-used to install Xapian.
+used to install Xapian. Homebrew and Linux users probably can leave it
+empty.
# Beware
@@ -78,3 +66,35 @@ Xapian, without reading his code I wouldn’t be able to write
Xeft.
Also, if you want a more powerful searching experience, you will be
happier using notdeft instead.
+
+# How to use the dynamic module
+
+Because it’s so basic, the dynamic module is very easy to use and
+also very flexible. To index files, use
+
+```emacs-lisp
+(dolist (file (directory-files "my-note-dir"))
+ (xeft-reindex-file file dbpath))
+```
+
+This indexes each file in `my-note-dir`, saving them to the database
+at `dbpath`. If the database doesn’t exist yet, it is created.
+
+To search for a term, use
+
+```emacs-lisp
+(xeft-query-term "search term" dbpath 0 10)
+```
+
+This returns a list of paths of the files that contains `search term`,
+ranked by relevance. The `0` and `10` means “return 10 results
+starting from the 0th place”, it is essentially used for paging. If
+you want all the result, use `0` and `999999`.
+
+When a file is modified, call `xeft-reindex-file` again on that file.
+If a file is removed, you don’t need to remove it from the database,
+it will be automatically removed. If the file has been indexed and
+haven’t been modified, `xeft-reindex-file` is (kind of) a no-op (i.e.
+fast).
+
+Both file path and database path must be absolute path.
diff --git a/demo.gif b/demo.gif
new file mode 100644
index 0000000000..0538e249e5
Binary files /dev/null and b/demo.gif differ
- [elpa] externals/xeft 11cf93d3aa 06/55: Refactor the module, (continued)
- [elpa] externals/xeft 11cf93d3aa 06/55: Refactor the module, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 2b2c8e5925 09/55: Double-buffering, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 71d13999a7 13/55: Various fixes and improvements, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 6c94f7bdb4 18/55: * xeft.el (xeft-refresh): Fix to show the "create note" prompt., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft a3050c1596 20/55: * xeft.el (xeft-ignore-extension): Explain the option more clearly., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 035ae7f3d0 22/55: * xeft.el: Update commentary about 'xeft-recursive'., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft ad2d7b259d 23/55: Don't highlight short keywords., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 7646d9d254 24/55: * xeft-module.cc (copy_string): Remember to free string buffer., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 71febb833f 26/55: Improve latency, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 1c1b449d21 25/55: Add semicolon after macro, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 8b8c4bd37a 27/55: Improve README,
ELPA Syncer <=
- [elpa] externals/xeft 2b515faf2e 29/55: * xeft-module.cc (copy_string): Fix free statement;, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft b980aac44f 45/55: Pull xapian-lite from GitHub, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft ea43335993 35/55: Extend handled query syntax and document it, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft e694278a16 53/55: Improve auto-compile/download commands, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft cb4b595b6a 50/55: Update gitignore, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 3a60ed7639 36/55: Provide option to download dynamic module automatically, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 39430a861a 47/55: Update to v3.0, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft dd14e69939 33/55: * README.md: Remove text about the dynamic mocule., ELPA Syncer, 2023/01/13
- [elpa] externals/xeft f05eca90f6 46/55: * Makefile (CXXFLAGS): Remove -stdlib=libc++, ELPA Syncer, 2023/01/13
- [elpa] externals/xeft 270eeb1084 44/55: * xeft.el: Add version for package-vc-install., ELPA Syncer, 2023/01/13