GNU bug report logs - #67199
Koutliner breaks Emacs key binding conventions

Previous Next

Package: hyperbole;

Reported by: Martin Marshall <law <at> martinmarshall.com>

Date: Wed, 15 Nov 2023 17:04:01 UTC

Severity: normal

To reply to this bug, email your comments to 67199 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-hyperbole <at> gnu.org:
bug#67199; Package hyperbole. (Wed, 15 Nov 2023 17:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Marshall <law <at> martinmarshall.com>:
New bug report received and forwarded. Copy sent to bug-hyperbole <at> gnu.org. (Wed, 15 Nov 2023 17:04:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Martin Marshall <law <at> martinmarshall.com>
To: bug-hyperbole <at> gnu.org
Subject: Koutliner breaks Emacs key binding conventions
Date: Wed, 15 Nov 2023 01:01:36 -0500
Hello, I was trying out the Koutliner and found that it shadowed several
of my custom keybindings.  I did a few searches of the mailing list
archives and didn't see mention of this.

Appendix D.2 of the GNU Emacs Lisp Reference Manual provides:

     Don’t define C-c letter as a key in Lisp programs. Sequences
     consisting of C-c and a letter (either upper or lower case; ASCII
     or non-ASCII) are reserved for users; they are the only sequences
     reserved for users, so do not block them.

It looks like the following keybindings in `kotl-mode-map' go astray
from this convention.

C-c a		kotl-mode:add-child
C-c b		kvspec:toggle-blank-lines
C-c c		kotl-mode:copy-after
C-c d		kotl-mode:down-level
C-c e		kotl-mode:exchange-cells
C-c g		kotl-mode:goto-cell
C-c h		kotl-mode:cell-help
C-c k		kotl-mode:kill-contents
C-c l		klink:create
C-c m		kotl-mode:move-after
C-c p		kotl-mode:add-parent
C-c s		kotl-mode:split-cell
C-c t		kotl-mode:transpose-cells
C-c u		kotl-mode:up-level

I use:  Editor:      GNU Emacs 29.1
        Hyperbole:   8.0.1pre
        Sys Type:    x86_64-pc-linux-gnu
        OS Type:     gnu/linux
        Window Sys:  pgtk
        News Reader: Gnus v5.13
        Install:     git, 49588396bb
scroll-down-command: Beginning of buffer-- 

Best regards,
Martin Marshall




Information forwarded to bug-hyperbole <at> gnu.org:
bug#67199; Package hyperbole. (Wed, 15 Nov 2023 21:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 67199 <at> debbugs.gnu.org (full text, mbox):

From: Mats Lidell <mats.lidell <at> lidells.se>
To: Martin Marshall <law <at> martinmarshall.com>
Cc: 67199 <at> debbugs.gnu.org
Subject: Re: bug#67199: Koutliner breaks Emacs key binding conventions
Date: Wed, 15 Nov 2023 22:12:39 +0100
Hi Martin,

Thanks for the report.

> Martin Marshall writes:
> Hello, I was trying out the Koutliner and found that it shadowed several
> of my custom keybindings.  I did a few searches of the mailing list
> archives and didn't see mention of this.
>
> Appendix D.2 of the GNU Emacs Lisp Reference Manual provides:
>
>      Don’t define C-c letter as a key in Lisp programs. Sequences
>      consisting of C-c and a letter (either upper or lower case; ASCII
>      or non-ASCII) are reserved for users; they are the only sequences
>      reserved for users, so do not block them.
>
> It looks like the following keybindings in `kotl-mode-map' go astray
> from this convention.
>
> C-c a		kotl-mode:add-child
> C-c b		kvspec:toggle-blank-lines
> C-c c		kotl-mode:copy-after
> C-c d		kotl-mode:down-level
> C-c e		kotl-mode:exchange-cells
> C-c g		kotl-mode:goto-cell
> C-c h		kotl-mode:cell-help
> C-c k		kotl-mode:kill-contents
> C-c l		klink:create
> C-c m		kotl-mode:move-after
> C-c p		kotl-mode:add-parent
> C-c s		kotl-mode:split-cell
> C-c t		kotl-mode:transpose-cells
> C-c u		kotl-mode:up-level
>
> I use:  Editor:      GNU Emacs 29.1
>         Hyperbole:   8.0.1pre
>         Sys Type:    x86_64-pc-linux-gnu
>         OS Type:     gnu/linux
>         Window Sys:  pgtk
>         News Reader: Gnus v5.13
>         Install:     git, 49588396bb
> scroll-down-command: Beginning of buffer-- 
>
> Best regards,
> Martin Marshall

I'm afraid this is a known issue that we have not set as a priority to fix
yet. Possibly because kotl-mode defines a lot of bindings, bindings that has
been there for a very long time. Plus we have not been able to come up with
any good alternatives.

Thanks for letting us know that you are negatively affected by the misuse of
the bindings so we see this side of the coin too and can take that into
account when prioritizing this.

Yours
-- 
%% Mats




Information forwarded to bug-hyperbole <at> gnu.org:
bug#67199; Package hyperbole. (Thu, 16 Nov 2023 00:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 67199 <at> debbugs.gnu.org (full text, mbox):

From: Martin Marshall <law <at> martinmarshall.com>
To: Mats Lidell <mats.lidell <at> lidells.se>
Cc: 67199 <at> debbugs.gnu.org
Subject: Re: bug#67199: Koutliner breaks Emacs key binding conventions
Date: Wed, 15 Nov 2023 19:29:01 -0500
[Message part 1 (text/plain, inline)]
Hi Mats, thanks for the reply.

> kotl-mode defines a lot of bindings, bindings that has been there
> for a very long time.

I suspected that might be a factor.  Very understandable.

In case anyone finds it helpful, I used the code below to create a
"C-c C-x" prefix and move the bindings there.  Being new to Koutliner,
I don't know if that will be the best place for these bindings.  But
it works for now.

(defvar-keymap my-kotl-extra-map
    "a" 'kotl-mode:add-child
    "b" 'kvspec:toggle-blank-lines
    "c" 'kotl-mode:copy-after
    "d" 'kotl-mode:down-level
    "e" 'kotl-mode:exchange-cells
    "g" 'kotl-mode:goto-cell
    "h" 'kotl-mode:cell-help
    "k" 'kotl-mode:kill-contents
    "l" 'klink:create
    "m" 'kotl-mode:move-after
    "p" 'kotl-mode:add-parent
    "s" 'kotl-mode:split-cell
    "t" 'kotl-mode:transpose-cells
    "u" 'kotl-mode:up-level
    "C-h" 'kotl-mode:hide-tree)
(defvar kotl-mode-map) ; Keep Flymake happy.
(advice-add
 'kotl-mode:setup-keymap :after
 (lambda ()
   (define-keymap
     :keymap kotl-mode-map
     "C-c a" nil
     "C-c b" nil
     "C-c c" nil
     "C-c d" nil
     "C-c e" nil
     "C-c g" nil
     "C-c h" nil
     "C-c k" nil
     "C-c l" nil
     "C-c m" nil
     "C-c p" nil
     "C-c s" nil
     "C-c t" nil
     "C-c u" nil
     "C-c C-h" nil
     "C-c C-x" my-kotl-extra-map)))

-- 
Best regards,
Martin Marshall

Information forwarded to bug-hyperbole <at> gnu.org:
bug#67199; Package hyperbole. (Thu, 16 Nov 2023 00:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 67199 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rswgnu <at> gmail.com>
To: Martin Marshall <law <at> martinmarshall.com>
Cc: Mats Lidell <mats.lidell <at> lidells.se>, 67199 <at> debbugs.gnu.org
Subject: Re: bug#67199: Koutliner breaks Emacs key binding conventions
Date: Thu, 16 Nov 2023 00:44:40 +0000
Nice solution, Martin.  You can join the low traffic hyperbole-users mail list via instructions in the README or manual and let us know what uou like and don’t like about the Koutliner.  Please use the pre-release available as a package at elpa-devel.  — rsw

> On Nov 16, 2023, at 12:30 AM, Martin Marshall <law <at> martinmarshall.com> wrote:
> 
> Hi Mats, thanks for the reply.
> 
>> kotl-mode defines a lot of bindings, bindings that has been there
>> for a very long time.
> 
> I suspected that might be a factor.  Very understandable.
> 
> In case anyone finds it helpful, I used the code below to create a
> "C-c C-x" prefix and move the bindings there.  Being new to Koutliner,
> I don't know if that will be the best place for these bindings.  But
> it works for now.
> 
> (defvar-keymap my-kotl-extra-map
>    "a" 'kotl-mode:add-child
>    "b" 'kvspec:toggle-blank-lines
>    "c" 'kotl-mode:copy-after
>    "d" 'kotl-mode:down-level
>    "e" 'kotl-mode:exchange-cells
>    "g" 'kotl-mode:goto-cell
>    "h" 'kotl-mode:cell-help
>    "k" 'kotl-mode:kill-contents
>    "l" 'klink:create
>    "m" 'kotl-mode:move-after
>    "p" 'kotl-mode:add-parent
>    "s" 'kotl-mode:split-cell
>    "t" 'kotl-mode:transpose-cells
>    "u" 'kotl-mode:up-level
>    "C-h" 'kotl-mode:hide-tree)
> (defvar kotl-mode-map) ; Keep Flymake happy.
> (advice-add
> 'kotl-mode:setup-keymap :after
> (lambda ()
>   (define-keymap
>     :keymap kotl-mode-map
>     "C-c a" nil
>     "C-c b" nil
>     "C-c c" nil
>     "C-c d" nil
>     "C-c e" nil
>     "C-c g" nil
>     "C-c h" nil
>     "C-c k" nil
>     "C-c l" nil
>     "C-c m" nil
>     "C-c p" nil
>     "C-c s" nil
>     "C-c t" nil
>     "C-c u" nil
>     "C-c C-h" nil
>     "C-c C-x" my-kotl-extra-map)))
> 
> -- 
> Best regards,
> Martin Marshall
> _______________________________________________
> Bug-hyperbole mailing list
> Bug-hyperbole <at> gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-hyperbole




This bug report was last modified 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.