jrblevin / deft

Deft for Emacs
http://jblevins.org/projects/deft/
719 stars 88 forks source link

Auto-refresh deft file list #53

Open jaanli opened 6 years ago

jaanli commented 6 years ago

Here is my deft config:

(global-set-key (kbd "<f8>") 'deft)
(setq deft-use-filename-as-title t)
(setq deft-use-filter-string-for-filename t)
(setq deft-directory "/Users/jaan/Library/Application\sSupport/Notational\sData")
(setq deft-extension "txt")
; associate files in deft directory with org mode
(add-to-list 'auto-mode-alist '("/Users/jaan/Library/Application\sSupport/Notational\sData/.*[.]txt$" . org-mode))

This lets deft sync with Simplenote (via Notational Velocity and the nvAlt app) so I can access my notes from multiple devices, but lets me use org-mode to take notes on my laptop.

However, if I create a file with Simplenote (in the directory above) existing Deft sessions will not update and new files do not show up.

I need to kill the buffer and reopen Deft to see the latest files in the Deft directory.

It would be nice if Deft sessions checked for changes to the file list every second or minute.

jrblevin commented 6 years ago

Great idea, thanks!

jrblevin commented 6 years ago

Instead of killing the buffer and restarting, you can refresh with C-c C-g (deft-refresh).

jasonzhouu commented 6 years ago

but C-g is also the keybinding of command "keyboard-quit", which will cancel former C-c