this post was submitted on 22 Nov 2023
2 points (100.0% liked)

Emacs

311 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

As in topic, emacs normally open files in instant, but when autosave (#filename#) exists, it takes about 1 sec to open file.

Any idea how to fix this without disabling autosaves? It doesn't seem to be config problem since same happens with -Q flag.

top 4 comments
sorted by: hot top controversial new old
[–] nv-elisp@alien.top 1 points 11 months ago

M-x report-emacs-bug

[–] Observerdoubletwenty@alien.top 1 points 11 months ago (1 children)

I think it could be related to after-find-file, defined in lisp/files.el.

In the version in the master branch there's a call to sit-for. Unfortunately it seems to be hard-coded with a 1 second interval, so you'll probably have to redefine this function.

[–] materus@alien.top 1 points 11 months ago (1 children)

Yes, that's it. I got answer for bug report:

"This is a feature: we let the user see the message and wait for 1 sec
after showing it, to make sure this particular message is not
immediately replaced by some others.  From after-find-file:

      (when (and warn msg)
        (message "%s" msg)
        (or not-serious (sit-for 1 t))))
                        ^^^^^^^^^^^^^
(The value of not-serious is nil in this case.)

This is not a bug."

[–] noooit@alien.top 1 points 11 months ago

Wow, this is really dumb in a single threaded event driven code base. I hope they replace with some popup or equivalent.