From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18009: 24.4.50; Add hooks for `rename-file' and `delete-file' Date: Fri, 18 Jul 2014 22:34:21 -0400 Message-ID: References: <16c1eba0-7848-497c-8aef-cf3d02f2decd@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405737329 9030 80.91.229.3 (19 Jul 2014 02:35:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jul 2014 02:35:29 +0000 (UTC) Cc: 18009@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 19 04:35:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1X8KUa-0000Mx-Pi for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jul 2014 04:35:20 +0200 Original-Received: from localhost ([::1]:52727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8KUa-0002Tk-Br for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 22:35:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8KUQ-0002PB-79 for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 22:35:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8KUI-0000U7-LF for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 22:35:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8KUI-0000Ts-IM for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 22:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X8KUI-0008N1-9U for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 22:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jul 2014 02:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18009 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18009-submit@debbugs.gnu.org id=B18009.140573727132136 (code B ref 18009); Sat, 19 Jul 2014 02:35:02 +0000 Original-Received: (at 18009) by debbugs.gnu.org; 19 Jul 2014 02:34:31 +0000 Original-Received: from localhost ([127.0.0.1]:58771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X8KTl-0008MF-Ua for submit@debbugs.gnu.org; Fri, 18 Jul 2014 22:34:30 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32145) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X8KTj-0008M0-2J for 18009@debbugs.gnu.org; Fri, 18 Jul 2014 22:34:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABTBoMGg0q9L4MOgRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReON0MHhDgEqRmBaoNMIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABTBoMGg0q9L4MOgRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReON0MHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="77961387" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Jul 2014 22:34:21 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3AB58664B7; Fri, 18 Jul 2014 22:34:21 -0400 (EDT) In-Reply-To: <16c1eba0-7848-497c-8aef-cf3d02f2decd@default> (Drew Adams's message of "Sat, 12 Jul 2014 15:31:49 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91647 Archived-At: > Please add a hook for each of these basic operations. It is not unusual > to want to be able to carry out some action associated with > (successfully) renaming or deleting a file. The hooks would be run at > the end of the operation, and only upon success. It's not unreasonable, but these are rather low-level operations, I'm not sure I want to run hooks from them. > One use case: Bookmark+ autofile bookmarks have the same name as their > files. (There can be multiple bookmarks with the same name, > corresponding to files with the same name in different directories.) > With a hook it would be trivial to automatically rename or delete the > associated bookmark. Of course you can use an `advice' in the mean time, but maybe a better long-term answer is the file-notification API so that your code would know about renames not only when they're performed from the same Emacs session but also from any other process. Stefan