From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: Tim Johnson <tim@akwebsoft.com>
Newsgroups: gmane.emacs.help
Subject: Re: Creating custom key maps for stock bindings
Date: Mon, 20 Jan 2020 16:22:19 -0900
Message-ID: <56063610-9401-47b5-b5dd-fa88deb5b2eb@akwebsoft.com>
References: <b4e50a5a-6499-0f46-68d9-d69b495ceb9b@akwebsoft.com>
 <f18c121d-7839-4a4f-a856-affcfe0cba53@default>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202";
	logging-data="59217"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
To: Drew Adams <drew.adams@oracle.com>, MLEmacs <Help-gnu-emacs@gnu.org>
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 21 02:22:49 2020
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1itiFl-000FMq-Ns
	for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Jan 2020 02:22:49 +0100
Original-Received: from localhost ([::1]:46628 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1itiFk-0004mm-QN
	for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 20 Jan 2020 20:22:48 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42675)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tim@akwebsoft.com>) id 1itiFP-0004lP-37
 for help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:22:28 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tim@akwebsoft.com>) id 1itiFL-0004Zq-1i
 for help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:22:26 -0500
Original-Received: from gateway32.websitewelcome.com ([192.185.145.123]:37296)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <tim@akwebsoft.com>) id 1itiFK-0004ZD-LD
 for help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:22:22 -0500
Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19])
 by gateway32.websitewelcome.com (Postfix) with ESMTP id A45DC834C50
 for <help-gnu-emacs@gnu.org>; Mon, 20 Jan 2020 19:22:21 -0600 (CST)
Original-Received: from host2075.hostmonster.com ([67.20.113.97]) by cmsmtp with SMTP
 id tiFJiT0pu32AdtiFJicuDh; Mon, 20 Jan 2020 19:22:21 -0600
X-Authority-Reason: nr=8
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tj49.com;
 s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version
 :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Fg1bXDVSypBYizqXZfpEXIiBrMUD/HQwcBTJIRUm3kw=; b=Z/dQ5QaNdCrejfWwqdlj+VRP/C
 7x7QE+rq+WJ62oONcc60azk0SysicVbamZGtGZ84ki1F7tTleDinwIidgIm4mlDb6doNuLh9Oh0h4
 9jhhlaE6DvzGB3G3FTFtqZv5i;
Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:59290 helo=[192.168.1.6])
 by host2075.hostmonster.com with esmtpsa
 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92)
 (envelope-from <tim@akwebsoft.com>)
 id 1itiFJ-003PHU-2V; Mon, 20 Jan 2020 18:22:21 -0700
In-Reply-To: <f18c121d-7839-4a4f-a856-affcfe0cba53@default>
Content-Language: en-US
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - host2075.hostmonster.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - akwebsoft.com
X-BWhitelist: no
X-Source-IP: 64.4.232.191
X-Source-L: No
X-Exim-ID: 1itiFJ-003PHU-2V
X-Source-Sender: tjohnson.mtaonline.net ([192.168.1.6]) [64.4.232.191]:59290
X-Source-Auth: tim@tj49.com
X-Email-Count: 2
X-Source-Cap: bW9sZG92YXM7bW9sZG92YXM7aG9zdDIwNzUuaG9zdG1vbnN0ZXIuY29t
X-Local-Domain: yes
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 192.185.145.123
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "help-gnu-emacs"
 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.help:122255
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/122255>


On 1/20/20 4:10 PM, Drew Adams wrote:
>> it occurs to me that I could rebind existing
>> singleton modifier key into something like this
>> (simple examples only):
>>
>> tj-control-keymap, containing all the commands which have a control-
>> char combinations
>>
>> tj-alt-keymap, containing all the commands which have a alt-char
>> combinations
>>
>> tj-control-alt-keymap, containing all the commands which have a
>> control-alt-char combinations
>>
>> The question I have, to avoid possible unforeseen problems down the
>> road, do I need to unset all of these keys before rebinding them to
>> custom keymaps?
> A modifier key is not, by itself, a key sequence.
> So you can't bind, say, `C-' to `tj-control-keymap'.
Understood about the modifiers.
> But you can certainly bind each of the maps you mention
> to a real key sequence, which could be a single key
> (other than a modifier key).
Good.
> And in that case, no, you don't need to unset any
> existing key bindings.  (Of course, if the key you
> bind one of those maps to is already bound to some
> command or another keymap then it will no longer
> be available for that original binding, if you
Cool.
> rebind it.)
>
> See, for example, the value of variable `ctl-x-map',
> which is bound to all of the key sequences that start
> with `C-x'.

I see no utility in rebinding such sequences. With which-key, pressing 
c-x and waiting a couple of seconds invokes a buffer with descriptions 
of all sequences starting with c-x.

I just want to list out for sequences with simpler modifiers, C-char, 
C-M-char, M-char, Super-char and hyper-char.

Looks good to go.

Thanks Drew

-- 
Tim
tj49.com