From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: idle timer and current syntax-table Date: Fri, 19 May 2017 15:30:20 +0300 Message-ID: <0fb98a14-a54c-a0a7-32d6-2b73c8542fac@yandex.ru> References: <87y3tu6q4i.fsf@wavexx.thregr.org> <10e8c197-3e26-d0ca-8610-9d091052a513@yandex.ru> <87tw4hb47j.fsf@wavexx.thregr.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1495197128 1000 195.159.176.226 (19 May 2017 12:32:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 May 2017 12:32:08 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Thunderbird/53.0 To: Yuri D'Elia , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 19 14:32:04 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBh4c-00007G-9z for ged-emacs-devel@m.gmane.org; Fri, 19 May 2017 14:32:02 +0200 Original-Received: from localhost ([::1]:58559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBh4h-0005L7-UO for ged-emacs-devel@m.gmane.org; Fri, 19 May 2017 08:32:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBh36-0004Oz-Sn for emacs-devel@gnu.org; Fri, 19 May 2017 08:30:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBh33-0007PJ-LL for emacs-devel@gnu.org; Fri, 19 May 2017 08:30:28 -0400 Original-Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:37857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBh33-0007PE-ES for emacs-devel@gnu.org; Fri, 19 May 2017 08:30:25 -0400 Original-Received: by mail-wm0-x232.google.com with SMTP id d127so85150854wmf.0 for ; Fri, 19 May 2017 05:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9FziT8rR1RoHddcvhMC1VfTCGNTsOg2+e/GxMX5xIU0=; b=t0C9NRgSR6dkxqxa9d+3h/ne4Rkfmhk1eTPQMdiu14dRbYHb2XoKot6e9QCxKP6R1u 54qnkdiOR5qZoSwFVWpWhNmiHpooi9n06unDi18kzb4T9YcN2MIgKWvWZlYm43tt8OKV sDj+4I+Moq0DIVMA5DMAPGL3Tkcq8obapip78232u2PuPf+HWhhAmJAtfAgojqi3Mjb2 fda1EFl84eFdFdlnEctU3MHq0XM1i8MjTLq/0w7FBT1hQdqU8fHO6J6dFnAOTINEfVmx MWnQMUVwNIWMyhSfWudGT5qTkYYg3y6fUqPWMrQuginsgES+MPlmJ3sHXPR6ymBYFF6c 2Xww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9FziT8rR1RoHddcvhMC1VfTCGNTsOg2+e/GxMX5xIU0=; b=b2tqGlB/ZOcTHp32n5aGF/7YLLXHNOq0PMg/nnFfZ11Cxp/hRSqipv40C3nyPGl5Na muToMSnmd3GgTI4AcjtB0AWDLE9E+oGms42GoHPr308C2ajfg8IQFViiH/i7VI8vhj59 7oX9OhjDR0WJHAp4W5x0S/jv7TbVwerr9eqelge67mTX/90B5lPVSUWL8S+zl/QW3Tu2 zAR36tOaeX+57ZCEKOzykAzSNnqbGa2KPXQMLbCUhXomn71INJIpLRtWRzGarPfjFu/6 XDMMuUN3DmOlh1RraYjGtBqmdrkxG2WoYVgCPUShWGH1UOrljBqNSXMwMUc1IZP2sBIn ZMTQ== X-Gm-Message-State: AODbwcBJ8QIBj4g4uaBnK9wG7+K88RFyW29DNQsXyHyFCAyRpUYBeMAE /qpv04dqyh+9/A== X-Received: by 10.28.51.142 with SMTP id z136mr5874686wmz.136.1495197024258; Fri, 19 May 2017 05:30:24 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.173.156]) by smtp.googlemail.com with ESMTPSA id f71sm745426wmh.29.2017.05.19.05.30.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 05:30:23 -0700 (PDT) In-Reply-To: <87tw4hb47j.fsf@wavexx.thregr.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214994 Archived-At: 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".