From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r115439: * autorevert.el (auto-revert-notify-add-watch): Do not handle symlinked files. Date: Tue, 10 Dec 2013 05:37:06 +0100 Message-ID: <87siu1uxsd.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386650256 21286 80.91.229.3 (10 Dec 2013 04:37:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2013 04:37:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 10 05:37:41 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VqF4n-0005Nv-24 for ged-emacs-devel@m.gmane.org; Tue, 10 Dec 2013 05:37:41 +0100 Original-Received: from localhost ([::1]:47169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqF4m-0004IH-Jn for ged-emacs-devel@m.gmane.org; Mon, 09 Dec 2013 23:37:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqF4e-0004I3-D1 for emacs-devel@gnu.org; Mon, 09 Dec 2013 23:37:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqF4Y-0006Al-RA for emacs-devel@gnu.org; Mon, 09 Dec 2013 23:37:32 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:50845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqF4Y-00069o-Hj for emacs-devel@gnu.org; Mon, 09 Dec 2013 23:37:26 -0500 Original-Received: from detlef.gmx.de ([87.146.36.199]) by mail.gmx.com (mrgmx103) with ESMTPS (Nemesis) id 0LjZn2-1VJ67A3Vfs-00bZZf for ; Tue, 10 Dec 2013 05:37:25 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 09 Dec 2013 21:30:53 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:05ZIvHciSmwpgfFW46JImIrGV5FDVJT3rZVptRQyutEkin/amOp Bwcz28ObHymorGUl3tLi83xeiI48DfRO/SbtwE5aW39/QL9nAvH0pyJZvpmoAI/tzrQ8Etx Kelz0JB8UAsH3878JH7fyWpTHcWydJahe9pV7IcU44C8uhQB03g1rsj+SOM53xxY0ED0bYX MgA9uBpkHwzYFEvFpl+GQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166252 Archived-At: Stefan Monnier writes: >> + (when (or (string-match auto-revert-notify-exclude-dir-regexp >> + (expand-file-name default-directory)) >> + (not (file-symlink-p buffer-file-name))) > > I think this patch is acceptable, but if/when we try to write a generic > file-watcher Elisp API, it would be good to make this work (probably by > adding a watcher on the symlink's target). That was my first idea, too. But when I tried to implement this, there were too much performance penalties, which would eat the advantages of file notifications. So I've decided to exclude symlinks, at least until there's a better way to support symlinks. As far as I am aware, inotify could support symbolic links and their targets. For glib it seems to depend on the implementation. For kqueue (*BSD, Mac OS X; candidate as further basic library) I don't know how it is handled. In short, it might be necessary to extend the filenotify.el API and the underlying libraries in order to determine how to handle symlinks. Nothing we should do days before the feature freeze, IMHO. > Stefan Best regards, Michael.