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:55:00 +0300	[thread overview]
Message-ID: <ebee7ea4-b37e-b227-62f0-6f3644f0776c@gmail.com> (raw)
In-Reply-To: <Z1AIDKj3Lu1tE-0j@lco2>

So, the concrete questions that bother me are as they were in the 
original question. Like 1) Is my idea to create an own keymap the best 
(or is it OK just to change the defaults)?, 2) What about the 
differenced in the approach and the syntax matters, 3) What is the 
correct way of creating my keymap. Sould it be inside of the ".emacs" 
file or a separate one? What commands should I use?

And yes, I read the manual, but it's too difficult... Maybe it's just OK 
to change the defaults? No?

ср, 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
> 	))
>


  parent reply	other threads:[~2024-12-04 15:55 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
2024-12-04 15:55   ` Tatsu Takamaro [this message]
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=ebee7ea4-b37e-b227-62f0-6f3644f0776c@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).