From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tatsu Takamaro Newsgroups: gmane.emacs.help Subject: Re: [External] : Q1 - the keys' bindings to work more widely Date: Tue, 17 Dec 2024 08:41:36 +0300 Message-ID: <03456761-0989-478b-2b77-593142693ca7@gmail.com> References: <6fc3743a-6a0c-cc4d-9470-dcd634d3b461@gmail.com> <43a99cfc-fb6a-6751-7eda-48bb322e6fb1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10917"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 To: Drew Adams , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 17 06:42:45 2024 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 1tNQM1-0002gq-1J for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 17 Dec 2024 06:42:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNQLA-0001YE-Os; Tue, 17 Dec 2024 00:41:52 -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 1tNQL4-0001Xi-Nv for help-gnu-emacs@gnu.org; Tue, 17 Dec 2024 00:41:48 -0500 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNQKz-00086E-DV for help-gnu-emacs@gnu.org; Tue, 17 Dec 2024 00:41:46 -0500 Original-Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3862a921123so3693866f8f.3 for ; Mon, 16 Dec 2024 21:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734414099; x=1735018899; darn=gnu.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=cpxyLjVb2p+a+vfpF2G4BYDnM5ac4nUjAy6Wo/liz2A=; b=G4nADHvqicWHlCvc6sZUTOsPiUJpzeNSlRM6U79o8mwh+B0cAGLLKDsd3f+2N7cDZ7 pxX/a6U2Vp7kBGtCvugkjFH0UDrWvkrCrjMgkn65VgsRpgxJ6r6aMf0P23E+PdEhZ2YO 90HmYJS9YjjPF+Er/R4OhVmkKpZnN+ga75WLRTc2D3U7Ms+MFx3cm2Np4q1C1eZfpaSr 8UyfRPXHUACOrmWJUy5PvNxlMboXV+46boe+0RGqzxrMMoc8UrIp1RZHoZMWDXBweOV7 qhKFMZ2/cr0T4X/kFBv6OTKEeQSLrE3ynUVMKuhJi6OAaW79G3iEkVUGJY3vgDEGXN/5 zUUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734414099; x=1735018899; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=cpxyLjVb2p+a+vfpF2G4BYDnM5ac4nUjAy6Wo/liz2A=; b=QAnILYtT5MsiolH75tgnVg1xhwMKJYrULxS7JbQ6nnKC8mJfVg1WLVsw2YN2o+Xf0Y mIPC6UZUDcsuIyc9w3z5zG1hHFFAjtDMD0rVPjXI4XwQdpbdOXS4eKDHapoHWasTz3nS CX9dY8DxZoiyDPMz5cqkVXY/GMZBj65stf1rsl2cBKinHN7hEEYlbNyMuUTEfVzpfXyE dt9pLH1rXvOTxX6lW+5AOhCVDW+tH1ka7gUPSj0KoOkkdli+hyPGiSbsZxtx2D7ZWgv2 OW7j2/EeAnCc1edvXusJI87ddNEpkyH6IuI/rnAnc4V12aTWYM0cEJyHr8Nr8h32vnpL fVgw== X-Forwarded-Encrypted: i=1; AJvYcCXggr1ecdDqDQVpkOk9s8V4CY25HhgJCYxgB+OERO4nKL9yw/5Fh9ulkb/7hdPTiWLYLFsXZU956k6bK3ph8g==@gnu.org X-Gm-Message-State: AOJu0Yxvb1Ex2QPGrwsdu+NXxeixhj2GCx3PdfuEQDuQUn5QK2KntCaV 3uuodefuNiNb9ajxttoEuHtMv7URjA7VkBgtiHjXwk7BD07j/wtnVFPCFA== X-Gm-Gg: ASbGncvlx3NXgkS3RRKBNyRw6cncR8MtYNc2GNhMSZRgOFxIw4AaGttZjzgNk+9NFVS kqYC8nSbPsF9B/6lAmThckobHMxwVU+DFhkfSApXV3F9FTJagLDHRbqjF4CJ2y5pPpYQKGRA153 XRX90TN4J7eSIk96ZYpPxgnqw2E/O7la8AHKd2LtxhOHyAOlwGpsXmSwrqI8NI5DCPM0WhxTQ/e nCCeIJ7kvIMKLskAw6oeqqR43sUTw6UQMY3BHqsaU1dQOlXz5yG7u68N3lgJh9uU6PMG8sjsPHO rXuHt/JcXDMGfxEjQnp2h/0RKu2/M3C2Jmz66WyipYq0zzE1tIkR X-Google-Smtp-Source: AGHT+IE2656CielooI/3aZe9BO+VX/XjCFGKH4nK1ABPlV5cxfAwY6QZVLA11XzvxqNlu2KW4rTq3A== X-Received: by 2002:a5d:6da2:0:b0:386:3263:6c76 with SMTP id ffacd0b85a97d-3888e0bb41bmr11627707f8f.54.1734414098848; Mon, 16 Dec 2024 21:41:38 -0800 (PST) Original-Received: from [192.168.1.120] (broadband-37-110-24-126.ip.moscow.rt.ru. [37.110.24.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43636067436sm105657205e9.23.2024.12.16.21.41.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Dec 2024 21:41:37 -0800 (PST) Content-Language: ru In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=tatsu.takamaro@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, HTML_FONT_SIZE_LARGE=0.001, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.934, 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-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:148857 Archived-At: This one works: *:keymap '(keymap (?a . kill-ring-save)))* But I'm not sure why. I wrote the page you gave, and another one (https://www.gnu.org/software/emacs/manual/html_node/elisp/Classifying-Events.html) but I don't completely understand the meaning of sign ? before "a". It seems, this is to indicate a key(s) as an event, but I can't find the explaination of all such signs neither in the web nor in the official docs. Another sign of that kind is a backslash and as I got it should be in front on a modifier key. *But why? *You know it's always difficult to search the web by a one-digit symbol. But yes, I managed to do what I wanted with this *(?\C-c . kill-ring-save)** **(?\C-a . mark-whole-buffer)* and so on. Thank you! Many problems of this kind are from not knowing Elisp. ^_^ вт, 17.12.2024 5:17, Drew Adams пишет: >>> This is a keymap: '(keymap ("a" . #'kill-ring-save))) > It satisfies `keymapp', at least. ;-) But unfortunately, > `keymapp' doesn't guarantee a keymap. The Elisp manual > says it allows any list whose car is `keymap': > > More precisely, this function tests for a list whose CAR is > ‘keymap’, or for a symbol whose function definition satisfies > ‘keymapp’. > >> Do you mean this: >> >> (define-minor-mode ttkeys-mode "Normal key bindings" >> :init-value 1 :lighter " TT" :global 1 >> :keymap '(keymap ("a" . #'kill-ring-save))) >> >> Doesn't work either. > Try this: > > :keymap '(keymap (?a . kill-ring-save))) > > or this: > > :keymap '(keymap (97 . kill-ring-save))) > > https://www.gnu.org/software/emacs/manual/html_node/elisp/Format-of-Keymaps.html