From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id lD7oIGJVrWLMmwAAbAwnHQ (envelope-from ) for ; Sat, 18 Jun 2022 06:32:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aA8EIGJVrWK/WQAA9RJhRA (envelope-from ) for ; Sat, 18 Jun 2022 06:32:34 +0200 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 2B9532BED7 for ; Sat, 18 Jun 2022 06:32:34 +0200 (CEST) Received: from localhost ([::1]:38570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Q8O-0003Wy-Tl for larch@yhetil.org; Sat, 18 Jun 2022 00:32:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Q7i-0003Wp-3F for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 00:31:50 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:34632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2Q7g-0006UO-CL for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 00:31:49 -0400 Received: by mail-pf1-x431.google.com with SMTP id c196so5747752pfb.1 for ; Fri, 17 Jun 2022 21:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=ShU0NE1Ir5LUeIs7c1gcNY0hR9i67K+0GzDPew7B9ZI=; b=SN8AJvl5kIJfLEdHbL3jBOOL4SDj4+nXkUXo9IxRCV/D0Txh9gRdbR/u7U6ETxgOO7 Pcl1gXN8dUXeEmnDIgcLEUqxy6vtlFVHhk0TqAlabdDgtH6j5E94+JpDFDZhFdlRhHP7 3VmyBALtGN3EfG7sLXT3lQH1J977RIqPLC0IfqQ9lyalohZYJM9tOdnDKJEfZmDjREcd nFqt5X4Vx9Yfv9wN2gC0fYYdxwDjYUHh/bmlaIMZtIneTHZXN+zQd0cJKbsmaPGX0q/G 6uTArALPXWYiau7//iQpVbeo80h5Vm7B6yqW9L9jIZ1AMUOocz2koWFPj+jVUalThcSJ VnBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=ShU0NE1Ir5LUeIs7c1gcNY0hR9i67K+0GzDPew7B9ZI=; b=7xW/xI16+D2qndbtbNDKjrohypzJem1gnc94Fk/T3nTcZotn9JW9TrO7NoA1DtcVHV h1irJ0gW36XdcbkDFtYZhkZBk+Q8MNbEtAVMEA28im+xKbGM2FOo3RA/ag+ZWbY4WHwp MvUkGJqtRCJPQjHoIhE5N60JUXck6VlO7LN3H89uvFInLp8WpT7nHI9vqB/eGKE1+7LL nVMElHkkyrouZOtzgZsE15EanGU1EQWG9o2FDcE3Z8yR43+Fsg4Mp51Dj+VfWieVbBwc 9SEL0WudCOIYOeGl86Gwvx2DRXIBOsopOJHdqEYGyeUfoDhq/BKcpb5bQc6q0vdD5yTX QNoA== X-Gm-Message-State: AJIora+jelKq7XvZesIA+a1p8HAbR13UVJAlkbDzGCjbmXXDUqhQyDcf GmCaWrQufX9io8+vegOG3i8PnwK+nXM= X-Google-Smtp-Source: AGRyM1tHf7HRwLN8MmU5FiId4gKNIAneOvbUNCT6Uoy0Wt+pi1Y+0gGotk5Eu7aFe3nuNRfk8BWvrg== X-Received: by 2002:a05:6a00:244a:b0:4fa:ebf9:75de with SMTP id d10-20020a056a00244a00b004faebf975demr13300670pfj.73.1655526705895; Fri, 17 Jun 2022 21:31:45 -0700 (PDT) Received: from dingbat (2001-44b8-31f2-bb00-2f2e-7695-ea73-2470.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:2f2e:7695:ea73:2470]) by smtp.gmail.com with ESMTPSA id w1-20020a63a741000000b00404fd2138afsm4657573pgo.40.2022.06.17.21.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 21:31:45 -0700 (PDT) References: <87mtf3tui1.fsf@localhost> <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> <87a6ay1enh.fsf@localhost> <87zgisvuu5.fsf@localhost> <87sfoi1xde.fsf@gmail.com> <87ilpbs4tw.fsf@localhost> <87mteawrbs.fsf@localhost> User-agent: mu4e 1.7.27; emacs 28.1.50 From: Tim Cross To: Ihor Radchenko Cc: Arthur Miller , emacs-orgmode@gnu.org Subject: Re: Proposal: 'executable' org-capture-templaes Date: Sat, 18 Jun 2022 14:26:00 +1000 In-reply-to: <87mteawrbs.fsf@localhost> Message-ID: <874k0izj69.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x431.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, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655526754; 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=ShU0NE1Ir5LUeIs7c1gcNY0hR9i67K+0GzDPew7B9ZI=; b=f+Wtc2qtAlLB3yzw2pujsBngobrqd0Oca1rhRS3RSXSatOIqJDp76YXDD1CJOo8HkRg6O/ 3joKGL7/gif91S8nakLLonFA2ohBHLJeDAlrLk9ctWWqqjHyFeBc9NcKTy7FnBuCEYU4A2 bgTpNS/lNwktU7Ij4Ez7E/IpYSlfiBv7RwG0kYwCdbVOukIom8HlG+tgjLLgPpQRm1oi/Q SUayWDrTSCPWp3Aa4K/2fLV1jt1540ysmcI1I+mtZhf0CyGH0y76lfN0N/hrtbTqmbe7Nj n9s7l2+h6KMGx83YenL5ieYmU37yQG4lQnvFjAWMzcP5c18hJBhEY6QMLVOrvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655526754; a=rsa-sha256; cv=none; b=W/jareiuWaiuOyreLBWUZboiOo36PEii6unzGsLgnmDXydIMU3TETs6BiFRx7Zdo23/bzI 7p88UvYl11Z/GhAH4Mq0cxPodjekLlNHeZ88mS5bmB3pKzX/CjiYifvbRkGPAy2R20gD8h BtK58a9dkAjpShuQFMqFa8582jkTQ9TfyXMEj25JjiFjB24owK2Hct6tbF44/7VHgYwMzj KXdz4wUl042nt7dnT7ZEk3RuYxOUyTR8n7K+dYKn7RwgwYoslNMibpZTcrVu1kJBq608eU z/FMv4Pj6IlD9wFCofCqkXRNAYqA3jJAFGQsKkmxRvnaCKaygzzFAEcp1IULTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SN8AJvl5; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SN8AJvl5; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 2B9532BED7 X-Spam-Score: -2.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: fCo17CETxBtC Ihor Radchenko writes: > Arthur Miller writes: > >> this example the mode map approach seems slightly more convenient. I don't know, >> in org-agenda-test, I haven't implemented all of org-agenda, restrictions, >> prefixes and some other stuff, mostly because I don't really understand the >> implementation. > > In the nutshell, agenda restrictions will execute some elisp that sets > certain global variables affecting other agenda commands. selecting the > restriction should not leave the agenda menu. > > Also, unlike other selections being echoed literally upon selection, > restriction echo must depend on the global state. If you press "<" in > the menu, the menu prompt should change between "Press key for agenda > command (unrestricted):", Press key for agenda command (restricted to > buffer):, ... etc > > Note that there is not much point echoing the selection. > Tim, do I understand correctly that changed minibuffer prompt will be > also spoken out by emacspeak? > I think so, but this would need to be verified. A lot depends on how/where Emacs does things - for example, because Emacspeak relies on the advice mechanism, it cannot pickup changes/actions which occur in pure C code. Provided Emacspeak is able to get the prompt in some before, after or around advice call, all should be fine.