From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Repeating commands (was: Patch for emacs/basic.texi) Date: Wed, 16 Sep 2020 20:26:03 +0200 Message-ID: <87y2l9efyc.fsf_-_@gmail.com> References: <87h7rymedg.fsf@gmail.com> <87zh5q8b70.fsf@igel.home> <8lm0yho8m684it.fsf@iki.fi> <87363hg21r.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27713"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel , Andreas Schwab , Richard Stallman , Antoine Kalmbach , Thibaut Verron To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 16 20:33:30 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 1kIcFG-000779-4e for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Sep 2020 20:33:30 +0200 Original-Received: from localhost ([::1]:42992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIcFF-0005mG-1d for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Sep 2020 14:33:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIc8A-0007jG-VR for emacs-devel@gnu.org; Wed, 16 Sep 2020 14:26:11 -0400 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:35444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIc87-0001CN-MS; Wed, 16 Sep 2020 14:26:10 -0400 Original-Received: by mail-wm1-x32f.google.com with SMTP id y15so4049598wmi.0; Wed, 16 Sep 2020 11:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=W4Q6s6deUaLmMH/o9sv6OdHcifrAb4uOw25CLCBUbqw=; b=oHezEIFhQf1IG/D6mCRN9Aj/00vG8dxUI5jWfzB/VQAM1p/Ph9fEIvIy8c7XuLW7qQ Xx4ZnlF2xCoXHt8blMI7Y126eQgYYZt75nTQqFk96Jwt/5eM/c8E+QKn8w9OnN4/2xJS r0lCRF8fww4d5C1okuTuvCigJ0ojzB2GIlX4xjB5z/WrRwk7mtynSjwTgosGAwNITunt U55NKC/KPX3XYVkUgj+Hoh6tFgZTjFeshP1qL6JXQkaJClNDFX0/G7Fbu46gwoTNPmFs onxwiQIiy0Lw/V5m3pbQSW4CSrLkezarmfbAhd/cwClefnaYCkskVlVbedYXAk31E5pK 7syA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=W4Q6s6deUaLmMH/o9sv6OdHcifrAb4uOw25CLCBUbqw=; b=mxrW4I7O+vA9Vanp9atUgHit899IHiPnWkomWdVvY4MkOq/dodzqBwMoakpxMCapuU 1RwSNJJfAauMLupYDo1ig4nhJEZGh/oGgMXAhu7ssVJ3VgvbymII/xtL/UL1PJOcRT3k AsnhEESCFoQRhNGpWXm2AIo8inSIoOBiD6zAmHOZQ/Z3U+McP8jIr508B49eIFz5lNfw 1EQazldwQ8QkLY3MKCLuZgXNEhcUvhDLwj2fcxMZ6DifIu73H6a7oL//wfm3n4RrLXhe owFGjsVdcrmb5Cy2InDlnEbK1bBQukIfrqg2VJBpH2WXE3SY1To9PEoNuapbJEjqcvbB aoNA== X-Gm-Message-State: AOAM530aE5YDsSy6qerROcBi4pBrsWCp33cOOl8vvCmK5H5a+J7OrZBW KWATpBPrOmCeWKLW2uOB+GQ7c71pqMJ3sQ== X-Google-Smtp-Source: ABdhPJz4F3LnJ/DRSp1d2Gqli+JkzLlsvB/hGQ9Qeox+3vctpKpNs75ZRTk3nmRGe8XpFDQrHY8Jyw== X-Received: by 2002:a1c:770c:: with SMTP id t12mr6448797wmi.121.1600280765097; Wed, 16 Sep 2020 11:26:05 -0700 (PDT) Original-Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id z127sm6964437wmc.2.2020.09.16.11.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 11:26:04 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Wed, 16 Sep 2020 16:59:14 +0000 (UTC)") Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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-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:255920 Archived-At: Drew Adams writes: >> (It's one of those bindings, along with with "C-x o", that I wish came >> with a "C-x z"-like transient map.) > > It's trivial to create a repeating command, so you > can use `C-x u u u u ...'. Thanks for these tips! I actually already had setup method 1 (set-transient-map) for other-window, but never bothered with undo. Method 2 (repeat) is neat! I wonder whether these three variables you bind should be mentioned in repeat's docstring, I would never have guessed this function could be programmed this way. (Though I did get a kick just now out of reading repeat.el's commentary, squinting at the existentialist conclusion, checking the "Author:" attribute just in case, and finding out that yep, this *is* Will Mengarini's fine work.)