2 added 265 characters in body
source | link

I can't answer about what the longest might be out there somewhere, but here's one bit of info that might help.

  1. I have some libraries that provide a set of related commands bound to keys in a keymap that I bind to a prefix key.

    Because I don't want to co-opt user keys etc., I typically bind such a prefix key under, say C-x or, for other-window commands, under C-x 4 (keymap ctl-x-4-map).

  2. The same considerations apply to groups of commands in such a keymap: they sometimes get their own keymap. And so on, recursively.

  3. I expect that at least some users might want to rebind any such keymaps (at any level) to their own, shorter, prefix keys, or they might want to bind specific commands to shorter key sequences. But I don't want to do that in the library itself, obviously.

Here's an example of one such fairly long key: C-x 4 j t . % * (seven keystrokes), which is bound to command icicle-bookmark-file-this-dir-all-tags-regexp-other-window in Bookmark+.

Anatomy:

  • On the C-x 4 prefix key (ctl-x-4-map).

  • On the j prefix key, which is for all commands for jumping to a bookmark.

  • On the t prefix key, which is for all commands for jumping to bookmarks that are tagged in some way.

  • On the . prefix key, which is for all commands for jumping to bookmarks that are for thingsfiles in the current directory that are tagged in some way.

  • On the % prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags that match a regexp you are prompted for.

  • On the * key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags, ALL of which match a regexp you are prompted for. (By contrast, C-x 4 j t . % + is for bookmarks SOME of whose tags match the regexp.)

All of that is conventional in Bookmark+ (and some of it corresponds to Dired conventions, BTW): j is for jump commands, t is for tagged, . is for current-directory, % is for regexp, and * is for all (+ is for some).


(Oh, and using @mkcms's sexp, I get C-x 4 j t f % *, which is equally long. The f stands for file. It's like C-x 4 j t . % *, but the candidate bookmarks for completion are all file bookmarks, not just those for files in the current directory (.).)

I can't answer about what the longest might be, but here's one bit of info that might help.

  1. I have some libraries that provide a set of related commands bound to keys in a keymap that I bind to a prefix key.

    Because I don't want to co-opt user keys etc., I typically bind such a prefix key under, say C-x or, for other-window commands, under C-x 4 (keymap ctl-x-4-map).

  2. The same considerations apply to groups of commands in such a keymap: they sometimes get their own keymap. And so on, recursively.

  3. I expect that at least some users might want to rebind any such keymaps (at any level) to their own, shorter, prefix keys, or they might want to bind specific commands to shorter key sequences. But I don't want to do that in the library itself, obviously.

Here's an example of one such fairly long key: C-x 4 j t . % * (seven keystrokes), which is bound to command icicle-bookmark-file-this-dir-all-tags-regexp-other-window in Bookmark+.

Anatomy:

  • On the C-x 4 prefix key (ctl-x-4-map).

  • On the j prefix key, which is for all commands for jumping to a bookmark.

  • On the t prefix key, which is for all commands for jumping to bookmarks that are tagged in some way.

  • On the . prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that are tagged in some way.

  • On the % prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags that match a regexp you are prompted for.

  • On the * key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags, ALL of which match a regexp you are prompted for. (By contrast, C-x 4 j t . % + is for bookmarks SOME of whose tags match the regexp.)

I can't answer about what the longest might be out there somewhere, but here's one bit of info that might help.

  1. I have some libraries that provide a set of related commands bound to keys in a keymap that I bind to a prefix key.

    Because I don't want to co-opt user keys etc., I typically bind such a prefix key under, say C-x or, for other-window commands, under C-x 4 (keymap ctl-x-4-map).

  2. The same considerations apply to groups of commands in such a keymap: they sometimes get their own keymap. And so on, recursively.

  3. I expect that at least some users might want to rebind any such keymaps (at any level) to their own, shorter, prefix keys, or they might want to bind specific commands to shorter key sequences. But I don't want to do that in the library itself, obviously.

Here's an example of one such fairly long key: C-x 4 j t . % * (seven keystrokes), which is bound to command icicle-bookmark-file-this-dir-all-tags-regexp-other-window in Bookmark+.

Anatomy:

  • On the C-x 4 prefix key (ctl-x-4-map).

  • On the j prefix key, which is for all commands for jumping to a bookmark.

  • On the t prefix key, which is for all commands for jumping to bookmarks that are tagged in some way.

  • On the . prefix key, which is for all commands for jumping to bookmarks that are for files in the current directory that are tagged in some way.

  • On the % prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags that match a regexp you are prompted for.

  • On the * key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags, ALL of which match a regexp you are prompted for. (By contrast, C-x 4 j t . % + is for bookmarks SOME of whose tags match the regexp.)

All of that is conventional in Bookmark+ (and some of it corresponds to Dired conventions, BTW): j is for jump commands, t is for tagged, . is for current-directory, % is for regexp, and * is for all (+ is for some).


(Oh, and using @mkcms's sexp, I get C-x 4 j t f % *, which is equally long. The f stands for file. It's like C-x 4 j t . % *, but the candidate bookmarks for completion are all file bookmarks, not just those for files in the current directory (.).)

1
source | link

I can't answer about what the longest might be, but here's one bit of info that might help.

  1. I have some libraries that provide a set of related commands bound to keys in a keymap that I bind to a prefix key.

    Because I don't want to co-opt user keys etc., I typically bind such a prefix key under, say C-x or, for other-window commands, under C-x 4 (keymap ctl-x-4-map).

  2. The same considerations apply to groups of commands in such a keymap: they sometimes get their own keymap. And so on, recursively.

  3. I expect that at least some users might want to rebind any such keymaps (at any level) to their own, shorter, prefix keys, or they might want to bind specific commands to shorter key sequences. But I don't want to do that in the library itself, obviously.

Here's an example of one such fairly long key: C-x 4 j t . % * (seven keystrokes), which is bound to command icicle-bookmark-file-this-dir-all-tags-regexp-other-window in Bookmark+.

Anatomy:

  • On the C-x 4 prefix key (ctl-x-4-map).

  • On the j prefix key, which is for all commands for jumping to a bookmark.

  • On the t prefix key, which is for all commands for jumping to bookmarks that are tagged in some way.

  • On the . prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that are tagged in some way.

  • On the % prefix key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags that match a regexp you are prompted for.

  • On the * key, which is for all commands for jumping to bookmarks that are for things in the current directory that have tags, ALL of which match a regexp you are prompted for. (By contrast, C-x 4 j t . % + is for bookmarks SOME of whose tags match the regexp.)