From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jiege Chen Newsgroups: gmane.emacs.devel Subject: Re: Emacs does not detect a buffered file got deleted Date: Wed, 10 Aug 2016 00:52:58 +0000 (UTC) Message-ID: References: <83twevia3v.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470790407 9301 195.159.176.226 (10 Aug 2016 00:53:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2016 00:53:27 +0000 (UTC) User-Agent: NewsTap/5.1.8 (iPad) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 10 02:53:24 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXHlr-0002J5-Ln for ged-emacs-devel@m.gmane.org; Wed, 10 Aug 2016 02:53:23 +0200 Original-Received: from localhost ([::1]:38758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXHlo-0005lL-M3 for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2016 20:53:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXHlh-0005l8-TL for emacs-devel@gnu.org; Tue, 09 Aug 2016 20:53:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXHld-0002wB-N3 for emacs-devel@gnu.org; Tue, 09 Aug 2016 20:53:12 -0400 Original-Received: from [195.159.176.226] (port=47014 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXHld-0002ve-GP for emacs-devel@gnu.org; Tue, 09 Aug 2016 20:53:09 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bXHlY-0001uy-0S for emacs-devel@gnu.org; Wed, 10 Aug 2016 02:53:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 59 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Jbucy3tdun8LuY4ZjxcVH/nks/U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:206524 Archived-At: On the contrary, I prefer the GNU Emacs way. Please make this as the default if you create a new defcustom. 路客 wrote: > Nope, it's not an issue at all; it's just for user-convenience. Whether > convenient or not is of course personal but some modern editors like > notepad++, ultraedit ... already doing this for some time. VIM does not > detect that either, but gvim did give us a warning about file no longer > there. Here I'm just trying to match some modern editor behavior. One > sample issue is that when switching between git branches I sometimes find > I'm still editing a file that's already not there > (moved/deleted/included-into-other-file by others), till I do "git status" > or "git add" and then find out the fact. > > Of course it won't be difficult to add an extra mode to do that but I'm > just thinking it should be easier to fix it from the origin. Remove that > test condition and modify `ask-user-about-supersession-threat' to detect > file deletion. > > Well, if no one think it's a good idea I will draw back my proposal then > and patch it in my own local system, or maybe a minor mode then. Thanks! > > 2016-08-08 22:55 GMT+08:00 Eli Zaretskii : > >>> From: 路客 >>> Date: Mon, 8 Aug 2016 16:55:55 +0800 >>> Cc: Emacs developers >>> >>> Yes, I understood that. My intention is to notify the user about the >> deletion but not >>> really want to revert the file. Emacs provide other options other than >> reverting. A >>> "revert" here might mean "close this buffer". However,this might need >> further >>> modification to notify the user about the deletion instead of the normal >> modification >>> notification. Using the original `ask-user-about-supersession-threat' >> might be a bit >>> confusing if file is deleted. What do you think? >> >> Emacs doesn't do anything like that anywhere else, AFAIK. Not even >> auto-revert mode does something like that for deleted files. I'm not >> sure I see good reasons to do anything in this particular case. >> >> Let me turn the table and ask you what kind of trouble you saw with >> buffers whose files were deleted by Git (or any other VCS)? Why would >> you like Emacs to do something special in this case? An extra buffer >> is a non-issue in Emacs. >> >> Thanks. >> > > > -- Jiegec