From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Should timers run in the initial frame? Date: Sat, 16 Jun 2018 14:07:04 -0700 Message-ID: References: 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 1529183117 15212 195.159.176.226 (16 Jun 2018 21:05:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2018 21:05:17 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 16 23:05:12 2018 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 1fUINi-0003nx-Vs for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2018 23:05:11 +0200 Original-Received: from localhost ([::1]:52872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUIPp-0005IC-VQ for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2018 17:07:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUIPi-0005I5-Uk for emacs-devel@gnu.org; Sat, 16 Jun 2018 17:07:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUIPf-0006yQ-Qp for emacs-devel@gnu.org; Sat, 16 Jun 2018 17:07:14 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:53404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUIPf-0006y4-Gm for emacs-devel@gnu.org; Sat, 16 Jun 2018 17:07:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=2RzNWGX9DtnlZtu0cGpDlnwnp3M5517wu2Oeskqhk4c=; b=UIy44b3W3gtBLFwkJRHmnkI73u3/hO9QfKMTS9bM3ZJA6KhPnAjU6qA5Ray3QBhGvyfSpKAMqDUfKpH8cy4PqDzD00iCUCPWje3KXo25T8x++Yy3Xg8GlrauSMb0xTRXR+zubc90zmPZkx4pLyR26XF/EAWqR/TtpVU5bWPkAUjPqBorj0gB4dRewFPcrQ5IWnvU1qDE6tWVjRiFZCsngP346/1bCF2zaYE1nM5tsDtcGqO7Gppc2KocVHXBZv9bPy4FTZfi6KdlRjLZDcgEbIKKEXEGlctKPq+itmPFBEQjGLwCbZ3YIRHht/AzAs721FxplgxgQr+oxXylCTRsqQ==; Original-Received: from [172.92.145.124] (helo=[192.168.86.27]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1fUIPe-0003Yq-5g; Sat, 16 Jun 2018 14:07:10 -0700 In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:226396 Archived-At: On 06/11/2018 08:42 AM, Stefan Monnier wrote: >> So, I wonder: would it be good if timers ran in the context of the >> initially opened Emacs frame, rather than in whichever frame was most >> recently active? > > Elisp code has a lot of context, and which context needs to be saved > depends on ...hmm... context. > > I don't think it can break anything to do what you suggest, but it's > a slippery slope: we could also try and preserve the current buffer, > selected window, ... > > The specific problem in your case is that the change your package > imposes on buffer-list is pretty drastic (the original semantics of > buffer-list is to return *all* buffers) I suppose we could expose running_asynch_code to lisp so that modes like the OP's would know to turn off some of their customization.