From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#66755: 30.0.50; how do i lookup a key but also respect key translations? Date: Wed, 10 Jan 2024 10:00:29 -0800 Message-ID: References: <87ttqeja59.fsf@strawberrytea.xyz> <83msw5hmqn.fsf@gnu.org> 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="20995"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 66755-done@debbugs.gnu.org, StrawberryTea To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 10 19:01:39 2024 Return-path: Envelope-to: geb-bug-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 1rNctW-0005GE-7n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jan 2024 19:01:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNct2-0005bt-8Q; Wed, 10 Jan 2024 13:01:08 -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 1rNcsz-0005bA-Gx for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 13:01:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNcsy-0004Lb-Np for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 13:01:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNcsx-0005C3-D7 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 13:01:03 -0500 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2024 18:01:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 66755 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Mail-Followup-To: 66755@debbugs.gnu.org, stefankangas@gmail.com, look@strawberrytea.xyz Original-Received: via spool by 66755-done@debbugs.gnu.org id=D66755.170490963717416 (code D ref 66755); Wed, 10 Jan 2024 18:01:03 +0000 Original-Received: (at 66755-done) by debbugs.gnu.org; 10 Jan 2024 18:00:37 +0000 Original-Received: from localhost ([127.0.0.1]:43004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcsW-0004Vu-R7 for submit@debbugs.gnu.org; Wed, 10 Jan 2024 13:00:37 -0500 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:54602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcsU-0004IY-It for 66755-done@debbugs.gnu.org; Wed, 10 Jan 2024 13:00:35 -0500 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50e7af5f618so4975573e87.1 for <66755-done@debbugs.gnu.org>; Wed, 10 Jan 2024 10:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704909630; x=1705514430; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=nuUGspoB2E/iuz7gJeUQbFs6iseMlf1RbOG16Q4eGLY=; b=ZktppFwkCrNdXtcIPSek7ilFtWiC9WRnEvgMPmFrYNSHBvMBB82e0aSsC1bh1/p1RS tKIK+uwIB+zgNcUdJSWhA7/6lOUIazDoKK90hPjqluopIjv8AjwMg2GdDil5AuyT8CwR obgbr6+3uSVmmhQZnVzh2+UkL0BS/EzUAJvoxtPSPIPZeqtjsrwSbt1JFAP7QF45ZjWF g1/pQ682U0dVIDfahAmxkklk1MlEUi+SBooSWAIy+5yZwbswyoafLc65MXayUbt1e7lG kxoR7Sv+yZz8g7R0KaO0lYrayJSYbwlwKnf9zPvo/vsCORyBTK6/c8kzAwAvAVPiNf6l dvJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909630; x=1705514430; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nuUGspoB2E/iuz7gJeUQbFs6iseMlf1RbOG16Q4eGLY=; b=v6+P6lSQ9oc0bjp1uhKS7nVs5PLwk5ckdVjJ7BNdTJsPLN+t/ee5lfOfXrpKhEuV38 YuCdIP8W5s6/i0yvblLmazLF5BiBLj/roUJuNunbgB0heKRRRtKDXw+3xSakb/TwT7SB nxs9iDjmAzCkrWXgIACim70+D7X7IBYcwerJh+GlDNu7hqSozeDMsOvlCuC4aDV9Obxk nEX4rVBeWR1BCxV49MVjL8gofxcem1TQgNQCkWv1Nr0EqrtoO+swjXmAtMhTvrgN9boW /xoqS8hOnxHsUcTSTKNCYqI+TpJBnxbI1IOBoYiDlKhNzN131zqwelwEtSalOEH3iy5Z ROiw== X-Gm-Message-State: AOJu0Yyo2EzcK+Yf5jiMaxr8RYRse2K1ymr0uQ1R3FY3VyEeDwcVMNcB DBTFAVgm3I37DtFViENuSckwz3slifeG/Tn8qAqORvPc2WTlmA== X-Google-Smtp-Source: AGHT+IGrZO1XaxWWJcvWQsRxovuchEWUaH8VQYhBaDs7wbNzLRoMWumcH4eM8SAAP+OFhzULSjkmorOgWGv8cEpUu/o= X-Received: by 2002:a05:6512:b88:b0:50e:d514:77c4 with SMTP id b8-20020a0565120b8800b0050ed51477c4mr814066lfv.2.1704909629696; Wed, 10 Jan 2024 10:00:29 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 Jan 2024 10:00:29 -0800 In-Reply-To: <83msw5hmqn.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Oct 2023 10:22:08 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277803 Archived-At: Eli Zaretskii writes: >> From: StrawberryTea >> Date: Wed, 25 Oct 2023 22:57:58 -0500 >> >> >> Hello. So I am trying to define a function which obtains the command >> that would be called if 'corfu-mode' was not enabled: >> >> (defun +corfu--get-passthrough-command () >> (keymap-lookup >> (thread-last >> (current-active-maps t) >> (delq corfu-map) >> (delq (and (featurep 'evil) >> (evil-get-auxiliary-keymap corfu-map evil-state)))) >> (key-description (this-command-keys-vector)))) >> >> But the issue is basically that >> >> (keymap-lookup (current-active-maps t) >> (key-description (vector 'backspace))) >> >> returns nil whereas >> >> (keymap-lookup (current-active-maps t) (key-description (vector ?\C-?))) >> >> returns 'lispy-delete-backward' which is the command I actually want >> returned. When I run 'describe-key-briefly' and type , I get >> >> DEL (translated from ) runs the command lispy-delete-backward >> >> but I don't know how to look up that translation from Elisp. I looked at >> the code for 'help.el' and found the above description comes from >> 'read-key-sequence' returning 'C-?' and 'this-single-command-raw-keys' >> returning '[backspace]' but 'read-key-sequence' is defined in C and I >> don't know how trigger it's translation logic programmatically from >> Elisp. > > Perhaps Stefan (CC'ed) could help you. > > Btw, this kind of questions should be posted to > help-gnu-emacs@gnu.org, not here. That sounds like this is not a bug, so I'm closing the bug report.