all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: 路客 <luke.yx.lee@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Andreas Schwab <schwab@suse.de>, Emacs developers <emacs-devel@gnu.org>
Subject: Re: Emacs does not detect a buffered file got deleted
Date: Tue, 9 Aug 2016 09:02:00 +0800	[thread overview]
Message-ID: <CAA=xLRMuo_7-w9C2t-h44SjY8NxA8s4-o8hSwzFupYj7aH-=rg@mail.gmail.com> (raw)
In-Reply-To: <83twevia3v.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2221 bytes --]

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 <eliz@gnu.org>:

> > From: 路客 <luke.yx.lee@gmail.com>
> > Date: Mon, 8 Aug 2016 16:55:55 +0800
> > Cc: Emacs developers <emacs-devel@gnu.org>
> >
> > 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.
>



-- 
Best regards,
Luke Lee

[-- Attachment #2: Type: text/html, Size: 2908 bytes --]

  reply	other threads:[~2016-08-09  1:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08  3:33 Emacs does not detect a buffered file got deleted 路客
2016-08-08  8:02 ` Andreas Schwab
2016-08-08  8:55   ` 路客
2016-08-08 14:55     ` Eli Zaretskii
2016-08-09  1:02       ` 路客 [this message]
2016-08-10  0:52         ` Jiege Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA=xLRMuo_7-w9C2t-h44SjY8NxA8s4-o8hSwzFupYj7aH-=rg@mail.gmail.com' \
    --to=luke.yx.lee@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.