fix minor mode keymap prefix and allow customization (fixes #137) #138

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@aspiers
Collaborator
aspiers commented Sep 20, 2013

The official emacs key binding conventions state:

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) are
reserved for users; they are the only sequences reserved for users,
so do not block them.

Changing all the Emacs major modes to respect this convention was a
lot of work; abandoning this convention would make that work go to
waste, and inconvenience users. Please comply with it.

but org2blog defines the following keys:

(define-key org2blog/wp-map (kbd "C-c p") 'org2blog/wp-post-buffer-and-publish)
(define-key org2blog/wp-map (kbd "C-c P") 'org2blog/wp-post-buffer-as-page-and-publish)
(define-key org2blog/wp-map (kbd "C-c d") 'org2blog/wp-post-buffer)
(define-key org2blog/wp-map (kbd "C-c D") 'org2blog/wp-post-buffer-as-page)
(define-key org2blog/wp-map (kbd "C-c t") 'org2blog/wp-complete-category)

This commit makes the prefix customizable via a new org2blog/wp-keymap-prefix variable, whose default is "C-c M-p". After changing it, org2blog/wp-reload-entry-mode-map must be called before it takes effect.

Adam Spiers added some commits Sep 20, 2013
Adam Spiers use more temporary variables for clarity 9aabc0a
Adam Spiers fix minor mode keymap prefix and allow customization (fixes #137)
The official emacs key binding conventions state:

    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) are
    reserved for users; they are the only sequences reserved for users,
    so do not block them.

    Changing all the Emacs major modes to respect this convention was a
    lot of work; abandoning this convention would make that work go to
    waste, and inconvenience users. Please comply with it.

but org2blog defines the following keys:

  (define-key org2blog/wp-map (kbd "C-c p") 'org2blog/wp-post-buffer-and-publish)
  (define-key org2blog/wp-map (kbd "C-c P") 'org2blog/wp-post-buffer-as-page-and-publish)
  (define-key org2blog/wp-map (kbd "C-c d") 'org2blog/wp-post-buffer)
  (define-key org2blog/wp-map (kbd "C-c D") 'org2blog/wp-post-buffer-as-page)
  (define-key org2blog/wp-map (kbd "C-c t") 'org2blog/wp-complete-category)

This commit makes the prefix customizable via a new
`org2blog/wp-keymap-prefix' variable, whose default is "C-c M-p".  After
changing it, `org2blog/wp-reload-entry-mode-map' must be called before
it takes effect.
fded83d
@aspiers
Collaborator
aspiers commented Sep 20, 2013

I also made a version of this rebased on top of the org-8-experimental branch:

https://github.com/aspiers/org2blog/tree/org-8-experimental-keymap

@punchagan
Owner

Closing to remove the unrelated change.

@punchagan punchagan closed this May 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment