From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: transient Date: Fri, 01 May 2020 17:36:17 +1200 Message-ID: <5f46b6999109bbc7b6bb28fff988e0b2@webmail.orcon.net.nz> References: <87368npxw4.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="17808"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: jonas@bernoul.li, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 01 07:37:23 2020 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 1jUOMV-0004Wn-GE for ged-emacs-devel@m.gmane-mx.org; Fri, 01 May 2020 07:37:23 +0200 Original-Received: from localhost ([::1]:56032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUOMU-0001Vt-Eg for ged-emacs-devel@m.gmane-mx.org; Fri, 01 May 2020 01:37:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUOLz-000158-SE for emacs-devel@gnu.org; Fri, 01 May 2020 01:36:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUOLz-0003WY-6T for emacs-devel@gnu.org; Fri, 01 May 2020 01:36:51 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:58951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUOLZ-0001Z3-5G; Fri, 01 May 2020 01:36:25 -0400 Original-Received: from [10.253.37.70] (port=41844 helo=webmail.orcon.net.nz) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1jUOLR-0008At-6L; Fri, 01 May 2020 17:36:18 +1200 Original-Received: from ip-101-53-216-144.kinect.net.nz ([101.53.216.144]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Fri, 01 May 2020 17:36:17 +1200 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@orcon.net.nz; helo=smtp-1.orcon.net.nz X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/01 01:36:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Received-From: 60.234.4.34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:248291 Archived-At: On 2020-05-01 14:52, Richard Stallman wrote: > What I want to understand is the basic purpose and use of Transient. > > Would someone like to tell me in 10 lines > whet job Transient does, and why it is useful? It is a fancy visual keymap. It provides visual (but keyboard-driven) menus for invoking commands; and also provides an interface for interactively specifying *arguments* to pass to those commands, all from within the same menu. The first aspect is like prefix key bindings, but with all of the keys under the prefix being presented visually in a friendly format, with descriptive labels, so that you can see at a glance what the possible commands are, and which keys invoke them. The second aspect is like a *much* fancier notion of prefix arguments, where you can interactively (but optionally) specify the arguments you wish to pass to the command you are about to select (and they are again all labelled clearly, to help you understand what each one does). It's useful because it's a very efficient and user-friendly interface for invoking complex commands with arbitrary interactive arguments. > Thanks, but I can't follow that. Things flash on the screen, showing > lots of text I can hardly see (it is small print), and I have no idea > what it is doing or why. Ok, if you freeze that video at 3:50 then you are looking at a frame where the bottom window is displaying an active Transient buffer, and I'll use that example as context... The example is for performing various "git commit" commands. It was opened by typing "c" from a Magit buffer. The command keys under that prefix are shown at the bottom: (c, e, f, F, w, s, S, a, A), and typing one of those will close the window and invoke the associated command. So typing "c c" will firstly open this Transient window, and then close it and invoke the Magit command for a basic "git commit". The "Arguments" list at the top shows key sequences beginning with "-" (-a, -e, -v, -n, -R, -A, -s, -C), and typing any of those will configure an argument for the command. So in a Magit buffer, typing "c -s -e s" would open this Transient window, then enable the "--signoff" argument, then enable the "--allow-empty" option, and finally close the window and invoke the Magit command for creating a git squash commit using the selected arguments. The arguments can be set in any sequence, until the user types one of the command keys at the bottom, and highlighting is employed to show which arguments are enabled. Some arguments require user input, such as "--author=", so if the user types "-A" they will be prompted in the minibuffer to enter the author value. -Phil