From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier 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 23:36:01 -0500 Message-ID: References: <83txehxt42.fsf@gnu.org> <87mwk9uwt1.fsf@gmx.de> <83k3fcy82u.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386736581 23264 80.91.229.3 (11 Dec 2013 04:36:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Dec 2013 04:36:21 +0000 (UTC) Cc: Michael Albinus , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 11 05:36:26 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 1VqbX8-00074J-9Y for ged-emacs-devel@m.gmane.org; Wed, 11 Dec 2013 05:36:26 +0100 Original-Received: from localhost ([::1]:52797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqbX7-0005zS-Iv for ged-emacs-devel@m.gmane.org; Tue, 10 Dec 2013 23:36:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqbWy-0005xq-7J for emacs-devel@gnu.org; Tue, 10 Dec 2013 23:36:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqbWq-0001iR-U5 for emacs-devel@gnu.org; Tue, 10 Dec 2013 23:36:16 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqbWq-0001iI-OS; Tue, 10 Dec 2013 23:36:08 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rBB4a1ZF003654; Tue, 10 Dec 2013 23:36:02 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F2E65AE321; Tue, 10 Dec 2013 23:36:01 -0500 (EST) In-Reply-To: <83k3fcy82u.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 10 Dec 2013 18:38:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4788=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4788> : inlines <301> : streams <1088870> : uri <1620552> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:166280 Archived-At: >> >> 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). >> > It's up to the user to say whether she wants to watch the symlink or >> > its target, I think. autorevert cares about keeping the buffer in sync with the contents of the file available at buffer-file-name. So the user has already said what she wants. This need could occur in other circumstances as well: inotify and friends usually work at a "shallow" level whereas many uses of file-tracking care about the contents (hence following any indirections like symlinks as deeply as needed). So a good "notification" Elisp API should probably provide the feature. >> In general I agree. But Stefan was commenting on my change in >> autorevert.el. Here it is obvious, that the target shall be watched. >> I believe. > What if the target is a directory? I don't understand your question: whether the target is a directory or not doesn't seem to make any difference. Stefan