[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: idle timer and current syntax-table

From: Dmitry Gutov
Subject: Re: idle timer and current syntax-table
Date: Fri, 19 May 2017 15:30:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Thunderbird/53.0

On 19.05.2017 12:12, Yuri D'Elia wrote:

It normally runs in whatever buffer is current in the selected window.

Current when the timer is registered, or when fired?

When fired.

I'm seeing this when setting an idle timer from a dbus method hook _and_
the idle timer is fired when I'm a message.el buffer.

Not sure what's going on over there.

The message buffer has a working syntax table, but this is not what I'm
seeing in the timer func. _Another_ buffer must be current.

Try also this snippet:

(run-with-idle-timer 1 nil
  (lambda () (message "%s %s"
                      (eq (syntax-table)

I evaluate it in the minibuffer. When I'm in the scratch buffer after a second, it prints "-scratch- t". When I switch to a different buffer (*Messages*), it prints "*Messages* nil".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]