Comments (19)
I'm also having this issue, or at least experiencing something similar. I have some files on a remote directory, which I'm accessing from a Windows machine and a Linux machine.
With the same file open on both machines, changes on one machine don't show up on the other (e.g. I edit the file on Linux, but the changes don't show up in Atom on Windows). However, if I edit the file with an external editor, the changes will show up on the local machine; for example, editing the file with Vim on Linux makes the changes show up in Atom on Linux, and editing the file with Sublime on Windows makes the changes show up in Atom on Windows. The issue seems to be that changes done from a remote machine don't get caught on any local machines.
The desired behavior of remote edits showing up locally works in Sublime, so I suspect that it should be somehow possible in Atom. I might hack around with the code later and see if I can figure anything out.
from file-watcher.
I think this might be the same 'lack of notify' issue that affects files mounted via sshfs
(#5). How are you sharing/mounting files between the host and guest, samba?
from file-watcher.
I think this might be the same 'lack of notify' issue that affects files mounted via sshfs (#5). How are you sharing/mounting files between the host and guest, samba?
Yes, I'm using Samba for that. I noticed that Atom properly reloads the file when it is changed from outside the editor, and the file lies in the same machine. So maybe this is a more generic problem?
But as "noyouaretheman" said, this works properly in Sublime.
I have a ticket opened in Atom's main repository:
atom/atom#12263 (comment)
from file-watcher.
I think this might be the same 'lack of notify' issue that affects files mounted via sshfs (#5). How are you sharing/mounting files between the host and guest, samba?
I'm using NFS. I wouldn't be surprised if this issue is related to #5.
from file-watcher.
Perhaps something like this can help you? I was considering a similar hacky solution to the mute mount problem. It's all very medieval.
https://github.com/rubyruy/watchntouch
from file-watcher.
Alternatively Samba 4.3 looks like it might have more support for change events:
https://wiki.samba.org/index.php/Samba_4.3_Features_added/changed#New_FileChangeNotify_subsystem
from file-watcher.
Ah! I might be able to put in a config option to switch to use fs.watchFile, if you know you are going to be using a mounted share. Let me look into that.
from file-watcher.
Hi, any update on this ? I recently switched form Sublime to Atom and that's the only feature I'm missing from Sublime. I only work on remote files on a local SMB server. (v4.3.11)
from file-watcher.
So after a lot of fighting with fs.watchFile
and the current solution I was able to get this running for SSHFS. I should be pushing a new version tonight with this as an option.
from file-watcher.
from file-watcher.
Hi again,
- When I edit a file from Sublime on the same computer where Atom is it works, it reloads the file correctly.
- When I edit a file from the smb server directly on Ubuntu it works, it reloads the file correctly.
- But, when the file is edited from another computer (connected to the SMB server), either on Sublime or Atom, I get the notification that the file has been edited but if i click "Reload", it does nothing, nor if I click on compare (it opens a new tab with the same file with no change).
Both computers are on macOS Sierra, and as I said before the SMB server is on v4.3.11.
from file-watcher.
- What does Sublime do in the 3rd scenario?
- What do you see when you close and re-open the file?
What concerns me is the 'compare' option reads from the disk directly and should get the latest version that is available. I am wondering if something is happening with Samba and a delay, or some file system peculiarity that is not updating?
from file-watcher.
I'm going to reopen this temporarily.
from file-watcher.
- Sublime does nothing more than Atom, the file is just edited from another computer than mine, and I tried both in Atom and Sublime to see if it had to do something with the editor the file is edited from.
- If I close and then reopen the file in Atom (cmd + shift + t) the file is updated, that's usually what I do given that the plugin doesn't work for me.
Yep, I don't about the compare option, like I said if I click it it just open a new tab in a new pan with the same file without the changes.
Edit:
I made a video : https://cloudup.com/cPGQeFcyl5P
from file-watcher.
Reporting that it doesn't work even when 'use Watchfile' after atom reload (unless it requires reboot or unmount)
#apm -v
apm 1.15.3
npm 3.10.5
node 4.4.5 x64
python 2.7.12
git 2.7.4
#atom -v
Atom : 1.15.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
#sshfs -V
SSHFS version 2.8
FUSE library version: 2.9.4
fusermount version: 2.9.4
using FUSE kernel interface version 7.19
from file-watcher.
Hi, this issue still exists so I'd like to provide you more info.
I'm using Atom on Windows and a SMB network drive. Whenever I change a file using external editor, Atom immediately shows that there are unsaved changes and the name of the file in an opened tab changes (from "file_name.txt - project_name" to "file_name.txt~"). When using WatchFile, sometimes notification appears but Compare and Reload just open a blank file. When using Reload the filename still is "file_name.txt~" which might be the reason why it doesn't work the same way as for local files
from file-watcher.
This issue also exists for me. I mount a directory from computational server by SSHFS and open file which contains numerical results. Every time my computation is done it adds a new results to the file. Unfortunately I don't see them in atom. Closing file and reopening works, but that's not a solution. My settings are:
- Reload Auto: OFF
- Prompt on Change: OFF
- Include the Compare option: ON
- Use WatchFile: ON
What's interesting, when "Prompt on Change" is ON, then everything works fine. But of course it's amazingly annoying, because file changes very frequently.
Another interesting thing, nano also doesn't show new lines even when I turn it off and on. But it shows from another terminal window. Vim and tail works ok.
from file-watcher.
Forget the 'lack of notify'. Why don't you check if the file was changed on focus? (like eclipse, gedit and many other apps)
And also, more importantly, on save.
from file-watcher.
New version should help - there have been some updates to Atom that I needed to accommodate
from file-watcher.
Related Issues (20)
- Path must be a string. Received undefined
- Changing Branchs HOT 3
- Add "Reload All" option HOT 5
- Reload all changes of the same file together HOT 1
- No prompt when using filezilla HOT 3
- File is not updated in Atom when it was edited outside Atom HOT 3
- Uncaught TypeError: this.editor.buffer.updateCachedDiskContents is not a function HOT 3
- Is there a way to make it work with PyCharm 'safe write'? HOT 1
- Failed to load the file-watcher package HOT 4
- Only show message once when file is foreground
- Uncaught (in promise) Error: Invalid encoding name: windows1252 HOT 2
- The plugin is not working with Atom 1.23.3 and macOS 10.13.2 HOT 1
- Prompt on change does not work on nfs files changed outside Atom HOT 1
- Not prompting on change and reloading automatically even with option turned off. HOT 4
- "Mounted file systems" in documentation is misleading. HOT 2
- file-watcher is completely inconsistent HOT 4
- AutoReload to confirm only if has unsaved changes
- Add an option to avoid bringing the atom window to the foreground when a file has changed HOT 2
- File won't reload when doing "git checkout"
- How this work in VisualCode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from file-watcher.