hasu / notdeft

NotDeft note manager for Emacs
https://tero.hasu.is/notdeft/
170 stars 14 forks source link

set `notdeft-xapian-program` to nil has not effect according to notdeft-xapian.el docstring #11

Closed snowman closed 4 years ago

snowman commented 4 years ago

https://github.com/hasu/notdeft/blob/17aff325d78a6272f5f4daac71dc33979f851ce8/notdeft-xapian.el#L16-L24

HERE:

 When nil, incremental search is limited to files 
 in the current `notdeft-directory' (if any)." 

Steps to reproduce:

## org-notes content
$ find ~/org-notes -type f -name '*.org' | xargs -I% bash -c "echo -e '\nFILE: %'; cat %"

FILE: /home/delta/org-notes/banana/kernel.org
hello, I'm Mr banana kernel.

FILE: /home/delta/org-notes/apple/juice.org
This is an apple juice.
$ cat ~/test.el
(add-to-list 'load-path "~/notdeft")
(load "notdeft-example")

(setq notdeft-xapian-program nil)  ;; test point

(setq notdeft-directories '("~/org-notes/apple" "~/org-notes/banana"))

(setq notdeft-directory "~/org-notes/apple")

(notdeft)

$ emacs -nw -Q ~/test.el
M-x eval-buffer RET

1580218456

If the docstring is correct(though not my wish), it should display This is an apple juice. item alone instead of two items. so I guess the docstring is outdated, needs to be update.

hasu commented 4 years ago

You're right, out of date it was. Thanks for the report.