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: Proper way to add bindings under C-x 8 Date: Thu, 02 Dec 2021 11:26:50 +0100 Message-ID: <87pmqfe1zp.fsf@gmail.com> References: <835z0u596d.fsf@gnu.org> <83zgy548vr.fsf@gnu.org> <87lf15ev23.fsf@web.de> <87k0gp4y37.fsf@gmail.com> <875ys937xp.fsf@gmail.com> <83r1axtv2e.fsf@gnu.org> <871r2x35mu.fsf@gmail.com> 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="27194"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, Howard Melman To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 02 11:27:42 2021 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 1msjJW-0006xZ-AI for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 11:27:42 +0100 Original-Received: from localhost ([::1]:37654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msjJU-0005yW-AF for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 05:27:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msjIm-0005wq-LF for help-gnu-emacs@gnu.org; Thu, 02 Dec 2021 05:26:58 -0500 Original-Received: from [2a00:1450:4864:20::433] (port=38546 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msjIk-00018J-Q7; Thu, 02 Dec 2021 05:26:56 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id q3so35730790wru.5; Thu, 02 Dec 2021 02:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=uQzptSEwDxdxfysfwwqt6xduLZk5lSkwMwtFj4uDYNg=; b=TXvhtB++vY/+0i4tc/+uffRkSZE3a+EIegOF8XxzHMRQ1VAEAnML2p8zizcbYogiHd uaCRqt0b8bKUaHq3TqlfQtgQDi2c3r61OxqyUvw/vmyXGRKVmI0AvcW/VYcGp0dskedq AX1KdrUv8vnOcD9zgL1s7I49uRquRZzEbLQzGmU7+2zz9ALw+lM/iBsxhlmR06cuHhRD 5gA52wSP1RHJyJqMxlV/qBo+WLFvRgY1GFhdSC0w8c5wrBhKkA5CdXd4rFKF4QQGVSM5 u7ym3KJBxRLiwdOg2/q9r+u58yHlRwFgZ9y/u3meo4nKNUFQKQzdfO8ne2KlHxOVrPw7 LVsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=uQzptSEwDxdxfysfwwqt6xduLZk5lSkwMwtFj4uDYNg=; b=gnA+zYIPDb59XKQpFAbcJSPnit+tISTlomW9Yg9KYw6YPwbbuuPdujvKdcPR3AizY6 8CzkGIwxB1F7itEuIuipAFwM/d490TtKQTsI+NFdTXC9etP8hu+hnRoreZM9O1T+3Txc jGg/Pi9Q/DblHu5TR+C6LGR700/neq0IAIpqEZhq8+qMOeJMCmMsQZCzy/y2QsY6MbxN y9x1Efuq1pvjxLFO6IRbib6Vg1bL7YmNSJpOSEqrXiJbgz9ybQBUYU5BMPKVTzqm+oVy nWlMdGQI+JVeZHxUJVjoCvT4UXwVwNPwIib/vn+Lo00noF+Gi3muKOr47BfdSg1vCG3x Q9Eg== X-Gm-Message-State: AOAM532Cia9XNkBwbiOqTvWQq5FZhS9Xq9p/dOHzx9Y2g/jK329CH8bv I0jBzCtSvzaBSuCQrHnhuxNStGVyBKk= X-Google-Smtp-Source: ABdhPJwHwpQzXSm6ZzY6RKCOoHXDuA2lAR/jWOlWp8ijxWZLhl2BEUI0FQmCZW3rVIadgENpE8fLAw== X-Received: by 2002:a5d:40cf:: with SMTP id b15mr13748179wrq.161.1638440812007; Thu, 02 Dec 2021 02:26:52 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb50:97f2:6b7d:aacf:5c88]) by smtp.gmail.com with ESMTPSA id c4sm2154813wrr.37.2021.12.02.02.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 02:26:51 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: (Howard Melman's message of "Tue, 30 Nov 2021 12:43:33 -0500") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) 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: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.help:134776 Archived-At: >>>>> On Tue, 30 Nov 2021 12:43:33 -0500, Howard Melman = said: >> I am? I don=CA=BCt feel like I have any grasp of it at all. Howard> I'd like to know. The work-around posted doesn't bind Howard> things in all the places iso-tranl-define-keys does (only Howard> under C-x 8) and I find that code a bit opaque. So the elisp manual says the following in "(elisp) Translation Keymaps" (see especially that last sentence) Translation keymaps have the same structure as other keymaps, but are used differently: they specify translations to make while reading key sequences, rather than bindings for complete key sequences. As each key sequence is read, it is checked against each translation keymap. If one of the translation keymaps binds K to a vector V, then whenever K appears as a sub-sequence _anywhere_ in a key sequence, that sub-sequence is replaced with the events in V. "event_s_ in V." Later in the same node: You can use =E2=80=98input-decode-map=E2=80=99, =E2=80=98local-funct= ion-key-map=E2=80=99, and =E2=80=98key-translation-map=E2=80=99 for more than simple aliases, by = using a function, instead of a key sequence, as the translation of a key. Then this function is called to compute the translation of that key. "instead of a key _sequence_" So I=CA=BCd expect the following (define-key iso-transl-ctl-x-8-map "ef" (vector #x2660 #x2660)) to allow me to use C-x 8 e f to insert U+2660 twice, but it only inserts it once. What am I missing? (emacs-master, although I doubt that matters) Robert --=20