all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Yuri D'Elia <wavexx@thregr.org>, emacs-devel@gnu.org
Subject: Re: idle timer and current syntax-table
Date: Fri, 19 May 2017 15:30:20 +0300	[thread overview]
Message-ID: <0fb98a14-a54c-a0a7-32d6-2b73c8542fac@yandex.ru> (raw)
In-Reply-To: <87tw4hb47j.fsf@wavexx.thregr.org>

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"
                       (current-buffer)
                       (eq (syntax-table)
                           emacs-lisp-mode-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	other threads:[~2017-05-19 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 17:17 idle timer and current syntax-table Yuri D'Elia
2017-05-18 17:45 ` Dmitry Gutov
2017-05-19  9:12   ` Yuri D'Elia
2017-05-19 12:30     ` Dmitry Gutov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fb98a14-a54c-a0a7-32d6-2b73c8542fac@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=wavexx@thregr.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.