From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YKaNG5Ye62WNeQEAqHPOHw:P1 (envelope-from ) for ; Fri, 08 Mar 2024 15:20:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YKaNG5Ye62WNeQEAqHPOHw (envelope-from ) for ; Fri, 08 Mar 2024 15:20:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gbq96zf6; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709907606; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=CA4osW2EQWINKGDpVLeddO2yHo6z4b8Tpiqaz3oo+T0=; b=oBWi8O10akIhkqRAEr7rbZWkrSQ3AdfnO98wBq2oGNEbRUsxaT7IdS3tNx413ke6alVKJ4 9Q3sSlQMBztCczoWnutsVW/agggwniRxrdjHO/82q+LVIuqiLiUl99Q7GjRAh+wyndCfE+ Ly9Q1VtnKuKl4Egenukm2FPsbA1gdB97cqBYS/dzjAStuKzbXumzwxGNCvh9robMYx6EiR cl9eEkhWjWHd5DNFT5TbtCaHEf7FvVc0w423ufDRg98a7Kazr+PYe0+FUv3s2KSXoInfSq GNDiJMc3hX/rF6keWoBCDc+2oS41v357XGdcIzDElU3ZI1uoU9KqVCEM1zuXaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gbq96zf6; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709907606; a=rsa-sha256; cv=none; b=UiPsGO03cCwkOtLsnLtzTVQPAzxvyALfOd1oT5n2xIWGklxcNfZT51SEl5+Txo8RNlMBPr 6m0pxipn4RB2uqmsAL9wJWEQwQ79Yew7CG9PsN1kl+TexEyXM9H46r6rJMMPd72SvuvIv2 oRNLHZcn1AHhO2P3CPcMKBuT60cqKpXhLCAZQgYYwlByOf2uLF4GuREKFTBKZJ5AVQYP9N 7QO0/tWrVcPFiCKz0bwdsHOWefB9DbQsDOLxtleGoeCYK9zBKqALHaj4qFIyFSm9umJ26e wY0UVZh/P5BCJEVTm2zxNiUhpPDqxbyJ7s2KcjlTFl+WdbwOWJRgAwl0AePUEw== 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 287482262F for ; Fri, 8 Mar 2024 15:20:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rib4B-0005ZY-Qq; Fri, 08 Mar 2024 09:19:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rib4A-0005Z8-0p for emacs-orgmode@gnu.org; Fri, 08 Mar 2024 09:19:18 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rib47-0002vD-QY for emacs-orgmode@gnu.org; Fri, 08 Mar 2024 09:19:17 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-412f67bc6d0so6563015e9.3 for ; Fri, 08 Mar 2024 06:19:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709907554; x=1710512354; darn=gnu.org; h=content-transfer-encoding:mime-version:date:references:in-reply-to :subject:cc:to:from:message-id:from:to:cc:subject:date:message-id :reply-to; bh=CA4osW2EQWINKGDpVLeddO2yHo6z4b8Tpiqaz3oo+T0=; b=gbq96zf6QT+4lZ0G+oEHTKBafuT0l75PNMNua+K/3izQS0OPkGaB+CuL1M7HIuA/5l dJWg22MFR4TIvx6Obo7qeZqyhQw0IPOmkke7QoRb076piAmWjo7hr9HqHhYxd47Sns1j HWOG8oTM2bXpEE6yXCZpqPR4+Tkkt71fl+LQD0TDKI4wQC61f6gV3A5an/kGMHg0omgm 3zVutarLi5aTp6DnWihyYQIzLEJZfke3GLU/FcHGyfYpPetnfUUH/hP0HIB9iDGFBAp5 Wa1MUUYPYbNfKbdKCuO7jPR+vZFuun7ATYBMWSEwUMH6lh7J6l/h4y6LWpE9LilG73Gx 5cQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709907554; x=1710512354; h=content-transfer-encoding:mime-version:date:references:in-reply-to :subject:cc:to:from:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=CA4osW2EQWINKGDpVLeddO2yHo6z4b8Tpiqaz3oo+T0=; b=c4eX3z23ItzkJPbdHRGtCrhScyxZXce0SlDa/wy+XG3Qb2uDkztuDcbZyBlV5zlcmd BkQDhBbWvQEaU02tyZj+24g4e8P9+JmZbJoERuRKbQnhjymSIhH3/oi6FjeCibAZFz4w VjmOOZBzCZRUOiT+YIW8X8AAcTLElfK/yhHWnH5pOgkOmsOXgTGXh4L1rSD2OokG3MBq leY0rJubDAHyXStVadZYlFrpZL4rkl34p6xDzXG+AhUH3pC+dY+DIwZWuzf5/TypthaE TZYCtr+deFZ/s1zjV0TUQGrUUc0aMC+Fo6OG3PPM0Fzwmd4h8Vaaa6z8483aCwPgd3ua 54LA== X-Gm-Message-State: AOJu0Ywh+UC7x39eeqV5JM1FVigQ2vlimE1623njBOifon1273cC1HNy vF02MUwsZ4ita+Vz+3+a0muT7WhZyqW1g9NHsehVyMGUQ+Hm9nzEWW2/gbzA X-Google-Smtp-Source: AGHT+IE1lhWIM9/ZIG8cIADla4rL8yJSJweJyuY0AVDLg337U+fXtEfdVhF4rkwQLfAMbVZUjWGXCg== X-Received: by 2002:a05:600c:1913:b0:413:1606:ba64 with SMTP id j19-20020a05600c191300b004131606ba64mr2467713wmq.26.1709907553677; Fri, 08 Mar 2024 06:19:13 -0800 (PST) Received: from keynux ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id jh3-20020a05600ca08300b0041304100fa9sm6022328wmb.45.2024.03.08.06.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 06:19:12 -0800 (PST) Message-ID: <65eb1e60.050a0220.337b2.a0f4@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Fri, 08 Mar 2024 15:19:11 +0100 From: Bruno Barbier To: Ihor Radchenko Cc: emacs-orgmode , Jack Kamm , Matt Subject: Re: Pending contents in org documents (Re: Asynchronous blocks for everything (was Re: ...)) In-Reply-To: <87ttlhki9e.fsf@localhost> References: <87o7d0mm54.fsf@localhost> <65bbb108.050a0220.b60fd.6790@mx.google.com> <87jznm8hcu.fsf@gmail.com> <875xz42rp9.fsf@localhost> <874jen8zec.fsf@gmail.com> <87o7cv9e80.fsf@localhost> <65c2875f.050a0220.caf6d.8291@mx.google.com> <18dae5cab1d.bf1c7563863897.4896289306902277373@excalamus.com> <65cfa0d8.050a0220.cb569.ce34@mx.google.com> <18dbe11968a.12c0800a31425096.5114791462107560324@excalamus.com> <65df0895.df0a0220.a68c8.0966@mx.google.com> <87edct0x2w.fsf@localhost> <65e30609.050a0220.89c06.1798@mx.google.com> <87a5ng7uoq.fsf@localhost> <65e9f49b.df0a0220.11103.1c10@mx.google.com> <87ttlhki9e.fsf@localhost> Date: Fri, 08 Mar 2024 15:19:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x331.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.56 X-Spam-Score: -9.56 X-Migadu-Queue-Id: 287482262F X-TUID: 3tgVCTo+aDaI Hi Ihor, Ihor Radchenko writes: > Thanks! > I have some minor concerns about implementation, but you clearly > demonstrated the things can be working in general. Thanks! > While reading the library header and `org-pending' docstring (btw, it > should probably be a separate library, not a part of org-macs), I was feeling more and more like squatting the wrong file :-) Would "lisp/org-pending.el" be OK ? Or do you see a better place/name ? > I felt confused about terminology and also had d=C3=A9j=C3=A0 vu's about = what > org-pending does. > More or less, org-pending implements Elisp asynchronous process control, > but the processes are associated with region, not the whole buffer. > Hence, I feel that we should adopt terminology similar to the existing > terminology for processes - process filters, process sentinels, sending > signals to processes, etc. And similar API. The current `org-pending' doesn't know what a process is, or a thread. The job of org-pending is only to let Emacs know that a given region will be updated at some point later (much like what `org-edit-src-code' does, when a source block is being edited manually). I've re-read the Elisp manual about asynchronous processes. The only thing that seemed obvious to me, was to replace "feedbacks-handler" with "sentinel". I also tried to simplify things and use REGION instead of CONTENT where it make sense. Thanks. Do you see something else ? > Also, I am not sure if I like the idea of exposing raw PINFO alist and > mutating it. In particular, I have doubts about mutating CONTENT. > What we might do instead is implement PINFO as struct with custom > accessors/setters. I went for this simple alist because it's more flexible (easy to add new bindings) and less code than using a struct. And Org already uses lists like this (params, info, etc.). Mutating CONTENT (or other essential data) would be a very bad idea indeed; but it's like that for pretty much everything with elisp. I'm OK to rewrite it using a cl-defstruct (to be honnest, I just flipped a coin to decide between a struct or an alist :) ). I'll push my new version after relocating everything into its own file. Let me know if lisp/org-pending.el is OK. Thanks. Bruno