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: Remapping keys and creating my own keymap \\ too complicated\\ Date: Wed, 4 Dec 2024 18:49:02 +0300 Message-ID: References: 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="21314"; 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 Wed Dec 04 16:49:55 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 1tIrdS-0005R9-JZ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 16:49:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIrct-0006NP-4T; Wed, 04 Dec 2024 10:49:19 -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 1tIrcl-0006N5-RE for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 10:49:13 -0500 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIrci-0000UH-JJ for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 10:49:10 -0500 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-53e1f673ca8so557298e87.3 for ; Wed, 04 Dec 2024 07:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733327346; x=1733932146; 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=T32E19asfUsUJWGEHLG/Ej0Q1NcqeckUWW5itgRJDJk=; b=FjTXgBt9JFd8NxU4MogsoqcubRvHQDKv5CutCpW1iEbKp/idO2IjCwvFNDFcHxBd6w dshT0FBuVBkvuBkae0b1+hEhzokiZ9n4+GA2Vp8tIQI42ZoibrYabzRM0BedyTuHKC9P UInY1SL6b7uJNY6YJSCYj6kRu8NVX/OfSlVQ9U3s2mGcRToqCo8Q5X4CNmvK3LZIrDwN L/a/DImTWxcnH/r66yUlLtnNG2vOxkkCjQvlHCLKMS2RnxedUHcJL5NtWyWd2KrJGpmk vuWSijzpu8vr+PrZf/Y9oWqbbIEtyhoYbc346tEoC9AATBjqsRvT4VitIJiI5y6VAiIK 9JUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733327346; x=1733932146; 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=T32E19asfUsUJWGEHLG/Ej0Q1NcqeckUWW5itgRJDJk=; b=welpEn42Om3gsS4rvgRX3WfJ+YAdPQIul72/AD977y4AzGPoKMQCAnY4/X/l2pClUw n+bqqe7Msbcv9ZhniK+AefECGIyo8GxXYzLUxybrBFb2ApkpJQ1Qte5vCIwJ+2xpHw8v rpvPKC/BjZeNKKIEvFaijC3t1KrUBYicCdShrrrK9CO2SR1ijHunUz6aN05C/X18vDim 9+NbTthy2FfDmYRRvxZ6GOLDZfEfhLoBpeC47FkyvbubCJwlAP9jG2WqtAsVT9RquuVw EAOlTCwgpfZQoZCyxSdXrE6s9usuuWVpBVFCmhQzmpE2LoyzgPr8EItb99WVIB6+2JfH aATQ== X-Gm-Message-State: AOJu0Yw2H5DSXjbQ+A85QvfSj0KByeKkAuYLKIi03z5v1EVnV00L4Yz4 W0tczuB/BizRaI9y41ZSM3k4E8eb2i373h1xeSH/mFIfgVh5XK6nbLynvEQg X-Gm-Gg: ASbGncvVoCdPiUHE7AkPcF9Qn/RRqwaedx5dJ53Z67WHIX+lDULrsS/8nR+YiZDlgBH 5hn5fuoO7p9esw3203nSfs6wX8tXknxGljMqHS1Fo8hLiFr2ug0CcITJATI/XYCjhI54z8mioaK TeOY+v6+XYsUlSl+8YMSmkmzKrhIKpFaTdifEuwzrII0R8cw1daQOIutE6V71OnI78ME4A0GEUF GuokFsjGy8bN5EHcFGGrYsLxrmGRbQe8t/g8YjUGdNfnHi7K56YmXePDF5Jei1i1WV9UF0gdinE jh4NMWtpnq4InY4m12x1rFF8kQjJmjXamhMpMVE= X-Google-Smtp-Source: AGHT+IHwqKcKjaqUXTeUC7QdMcWoIQuTTDDALjgnsqV205ciDUjZGhVHodDxHjuU2JgaWzI6j97vnA== X-Received: by 2002:a05:6512:1188:b0:53d:ab10:c273 with SMTP id 2adb3069b0e04-53e1b8b6bd3mr1532886e87.40.1733327346082; Wed, 04 Dec 2024 07:49:06 -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 2adb3069b0e04-53e1b676409sm450491e87.42.2024.12.04.07.49.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Dec 2024 07:49:04 -0800 (PST) Content-Language: ru In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=tatsu.takamaro@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 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, NICE_REPLY_A=-0.27, 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:148598 Archived-At: Well, though this it interesting, it is still far from what I asked. There were 3 points which I want to understand. Not an example, but an explaination according to my exact questions. You know, the answers that I find in the Internet are too easy and irrelevant, but the official docs info is too difficult and irrelevant... So I need someting in between, maybe. ср, 04.12.2024 10:43, Jean Louis пишет: > Here is example how I have defined some global keys: > > (defvar cf-map) > (define-prefix-command 'cf-map) > (keymap-global-set "C-c p" 'cf-map) > (keymap-set cf-map "l" #'cf-people-last-few) > (keymap-set cf-map "N" #'cf-people-add) > (keymap-set cf-map "P" #'cf-people-search-ts-query) > (keymap-set cf-map "a" #'cf-people-list-by-name) > (keymap-set cf-map "c" #'cf-people-by-country) > (keymap-set cf-map "d" #'cf-people-by-description) > (keymap-set cf-map "f" #'cf-find-files-of-person) > (keymap-set cf-map "i" #'cf-people-by-interactions) > (keymap-set cf-map "j" #'cf-people-by-phone) > (keymap-set cf-map "m" #'cf-messages-repeat-to-last-person-sent) > (keymap-set cf-map "n" #'cf-people-by-name) > (keymap-set cf-map "p" #'cf-people) > (keymap-set cf-map "r" #'cf-people-by-rank) > (keymap-set cf-map "w" #'cf-people-not-in-any-list) > > And here is example how I have defined some menus: > > (defvar cf-people-menu-find-people > (list "Find people" > ["Find people" cf-people t] > ["Find people by name" cf-people-by-name t] > ["Find people by query" cf-people-search-ts-query t] > ["Find files of person" cf-find-files-of-person t] > ["Find people by description" cf-people-by-description t])) > > (defvar cf-people-menu-list-of-people > (list "List of people" > ["Find people by rank" cf-people-by-rank t] > ["Latest contacts" cf-people-last-few t] > ["List contacts by interactions" cf-people-by-interactions t] > ["People by country" cf-people-by-country t] > ["People without account" cf-people-not-in-any-list t] > ["People from last 60 days without valid email" cf-people-recent-with-failed-email-addresses t])) > > where above functions are used in the following: > > (easy-menu-define cf-people-menu global-map "People menu" > (list "People" > cf-people-menu-find-people > cf-people-menu-list-of-people > cf-people-menu-collaborate > cf-people-menu-add-new-people > cf-people-menu-edit-people > cf-mailing-list-menu > cf-central-files-menu > rcd-db-database-maintenance-menu > ;;hyperscope-menu-module-for-other-menu > )) >