From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: Get key-binding for a command and print key binding in kbd syntax Date: Thu, 09 Feb 2023 14:46:03 +0100 Message-ID: <87zg9nkl44.fsf@gmail.com> References: <87lel72mqs.fsf@gnu.org> <87cz6jm8tk.fsf@gmail.com> <87h6vv2jmu.fsf@gnu.org> <878rh72ie4.fsf@gnu.org> <878rh7m5bj.fsf@gmail.com> <874jrv2gcb.fsf@gnu.org> <874jrvm3mr.fsf@gmail.com> <87zg9n10sd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 14:46:44 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pQ7G7-0002R3-IQ for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 14:46:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ7Fe-0006xA-5s; Thu, 09 Feb 2023 08:46:14 -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 1pQ7Fa-0006wg-9n for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 08:46:10 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQ7FY-0004JO-Lk; Thu, 09 Feb 2023 08:46:10 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id j23so1866310wra.0; Thu, 09 Feb 2023 05:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gocnde6pHv+D4wkJI9qeJcQthCDbf4AcN689uPjPD5I=; b=Av7242nqWlEtJ2CMAYd85wyagtbCvxRybSJLLDCtmxuN5I95yhpjXuttCCmPqaQnnq xnzGv8QATY0LmzbqUrD6Fh9ZMOODJQOsQwJLHxT+fChFSBQJRA7khUoA3KeW250GFo4q 0kkDFrSeYphQ6LffEb9VNsMmyZvkdy2QZwUF27nQRah1XwCbduAd9UcmTtcR8pOH9nsk hwEJ/3pdKsctkUveyOkiEtTI9h93K1sOpN71ELV1EWpg3hk8FgqysrsGquIyJ9Lve/Wl m8wa7CBmzeI0xyoTffuHt7QPkckLu0VAHXfMeQXETCLXpiG6aFj+ptxIb54I+kfJH7mj o2yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gocnde6pHv+D4wkJI9qeJcQthCDbf4AcN689uPjPD5I=; b=bdzxKEBo4nGrHQFw5Wm+BHoo9nHxwETV7RQ4bL4+srV4BFPV6f6A72glOL4TK44l0H MjvBGZx9HZ2dmCOixSHa7gRZExN3EiwpMAarTqNGNN1hvtxDDM9rRwJs0JkiIt9i3JNu TU0FJ2Fz8ZgXpoE6tX9vrwLYR1scXjBlmMXX9aJOOGNhsQjTUFLkFn5oafX4yS5KD6X/ GzUw4l2wtNo8c2ofHAKPlzBm0v+6kDUEcnje5rIHfxi3zsYT6jQfqejGpWLQjGmY+V+r 2zBJC2t2dkFiPzKmEwp+ijmuZUgxfREcTQkvYu1LfCstfgoC+CYFb7hnil4bKPosMr9J JHig== X-Gm-Message-State: AO0yUKUXfMr9/Yl+anLiZ1iHTeGZN5fEftg94t+7fBwikioj4hm9ilGA mAspbEZm+vRqspg57rrtzI660Ml5XvM= X-Google-Smtp-Source: AK7set9YzvNXWWDonFWZV9Ey3LXAx7yHSqDfnSXJZVJVjR2pIAbSA6LG15nHZB14zpbsHjXORW7WJg== X-Received: by 2002:a5d:4352:0:b0:2c5:3d21:7ef1 with SMTP id u18-20020a5d4352000000b002c53d217ef1mr1467783wrr.38.1675950364914; Thu, 09 Feb 2023 05:46:04 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id j7-20020a5d6047000000b002c53a89f042sm1125449wrt.30.2023.02.09.05.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:46:04 -0800 (PST) In-Reply-To: <87zg9n10sd.fsf@gnu.org> (Tassilo Horn's message of "Thu, 09 Feb 2023 13:22:21 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=rpluim@gmail.com; helo=mail-wr1-x433.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142676 Archived-At: >>>>> On Thu, 09 Feb 2023 13:22:21 +0100, Tassilo Horn said: Tassilo> Robert Pluim writes: >> I=CA=BCm not sure I=CA=BCm getting it. >>=20 >> - You insert (substitute-command-keys "\\[mu4e-search-maildir]") >> - At that point you can add a 'keymap property to the text you=CA=BC= ve just >> inserted, binding RET and mouse-2 to #'mu4e-search-maildir Tassilo> Ah, yes, you are right. I imagined I would compute a large st= ring with Tassilo> different \[foo] and \[bar] occurrences and then pass the whol= e thing Tassilo> through substitute-command-keys. If I do it in small parts, it Tassilo> obviously becomes much easier. Sometimes I don't see the fore= st for the Tassilo> trees. :-) Breaking things into small parts is the essence of computer programming :-) Robert --=20