spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Switching back to Emacs causes the warning "recentf mode: Non-character input-event".

Open 3rd3 opened this issue 9 years ago • 24 comments

Description

When reactivating Emacs I often get the following warning: recentf mode: Non-character input-event. I couldn't find a way to reliably reproduce the warning.

System Info

  • OS: darwin
  • Emacs: 25.1.50.1
  • Spacemacs: 0.105.14
  • Spacemacs branch: master (rev. a298a5a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((ibuffer :variables ibuffer-group-buffers-by nil)
 (ranger :variables ranger-ignored-extensions
         '("mkv" "iso" "mp4" "avi" "mp4" "mkv" "zip" "rar" "exe" "ps" "webm" "png" "jpg" "jpeg" "tif" "tiff" "ics" "dmg" "swf" "gz" "m4a")
         ranger-max-preview-size 4 ranger-cleanup-eagerly t)
 (latex :variables latex-enable-auto-fill t)
 org git github version-control finance extra-langs markdown emacs-lisp haskell html javascript ipython-notebook shell-scripts java
 (haskell :variables haskell-enable-ghc-mod-support nil haskell-enable-ghci-ng-support t haskell-enable-hindent-style "gibiansky" haskell-enable-shm-support nil)
 (c-c   :variables c-c  -enable-clang-support t)
 gtags
 (python :variables python-test-runner 'pytest)
 (clojure :variables clojure-enable-fancify-symbols t)
 (shell :variables shell-default-height 20 shell-default-position 'bottom shell-enable-smart-eshell t shell-default-shell 'eshell)
 evil-commentary)

3rd3 avatar Mar 21 '16 14:03 3rd3

This appears to be related to the recentf lockfile bug #5186. The mini-buffer asks what to do about the lock. When one overlooks the warning, the buffer gets confused by other input events (possibly command, tab keys or the mouse?). Disabling lockfiles using (setq create-lockfiles nil) does the trick for now.

3rd3 avatar Jun 10 '16 12:06 3rd3

I get it as well

andreimc avatar Jun 19 '16 02:06 andreimc

There might be ways to handle input in these kinds of cases without getting an error: http://emacs.stackexchange.com/questions/12468/making-read-char-input-robust

But this is appears to be just a minor bug (unless it also occurs in different situations). #5186 is more important.

3rd3 avatar Jun 19 '16 09:06 3rd3

Same issue here :(

fsegouin avatar Feb 08 '17 19:02 fsegouin

It's just started happening for me 2 days ago as well :(

socketwiz avatar Feb 23 '17 18:02 socketwiz

👍 affects me as well

Kukunin avatar Mar 22 '17 13:03 Kukunin

Me too, since 2 days. :I

fabrik42 avatar Mar 28 '17 11:03 fabrik42

Me too, as of yesterday...

paultopia avatar Jun 14 '17 15:06 paultopia

Interestingly this bug has never occurred to me in a long time now. However, I don't know what I changed since then. Perhaps try updating both Emacs (to 25.2.1) and Spacemacs (to 0.200.9) and also recompile all packages (try calling spacemacs/recompile-elpa, or alternatively delete all .elc files from elpa subdirectories).

3rd3 avatar Jun 14 '17 21:06 3rd3

Any stable solution now? I meet this problem every time I open emacs after sleep the computer.

Reapor-Yurnero avatar Jul 04 '17 03:07 Reapor-Yurnero

it just started happening again to me out of nowhere today.

paultopia avatar Jul 11 '17 22:07 paultopia

I have the same issue since a week. Any solution for it?

fladd avatar Feb 25 '18 12:02 fladd

Adding the following to your init is not a solution, but works around the issue. Shouldn't have any unintended consequences unless editing the same file simultaneously in multiple editors - i guess.

  (defun ask-user-about-lock (file other-user)
  "A value of t says to grab the lock on the file."
   t)

dangom avatar Feb 28 '18 14:02 dangom

I'm getting this issue now on latest develop. Is anyone else still suffering from it.

mijoharas avatar Sep 21 '18 09:09 mijoharas

I have gotten this error recently, within the past week at least. I usually get the error in this ticket's title after Emacs asks me if I want to steal the lock file, particularly if I don't notice the prompt and just (I think) C-g over it (because I have no idea what's going on and I just want to edit my file).

On my Mac I suspect this is caused by the host name changing due to DHCP and VPN (Tunnelblick, OpenVPN). When I first come out of sleep my host name is probably something like foo.local, then after macOS gets DHCP going it becomes foo.myhomedomain.com, then my VPN kicks in a few seconds later and changes the host name to foo.mycompany.com. When I come out of sleep I am betting Emacs creates a lock file with, say, foo.local in the file name, then it goes to touch the lock file again a little later, but now the host name has changed so it doesn't think it owns the lock file with foo.local in it anymore.

I came to this hypothesis after noticing it only happens when I come out of sleep, and that the host name in the file it's asking about doesn't match the output of "hostname".

dsedivec avatar Sep 26 '18 13:09 dsedivec

Also getting this on the latest develop with GUI after I tried to run emacs from terminal a few times.

kimonoki avatar Oct 11 '18 01:10 kimonoki

I am experiencing this also and it is similar with @dsedivec 's case , when I come out of sleep but in my case sleep also includes when I don't do anything with emacs for a period of time.

iamriel avatar Oct 11 '18 07:10 iamriel

I'm experiencing this in master. Happens when my macs comes out of sleep. I have split windows but it only happens in one buffer at a time.

emmanuj avatar Apr 04 '19 13:04 emmanuj

I'm having this problem in development branch.

denisse-dev avatar Jun 04 '19 16:06 denisse-dev

Adding the following to your init is not a solution, but works around the issue. Shouldn't have any unintended consequences unless editing the same file simultaneously in multiple editors - i guess.

  (defun ask-user-about-lock (file other-user)
  "A value of t says to grab the lock on the file."
   t)

I faced this issue too with a single user, single emacs instance (dev branch). @dangom 's code "fixed" it for me.

neo-anderson avatar Jul 01 '19 21:07 neo-anderson

I have the problem in version [email protected] (spacemacs). My Macbook Pro is docked into a docking station that is connected via LAN. The WLAN is a different network. When changing between both networks my host name changes also.

Whenever my laptop wakes up from sleeping and I have an open spacemacs the recentf warning will appear.

lschuetze avatar Mar 17 '20 11:03 lschuetze

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Mar 17 '21 11:03 github-actions[bot]

I am getting the same issue on Emacs 27.1. I added @dangom 's workaround.

pprevos avatar Jun 22 '21 02:06 pprevos

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar May 01 '24 16:05 github-actions[bot]