From 93472e5c57f42b4b50422e3bd83631d8a53e9062 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 21 May 2025 22:14:36 -0400 Subject: [PATCH] Try fixing autorevert --- global.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/global.org b/global.org index f8cd4f2..854a732 100644 --- a/global.org +++ b/global.org @@ -3009,6 +3009,21 @@ #+begin_src emacs-lisp (require 'word-count) #+end_src +** try fixing autorevert + This patches the inotify watch to follow symlinks. It is + particulary useful for my setup where stuff is in symlinked + directories (e.g. to tmpfs or to cloud providers) + #+begin_src emacs-lisp + (defun file-notify--add-watch-inotify (_file dir flags) + "Add a watch for FILE in DIR with FLAGS, using inotify." + (inotify-add-watch dir + (append + (and (memq 'change flags) + '(create delete delete-self modify move-self move)) + (and (memq 'attribute-change flags) + '(attrib))) + #'file-notify--callback-inotify)) + #+end_src ** COMMENT gist Use [[https://github.com/defunkt/gist.el][gist.el]] #+begin_src emacs-lisp