hasu / notdeft

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

Unable to clear the notdeft filter after query using TAB #3

Closed kaushalmodi closed 6 years ago

kaushalmodi commented 6 years ago
  1. In initiate a query after hitting TAB, like title:sed.
  2. It works, and shows the filtered notes with the title "sed".
  3. But then I am unable to clear that query.. example, C-c C-c does not work.

I get this:

image

If I try to manually delete the "title:sed:" portion, it gives an error saying that the buffer is read-only.. looks like that filter string is made non-editable?

For now, the only option that I have, it seems, is to kill that *NotDeft* buffer.

hasu commented 6 years ago

Not sure if these are documented at all, but to clear a query, you can

  1. press TAB and enter the empty string, or
  2. press S-TAB, or
  3. C-u C-c C-c also works for clearing the query in addition to any filter string.

I'll look at improving the docs on this query-then-filter modality and the relevant keybindings.

Yes, the *NotDeft* buffer is read only, and cannot be edited directly, although as in Deft, most keys without modifiers do cause editing of the filter string.

kaushalmodi commented 6 years ago

C-u C-c C-c also works for clearing the query in addition to any filter string.

Thanks! C-u C-c C-c works.. But is there a reason C-c C-c is not designed to reset the query?

hasu commented 6 years ago

C-c C-c' clears the filter in Deft, and nothing more, so that's just retaining the same semantics. The note directory being filtered does not change in Deft withC-c C-c', and equivalently in NotDeft the query whose results are being filtered does not change.

I like this behavior since you can use notdeft-query-edit' to set some search terms to define a "topic area", and then conveniently do filtering on notes about that topic, editing with the familiarC-c C-c', `M-DEL', etc. without accidentally clearing the query.

kaushalmodi commented 6 years ago

Thank you for that explanation :+1:. It makes sense.