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: Q1 - the keys' bindings to work more widely Date: Sun, 15 Dec 2024 02:46:23 +0300 Message-ID: <6fc3743a-6a0c-cc4d-9470-dcd634d3b461@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21039"; 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: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 15 00:47:23 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 1tMbr1-0005Ot-Pi for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 15 Dec 2024 00:47:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMbqC-0003sh-Oh; Sat, 14 Dec 2024 18:46:32 -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 1tMbqB-0003sT-Du for help-gnu-emacs@gnu.org; Sat, 14 Dec 2024 18:46:31 -0500 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMbq9-0005Mi-RR for help-gnu-emacs@gnu.org; Sat, 14 Dec 2024 18:46:31 -0500 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43635796b48so6063425e9.0 for ; Sat, 14 Dec 2024 15:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734219985; x=1734824785; darn=gnu.org; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=dZg6kSelo0nDCZvx4gv5bNMr51ALHPaVADXuJychiBw=; b=lIoFpYFiFSP+o0Hdtyetc7JJ+UVQZWZAcFcA2EGEU9M1y0QXYfQ+wbZY0vFHT8C6uz 68SfzijnK4xyFJ6GIx0GQv0thf5/6zhcWXIm1l9bsbsVp+75nln2QHdCJtFzJPzCstMu QUCiMGaTtM2FzpdDUOAdZ4fgoDlO4dJET8K0SvavyVotardhlvU2gWNB8aQgI5Uk5sFf QYKSy1SQaEj2lDKjJn4O8x1w5M63+DMlBa+c+wPh10hU5SYTgef4lufqOQuIxbTsxVQ4 VTH3eecnXBPQFr/1d3wM9VIcDy/VJARzFtf0c+DO1PkNP6iXTuT1xydDiXQ+8QtQ/EqB zL1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734219985; x=1734824785; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dZg6kSelo0nDCZvx4gv5bNMr51ALHPaVADXuJychiBw=; b=mFzN7DrKIhzJ/zTXFmuvQ2Ns1rI5vo8EYfJt6gy8qxITD6gAhaS52D5IY5S22pmnKW RXVa2sHXdu28MAKIKHAQg+KlAo3SOP+d1addND2IH5jqATixKIOs2bDUb+UhVrDHAmoC J7UIfuCpzNTZSqflVfGIwX61BkTfdpt6yMAbacgLecWAjecBp0cvtpBx+Ri1DtS44Nj1 Sj+oF6+9tukxJzI16Ojx4SmTcv+tKrNYYtWmxg1Ia+eai4cYvAcAprvTNVcCSCYw1Ap1 uHfKAHVt3CPYVlb1RAnVinbD7wkUhAMFmLUtK59Ra1b3of+YDpsAjuGa6s7Vkfb4dHAY 8HfQ== X-Gm-Message-State: AOJu0YzkW2NyZOXFxVCWhkzLpTMODZOJnC6XQRQOCBsp6PcDZ2n3V6fe U6T8GXD30Di1hjC3zgIO1E6eBLyIunWN5KWA45/WTZb2QcfpN9oRdirb4Q== X-Gm-Gg: ASbGnctFCHHu922177i0iuWdXkBNWaUR16Crz5KL8k4P3XL7OqgLzMDEaRmgptoUdTU 5biQLaDriJUqrCbOVjvjLKqRIHRExG/2ECXqavpVeGhK/iNbKZu3BTVNCYA6R+0TEM6F7UGOr4C 18YmWEhG/etPdAw1K4gpWUb5XOdC6ZfQXK6TM8u0bUHvV0bthXHMpFczIu469GbH3/QPnhEcNMI o/NmlegaqY1lnBB/h4bb6IfuNKHFTae48VeZbRO9f3E/BmDS2OkPIQRlESF1Sa5a2aa50xVcXDU RRp9+SNtDQxeyCgStr+HyjoygW2VjETiqLLdhf5E0afQLw== X-Google-Smtp-Source: AGHT+IGJRB/sYRV1Iz1jw0wa1qbjRnPJ5WMSg4GntHHjYHryDnwhSMlIqQrx+pQpX72Uhzp3DblbEA== X-Received: by 2002:a05:600c:c8c:b0:42c:b8c9:16c8 with SMTP id 5b1f17b1804b1-4362b14bbe0mr56568205e9.10.1734219984980; Sat, 14 Dec 2024 15:46:24 -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-43625706c82sm92920135e9.35.2024.12.14.15.46.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Dec 2024 15:46:24 -0800 (PST) Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=tatsu.takamaro@gmail.com; helo=mail-wm1-x335.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, HTML_MESSAGE=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-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:148798 Archived-At: Hi there, sirs! I'm new to Emacs, just a month from the beginning. I've managed to do all the major settings, wrote through the Tutorial. But for now there are 4 residual questions. I'll ask them one by one, one per letter to get more precise. So, here is the first one. I would like to have my keys (my bindings) working more widely so that I could trust them more. But for now some of them don't work. E. g. in a Help buffer C-c doesn't work as a copy action (though it works globally as I set). And this is not surprising. I understand that major modes have priority over the global one. What is the best idea to make my keys more reliable? One way is to change all the major and minor modes, but it's a big load of work and code. Another way is to create my own minor mode key bindings and make it be turned on by default, and I managed to find how it should be done ("init-value" and "global" should be non-nil, in the "define-minor-mode" call). So I hope I'm somewhere close to the solution. Here is my function call with an example of C-c rebinding: (define-minor-mode ttkeys-mode "My key bindings" :init-value 1 :lighter " TT" :global 1 :keymap '( ("C-c" . #'kill-ring-save) ("C-a" . #'mark-whole-buffer) ) ) The TT mode is being shown normally, I can switch in on and off, but the C-c and C-a don't work as I told them to. I tried to vary signs like # and ', but no result. What am I doing wrong? And, maybe there is some other advice that you could give to make my keys more reliable (make them work everywhere in Emacs)? Don't offer a CUA mode, I know about it, but it doesn't meet my needs. Tony.