From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: making software with Emacs and Elisp Date: Fri, 25 Oct 2013 00:34:50 +0200 Organization: Informatimago Message-ID: <874n86fgc5.fsf@informatimago.com> References: <87ob6k23t3.fsf@nl106-137-194.student.uu.se> <87d2mw52sh.fsf@nl106-137-194.student.uu.se> <87mwlyh264.fsf@nl106-137-194.student.uu.se> <878uxifhwu.fsf@informatimago.com> <8761smgvd5.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382654142 32713 80.91.229.3 (24 Oct 2013 22:35:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2013 22:35:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 25 00:35:47 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VZTVJ-0003Cm-Rg for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Oct 2013 00:35:45 +0200 Original-Received: from localhost ([::1]:56481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZTVJ-0003mu-H3 for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 18:35:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZTUq-0003md-F8 for help-gnu-emacs@gnu.org; Thu, 24 Oct 2013 18:35:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZTUl-0005Jx-AK for help-gnu-emacs@gnu.org; Thu, 24 Oct 2013 18:35:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZTUl-0005Jt-3X for help-gnu-emacs@gnu.org; Thu, 24 Oct 2013 18:35:11 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VZTUi-0002lt-61 for help-gnu-emacs@gnu.org; Fri, 25 Oct 2013 00:35:08 +0200 Original-Received: from amontsouris-651-1-117-120.w83-202.abo.wanadoo.fr ([83.202.52.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Oct 2013 00:35:08 +0200 Original-Received: from pjb by amontsouris-651-1-117-120.w83-202.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Oct 2013 00:35:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: amontsouris-651-1-117-120.w83-202.abo.wanadoo.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:MzZkNzQ0M2JlM2FmMmRjZmNlNTE0MGM2ZTY5MjVkYjU1N2I5MzE4ZQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94202 Archived-At: Emanuel Berg writes: > "Pascal J. Bourguignon" writes: > >> If you want to run processes in the outer system you >> can call start-process amongst a few other functions. > > No, I meant "Emacs processes" but you answered that with > `run-with-idle-timer', I guess. > >> But you can have code scheduled to run in emacs. It >> is not a preemptive system, but a collaborative one, >> where each task must release the CPU quickly enough >> for the rest of the system to stay responsive. But a >> lot of tasks are scheduled this way in emacs >> (eg. background font-locking, semantic incremental >> parses, etc). See: run-with-idle-timer > > OK, so there is one *main* Emacs process running, Yes, call it the "kernel". > that might turn *idle*, I guess if you don't do anything, and > when that happens, some Emacs arbitrator looks in a pool > of background tasks that would be beneficial if they > were run, and then runs them, and then when you start to > do something again, the main Emacs process does *not* > preempt those background tasks, instead they are run to > completion, and it is assumed you (the user) won't > notice, as they should be so fast anyway? Yes. But actually the kernel only does that, manage the hardware to find the next event, and process that event thru keymaps to find the function to call. When it has no event it calls the functions from the idle timer queue. You can consider the command bound to keys as outside of the kernel, since you can change them easily and dynamically. You cannot change easily the event loop of the kernel. Of course, the emacs system is not architectured like a unix system. -- __Pascal Bourguignon__ http://www.informatimago.com/