Summary: | warn on opening again the same file but as a link | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Maciej Pilichowski <bluedzins> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | wishlist | CC: | christoph, jowenn |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Maciej Pilichowski
2006-12-22 18:42:22 UTC
On Friday 22 December 2006 18:42, Maciej Pilichowski wrote:
> Open two documents, A and B, but B is a symlink to A. Edit one of them.
> Kate will show quite puzzling warning, about __external__ modification.
Thank you for noticing this.
I think we should check if file is a softlink and if so check if the target is
open before opening it. And if a file is a softlink, we might keep that data
in the document manager, so that we can easily check before opening new
files.
-anders
I think for a softlink we should just follow the link and open the link target and don't care that originally the softlink was handed over to findDocument or openUrl. Joseph, what is the sane case of opening the same document twice (and the duplicate via link)? It is rather more likely it was accident. So user should get some information/warning -- after all it is much easier for computer to track opened documents than for human. I'm not completely sure, but I guess the most transparent case for the user would be the folllowing, I could be wrong though: scenario: ~/softlink -> ~/realfile: case a: 1. opening ~/softlink: resolve link, open ~/realfile and display ~/realfile as opened 2. opening ~/realfile: file is not opened again, since it has already been opened in 1, just open the view of the existing document case b: 1.: opening ~/realfile: just open the file and display it as opened 2.: opening ~/softlinkg: resolve softlink -> check if target has been opened, this is the case -> just open a view of the existing document The same strategy would apply for symlinked symlinks ... Exactly. Plus in (2) steps -- show a little tooltip ("the file is already opened"), because it is not obvious user would know what is going on. Do you think the tooltip is really necessary? If yes, we have to wait for KDE 4.3, if not I could perhaps add it for 4.2 as a regular bug fix Tooltip -- in general, yes. Principle of the least surprise: when user opens literally the same file it is easy to notice what happened, but it is not if the filenames are different. So giving user a hand is important here. This is btw. a new feature, no bug. We should not start to mess around with this, we use URLs everywhere anyway and don't want always to go through this islocal => file => resolve => file => url... Beside it might confuse people if we resolve symlinks in between as the url looks completly different to what they think. |