2

In Ubuntu, when I make change to directories or files outside emacs, it seems that emacs doesn't get the update.

For example, C-x C-f can't track the current directory which was just moved elsewhere outside emacs.

Another example: in a shell created by C-x shell, the autocompletion of directory or file name doesn't work, if the current directory has been moved elsewhere outside emacs.

Can I make emacs get the update made outside emacs? Thanks.

  • 1
    I haven't seen that problem. Many time, I rename/delete/update a file outside of emacs and I have always seen that file buffer begin marked as modified when I revert that buffer (or almost immediately if auto-revert-mode is on). Can you please give a set of steps on how to recreate that problem in an emacs -Q session? – Kaushal Modi Mar 8 '16 at 20:21
  • I sometimes run in similar issues, esp. when I delete the shell's current directory, but it's hard to reproduce it. Typically, just killing the shell buffer and then starting a new one solves it. – wvxvw Mar 8 '16 at 21:51
  • I build it from the source code. Works like a charm! – Bill Zimmerly Mar 8 '16 at 22:09
4

Well, Emacs is able to acknowledge changes outside, as long as the result is a file / directory with the same name. This includes temporary deletion and renaming. A renaming of a file or directory outside of Emacs is not visible to Emacs, because it has no information what the renamed file / directory shall be.

Starting with Emacs 24.5, Emacs supports file notifications from the underlying OS for some platforms. This could be used to be aware of renaming a file / directory outside of Emacs. But this feature hasn't been implemented yet, as far as I am aware of.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.