[Idle-dev] [ idlefork-Feature Requests-761226 ] cannot reopen file
easily
SourceForge.net
noreply at sourceforge.net
Mon Aug 23 05:23:32 CEST 2004
Feature Requests item #761226, was opened at 2003-06-26 10:45
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=359579&aid=761226&group_id=9579
Category: None
Group: None
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Kurt B. Kaiser (kbk)
Summary: cannot reopen file easily
Initial Comment:
It is not possible to reopen a file in the editor if it is
changed from outside. You will have to close the editor
window and open the file again. Just open the file
in the editor will leave the contents unchanged.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2004-08-22 23:23
Message:
Logged In: YES
user_id=6380
I wasn't talking about two Emacsen interacting (I rarely
have more than one running and it's almost always by
mistake). Emacs does a super job of detecting that some
other tool (e.g. source control!) touched a file. I guess
the algorithm is something like
- save the mtime when first opening
- upon first change, see if the mtime didn't change
- upon save, see again if the mtime didn't change
If the mtime did change, various interaction take place to
decide whether to cancel the operation or go ahead despite
the change.
----------------------------------------------------------------------
Comment By: Kurt B. Kaiser (kbk)
Date: 2004-08-22 22:43
Message:
Logged In: YES
user_id=149084
Ah, yes, the /other/ editor. Emacs, I presume, also my
/other/ editor. Emacs has a rather sophisticated locking
feature involving symlinks which detects at the first
keystroke that another emacs has modified the file.
IDLE could interact with that implementation, but I
assume that you'd be satisfied if IDLE imitated the
(if (buffer-modified-p buf)
"File %s changed on disk. Discard your edits? "
"File %s changed on disk. Reread from disk? ")
behavior when the disk file was modified by another
application. This would involve adding the equivalent
to (verify-visited-file-modtime buf) and an associated
EditorWindow modtime attribute.
When the file is saved IDLE could then also detect a time
mismatch and warn the user that he was about to overwrite
a modified file.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2004-08-22 00:51
Message:
Logged In: YES
user_id=6380
Hm, *I* would find it extremely useful. The other editor I
use a lot has several features relating to this issue, and I
*depend* on them.
----------------------------------------------------------------------
Comment By: Kurt B. Kaiser (kbk)
Date: 2004-08-21 23:12
Message:
Logged In: YES
user_id=149084
This is an RFE which I believe would find limited use.
Calling an Open dialog on a file which is already open
merely wakes up the associated window. Doing what
this RFE asks would require tracking the modification
times of open files and comparing upon re-open.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=359579&aid=761226&group_id=9579
More information about the IDLE-dev
mailing list