From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MJF4B05qG2HLWAEAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 09:50:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MIABA05qG2EjOQAAbx9fmQ (envelope-from ) for ; Tue, 17 Aug 2021 07:50:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5479C1B552 for ; Tue, 17 Aug 2021 09:50:37 +0200 (CEST) Received: from localhost ([::1]:55076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFtro-0001MX-Cu for larch@yhetil.org; Tue, 17 Aug 2021 03:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFtrM-0001M6-PH for emacs-orgmode@gnu.org; Tue, 17 Aug 2021 03:50:08 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:51954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFtrH-0007JY-C5 for emacs-orgmode@gnu.org; Tue, 17 Aug 2021 03:50:08 -0400 Received: by mail-pj1-x1036.google.com with SMTP id oa17so30839432pjb.1 for ; Tue, 17 Aug 2021 00:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=au0GqbO8yccPxD7z4Hf7hgDLFdWO2bMoe4u4pvwKfOs=; b=hfKeqXITtgk176z4E/ensT1aB6xuW9AMfqbwCvbwacSUPRtUfqZOCCbdOWQGhYpjLN fsUetDSpUTKI6owdUesMw3P9i68dHOqdEgc2yfrA8j14RwaO1l2/e9gJsQuIe8BWNf/C CO7PCXyLBEVx23FJroE/Y0fa9vNrvy0FpbqF87dizZyhXGeGAAmxbz++f1LiWe5pcTkm 2WuRKftgT/NkebY+VebEMzJhVtGEe2HZjS9q0edBFEWFtwactvhT1ofSeHOgdZ7CExCx Pog9ykMXotcK25+j4Iq+QVSCIS8a7yli4/1vwuxBr8WONeXCK8LvtDnOXGylE+o+ocdE tf+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=au0GqbO8yccPxD7z4Hf7hgDLFdWO2bMoe4u4pvwKfOs=; b=ADm/Xqr157TG70iwKkWPAEejNlha2bkm6Do4JCePcR3CdAbqedtzwDEwSD6Oiu2OGN srVjW3vcj6NikdkhY7lBOcHROHDcjE1hHD3c6r2/nRZ7wp3Ozse/XQGJSzRFUuJ6wWfQ hKynphJM+eUBEhuxBfNlJRR5pqMxftMY/MzIbW/WiVehCyCbPwy1VU8JHPCZ2T9VgR2L tPh3OJOxhkUF1XU/l+9cp+r1ZXYX+jAH4jC+QPjRjfxDFQR3C8GW35h1OqigTqaOgVoQ OKTHbLAkmByf11cRVa9iq/B0ETellUyaEJ9ZLLY9FJxcBGAbIk+jBrj3pgNgfUNc2u9N fk3g== X-Gm-Message-State: AOAM533/srCy4g3zO6seZ5VbT/DsLj2SPI5jghLO2+rDeyo1VJp/byUg K6edg9ae+XAXcybhyHeI0Qj1Sd7IVd8= X-Google-Smtp-Source: ABdhPJwjLF+N0kKhJw4nTFJqcX5TC+9HNT3ymcG90qvszB7k8M/M5kZEc+ltAlpCOQfkB6CcrC5Q/Q== X-Received: by 2002:a17:902:8348:b029:12b:b2a0:941b with SMTP id z8-20020a1709028348b029012bb2a0941bmr1850025pln.62.1629186601110; Tue, 17 Aug 2021 00:50:01 -0700 (PDT) Received: from tim-desktop (106-69-131-50.dyn.iinet.net.au. [106.69.131.50]) by smtp.gmail.com with ESMTPSA id j128sm1556450pfd.38.2021.08.17.00.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 00:50:00 -0700 (PDT) References: <874kbox5ww.fsf@gmail.com> <87v944v9ys.fsf@web.de> User-agent: mu4e 1.6.3; emacs 28.0.50 From: Tim Cross To: "Dr. Arne Babenhauserheide" Subject: Re: Build agenda asynchronously Date: Tue, 17 Aug 2021 17:28:37 +1000 In-reply-to: <87v944v9ys.fsf@web.de> Message-ID: <87y290v7bv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629186637; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=au0GqbO8yccPxD7z4Hf7hgDLFdWO2bMoe4u4pvwKfOs=; b=i0Eelj9UNiYeISxrq/prebE6Bu34nAYPr5XbyiNDhSi11h8HbL61fopdBKy/gk7RvAxRVm 7PkxHX6Dmcbh/Xt06tppWjXqJ1+wadRnH6GyF1SU2Er5eWlZXCKJSRS2mG/pTkJYvbBtQZ erJzEkf0sIfGTieOPUKEL3HICQEKf+fcslgnfrg9eNjNRk/Br5AAaQC3r+Y2Gvufg9Ok7K 2RsfS/L07MaGfdsbRV2umq8z/OpEZHo7U4AhYiuR//XwD/Zw24VBnvQw+VX4TJsDfFH7RH T76Oy87MQdo6NEfHg214D9CJqNENjo5pgZvsXw7GXbZu1L4fFq5OY01I0FjxtA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629186637; a=rsa-sha256; cv=none; b=RdOLN3D6wAz7qzGmJxm0I1IgoETAWxNFjerzMSngKtUHpFBIJKRP676Jx6jxTMqC8hMzEc LGEhgo0YWGtmTWV52kCJV71tz862ROxHiC/fSa+Imx8AQQo/gobUFxdvuQ1OxxTkaeg2hX QZ5qt1V9qWu92xLu7iyfXkoBmJ9ZmGiFHtFR2Cr+8NWth4KdftTKvG+H7kFdkKruiMMu+m HdCUF2I9TYpphh8pttrIP40RGBvANDACw2RI0zCfK86RD76ViyLXfthqx62FJ4UGkYRHiI zT28ZGbD+MMCMWYCmFS38/MPvYYXGJzLumX7PjNIMW4rQ6KsPUD0yCNOqrG5Iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=hfKeqXIT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=hfKeqXIT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 5479C1B552 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: kp9SjXqJGPVt "Dr. Arne Babenhauserheide" writes: > [[PGP Signed Part:Undecided]] > > Tim Cross writes: > >> Emacs' support for asynchronous operations is at best primitive. There >> is built-in support for calling processes asynchonously and >> there is some other development work to set the stage for adding threads, >> but I think general asynchronous processing inside Emacs is a long way >> off. A lot of how Emacs lisp works fundamentally lacks the low level >> control structures necessary to make data structures and operations on >> those structures thread safe. This means you have to work at a very low >> level in order to ensure code is thread safe and that simply isn't >> practical. Even defining the basic model for an asynchronous emacs lisp >> is non-trivial and once you have the model, you ahve to implement it. > > Maybe it could be possible to fire up a second Emacs and retrieve the > agenda-buffer? > Yes, I've seen people who have done things like that. They have their 'main' emacs instance running where they 'do stuff' and another instance running where they read mail, check their agenda/calendar or run other things which tend to 'block'. There are some issues with this approach though. Some of which are not obvious. - Emacs can consume a fair amount of memory. Running multiple instances can use a fair amount of memory. - Startup times make it less appealing as a 'run it up when you need it' solution. - You need to have an understanding of the interaction with various cache and other disk files Emacs uses to ensure each instance doesn't tread on the toes of the other. - A 'strategy' with regards to reverting buffers to file contents. Consider adding a todo in your agenda while at the same time, working on a related org file in the other instance. Provided you know the rules, can operate in an understood disciplined manner and have a system with sufficient resources, it certainly can be a viable approach. Personally, I took a different route. I keep the number of files which contribute to my agenda to a minimum and have an easy way to update/change that list. I can quickly switch agenda contexts depending on what I'm doing. For example, when I'm at work, I'm not interested in any of my 'home' tasks, events, etc. As a result, generation of various agenda views is fast and I don't need to wait. I do have an 'everything' context, so when I do need that, I can get a complete overview. It does take longer to generate and will block, but I rarely need it. My calendar.org file, which contains all my meetings is shared across all views so that I avoid 'double booking'. I do tend to put all meetings in Google calendar because it makes it easy to share them with other devices (tablet, phone, laptop, other people), but I use my icsorg script to import that into my calendar.org file.