emacs: fix some synchronization issue