From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Remapping keys and creating my own keymap \\ too complicated\\ Date: Wed, 4 Dec 2024 10:43:08 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14296"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.12 (2023-09-09) Cc: help-gnu-emacs@gnu.org To: Tatsu Takamaro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 08:44:50 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 1tIk42-0003c7-Ka for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 08:44:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIk3L-0005to-CP; Wed, 04 Dec 2024 02:44:07 -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 1tIk3C-0005Zr-DF for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 02:44:01 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIk38-0006ln-4c for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 02:43:57 -0500 Original-Received: from localhost ([::ffff:41.75.179.4]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081FFA.0000000067500837.0036865B; Wed, 04 Dec 2024 00:43:50 -0700 Mail-Followup-To: Tatsu Takamaro , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148591 Archived-At: 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 )) -- Jean Louis