From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Psionic K Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? (was: Fwd: Org-cite: Replace basic follow-processor with transient menu?) Date: Sun, 15 Dec 2024 12:01:34 +0900 Message-ID: References: <87o71d25fb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30873"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Psionic K , Emacs developers , emacs-orgmode@gnu.org, emacs.transient@jonas.bernoulli.dev, juri@linkov.net, justin@burkett.cc, omar@matem.unam.mx, tclaesson@gmail.com, visuweshm@gmail.com To: Karthik Chikmagalur , Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 15 04:02:40 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tMetz-0007t8-3L for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Dec 2024 04:02:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMetF-0007gH-1t; Sat, 14 Dec 2024 22:01:53 -0500 Original-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 1tMetC-0007fl-WF for emacs-devel@gnu.org; Sat, 14 Dec 2024 22:01:51 -0500 Original-Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMetA-0000lK-3E for emacs-devel@gnu.org; Sat, 14 Dec 2024 22:01:50 -0500 Original-Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-e39779a268bso2415216276.1 for ; Sat, 14 Dec 2024 19:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1734231706; x=1734836506; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BCf+wTZXw90qcbrR0MJumlbV8uFuYaCgoeWqrnRqyWU=; b=VONoN9BSdsVQHY0iE2RTQYnrvGEfMKLd7PZtv114ZB6GtixhjrPO7MzHKQgMhsmawI 8dRf1pbTW0V2OAsCQkGs5c7ejAl0KgPEwxADmQh9QcksQmfRgxBcpQaeoXTCBtzTTIfA uGd/8GAG2bAgDN3rXUeUDI0vF6fJgFFW6TZTvwCUfoP2vYggDWNPXITl8ak23TyckSj9 xLF2M97SEbkrz3I41xJ+h9k080Dj5wrXMb4ReabGwt1PBvI8HGy6ONpqZnCivJMdx/1k X/eVvpzqqagM+jDB1/zQIu0qYqTDA4oTa3nKuqKln9pVUokTEdYvaOmEGf+vaQGK+uJS sHBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734231706; x=1734836506; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BCf+wTZXw90qcbrR0MJumlbV8uFuYaCgoeWqrnRqyWU=; b=V+ZA7eyWVJL2aLJRmAla8Zn8u4TlIwR53t5SfcRKMM3C8x2JjT0x2kOcLPze6BsoZH rNRCh8SuoEmyQnEHDAcYYZasaz5TJxCW+3zl1ZPH1xu9MC4voVX9GDJP0Aqn+IulAMVM SBHNFQQEWdLXYnN8HNyvwPrgIG2ACM3BhHxUMnL73Ipx29AsPqxGa/CDkzyd8Oe6bEvb fRvYWzzl5AxD59QUBVWHq4wevKElddOG+pCWHHAfau8eFJE9+9k1k+ucov1ivcCQbx01 aw6mjUP8rUEAqCRy7bOLn7BNV3GxVOnIMZ0IxJfCOkO/vxhcqsIsN6Bq2yYk2woTQAQH PlTA== X-Forwarded-Encrypted: i=1; AJvYcCUC+2vzWiLONFBejHgiuc2PYjc1nHo4bjE1uasl7sXgzADL2j/LkCaqGE2eO7oh8mvj4/ny5bsDSYnuNQ==@gnu.org X-Gm-Message-State: AOJu0Yxn+VeNuB9CV47B+XDY3Vj+W67e6TMaWtjh91iV8g4w37IyV+rE bcvyxV6KT5TXTa/uWgojnY0Y7TBMQPLr6+mdvSKIPebvpnWMF3OF8sKlWQb+WDZwAGzkRrb90ih JsbpwUX/zXCy1boaNpWSvWXLU0h/YxbxiFnq8tQ== X-Gm-Gg: ASbGnctt4c39q/aI914kmpJO6drdmmwrNNugRHZnFnPrjsy4pYSn76X4QiMbbATIOzz pwUqj/cqKsRRprXi74jYqBv8g0LPMGzzjlZQ8hvy1 X-Google-Smtp-Source: AGHT+IGytTjwcAHFU7zjjFiIvzoOX+QS9jzILogQgOSFXNDaoaKa9m1dt4eeDu9fC3UCUD3be0TQ/c3GigiqsT+MzHQ= X-Received: by 2002:a05:6902:2582:b0:e3a:7b9:ba65 with SMTP id 3f1490d57ef6-e438fc666dcmr6591097276.22.1734231705816; Sat, 14 Dec 2024 19:01:45 -0800 (PST) In-Reply-To: <87o71d25fb.fsf@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::b33; envelope-from=exec@positron.solutions; helo=mail-yb1-xb33.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, 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-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326513 gmane.emacs.orgmode:164151 Archived-At: > Do you have an example of using buffer-local variables to store > transient state? Directing me to an appropriate section of the > showcase should be plenty. It's less magic than it sounds. I basically bypassed the infix system when making transients for Master of Ceremonies. https://github.com/positron-solutions/moc `moc-dispatch` is a kind of utility dashboard for screen casting. Besides controls, it displays various states you might not see in the minibuffer or elsewhere. I used dynamic :description functions rather than infixes to display these states. It is much simpler to bring Elisp states into the interface this way. There's no need and there can be no meaning of persisting the current state of Emacs. > like the KEEP-PRED behavior of `set-transient-map' There's more. Calling (or declining to call) `setup-prefix' manually in an interactive form or using the stack manipulation commands can switch between menus and pure interactive flows. It's possible to construct flows that are more program-driven than simple KEEP-PRED or repeat maps. Obviously we can hack them both since they are functions that can manipulate the downstream flow. Transient's pre-commands are a bit complex to understand when hacking in behavior but are related to its menu stack, something transient maps don't need to express. Instead of talking about Transient's second system behaviors, we can identify and fix the worst ones. Jonas is aware of them and generally in favor of normalizing how transient meshes with interactive, as long as it doesn't break magit and all the other dependents. > > org-speed-keys > May you please elaborate? I discovered org speed keys because I was making my own speed-key system and came across the shadowed bindings. The bindings are always shadowed, even when speed keys are off. Unlike Lispy, where I customize the shadowing using keymaps, org speed keys has `org-speed-commands'. From a discoverability standpoint, it breaks some things. The commands are opaque. All I see is `org-self-insert' whereas my own bindings have unique command names on every key, another thing I copied from Lispy. Even if they have DWIM or situational behavior, it is easier to identify all behavior when starting from an entry point that doesn't implement details of other commands.