unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tatsu Takamaro <tatsu.takamaro@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Remapping keys and creating my own keymap \\ too complicated\\
Date: Wed, 4 Dec 2024 18:49:02 +0300	[thread overview]
Message-ID: <db479d61-3a41-71d3-d7e0-253a29ba6d30@gmail.com> (raw)
In-Reply-To: <Z1AIDKj3Lu1tE-0j@lco2>

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
> 	))
>


  reply	other threads:[~2024-12-04 15:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 16:59 Remapping keys and creating my own keymap \\ too complicated\\ Tatsu Takamaro
2024-12-04  7:43 ` Jean Louis
2024-12-04 15:49   ` Tatsu Takamaro [this message]
2024-12-04 15:55   ` Tatsu Takamaro
2024-12-04 16:06     ` Robert Pluim
2024-12-04 16:37       ` Tatsu Takamaro
2024-12-04 16:40         ` Robert Pluim
2024-12-04 17:05           ` Tatsu Takamaro
2024-12-05 10:25             ` Robert Pluim
2024-12-05 18:08               ` Tatsu Takamaro
2024-12-06  9:57                 ` Robert Pluim
2024-12-06 10:38                   ` Jean Louis
2024-12-06 13:18                     ` Robert Pluim
2024-12-08 16:16                       ` Tatsu Takamaro
2024-12-08 23:07                         ` Stephen Berman
2024-12-09 22:34                           ` Tatsu Takamaro
2024-12-04 16:25 ` Jean Louis
2024-12-04 16:57   ` Tatsu Takamaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db479d61-3a41-71d3-d7e0-253a29ba6d30@gmail.com \
    --to=tatsu.takamaro@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).