1

I'm running the emacsformacosx.com build of Emacs 25.2.1 in daemon mode. I connect to it through emacsclient invoked from various tmux sessions in macOS Terminal. $TERM is xterm-256color. The daemon process is long-running, ideally lasting for days or weeks until a reboot is required.

At first everything is fine, but font locking eventually craps out. Here's an example from an orgmode buffer:

Example of borked font locking

There is a link around the "This is a link" line. Everything after should be regular text.

It's not orgmode-specific. Other modes exhibit similarly weird effects, as if font lock is getting slightly drunk.

It's not syntax-specific. If I toggle font-lock-mode, everything renders correctly but the problem is still present and resurfaces at the next point of syntax highlighting.

I don't think it's my configuration. I'm not doing anything exotic (with font locking, or in general), and my packages are up-to-date.

I can avoid the issue by restarting the daemon, but is there a better solution?

  • What happens if you set font-lock-support-mode to nil? That will slow font-locking down, but it might help with updating - worth a try. – Drew Jun 9 '17 at 17:35
  • 2
    The main question is if this is a tmux/terminal rendering problem, or if is Emacs has applied some faces incorrectly. To find out, place the cursor in the incorrectly colored text after the link and type C-u C-x = and check if there is a face text property or overlay at that location. – Lindydancer Jun 9 '17 at 17:47
  • The face within the incorrectly area is org-link. font-lock-multiline property is also set. The result is the same whether inside or outside of tmux. But a standalone, GUI emacs instance shows neither property (only fontified t) and rendering is otherwise correct. It's as if the last-used face is being left on. I set font-lock-support-mode to nil (as well as the other values), but the behavior stayed the same. – Bill Jun 9 '17 at 19:38
  • Does it only happen in deamon mode, or does it happen when you run it in a terminal directly? – Lindydancer Jun 9 '17 at 21:42
  • Only in daemon mode. – Bill Jun 9 '17 at 23:23

Your Answer

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

Browse other questions tagged or ask your own question.