[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs does not detect a buffered file got deleted
From: |
Jiege Chen |
Subject: |
Re: Emacs does not detect a buffered file got deleted |
Date: |
Wed, 10 Aug 2016 00:52:58 +0000 (UTC) |
User-agent: |
NewsTap/5.1.8 (iPad) |
On the contrary, I prefer the GNU Emacs way. Please make this as the
default if you create a new defcustom.
路客 <address@hidden> 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 <address@hidden>:
>
>>> From: 路客 <address@hidden>
>>> Date: Mon, 8 Aug 2016 16:55:55 +0800
>>> Cc: Emacs developers <address@hidden>
>>>
>>> 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