mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-27 13:02:52 +00:00
Update a few keybindings in org.el and fix a problem in org-element.el.
* org.el: Update a few keybindings. Use [(control down)] and "\M-}" for `org-element-forward'. Use [(control up)] and "\M-{ `org-element-backward'. Use "\C-c\C-^" for `org-element-up'. Use "\C-c\C-_" for `org-element-down'. Use "\C-c\C-@" for `org-element-mark-element'. * org-element.el (org-element-down): Throw an error when the element has no content.
This commit is contained in:
parent
e3f30e12d2
commit
eb5631359a
|
@ -4365,7 +4365,8 @@ Move to the previous element at the same level, when possible."
|
||||||
((memq (org-element-type element) org-element-greater-elements)
|
((memq (org-element-type element) org-element-greater-elements)
|
||||||
;; If contents are hidden, first disclose them.
|
;; If contents are hidden, first disclose them.
|
||||||
(when (org-element-property :hiddenp element) (org-cycle))
|
(when (org-element-property :hiddenp element) (org-cycle))
|
||||||
(goto-char (org-element-property :contents-begin element)))
|
(goto-char (or (org-element-property :contents-begin element)
|
||||||
|
(error "No content for this element"))))
|
||||||
(t (error "No inner element")))))
|
(t (error "No inner element")))))
|
||||||
|
|
||||||
(defun org-element-drag-backward ()
|
(defun org-element-drag-backward ()
|
||||||
|
|
14
lisp/org.el
14
lisp/org.el
|
@ -17730,7 +17730,7 @@ BEG and END default to the buffer boundaries."
|
||||||
;; | `outline-next-visible-heading' | `C-c C-n' | still same function |
|
;; | `outline-next-visible-heading' | `C-c C-n' | still same function |
|
||||||
;; | `outline-previous-visible-heading' | `C-c C-p' | still same function |
|
;; | `outline-previous-visible-heading' | `C-c C-p' | still same function |
|
||||||
;; | `outline-up-heading' | `C-c C-u' | still same function |
|
;; | `outline-up-heading' | `C-c C-u' | still same function |
|
||||||
;; | `outline-move-subtree-up' | `C-c C-^' | better: org-shiftup |
|
;; | `outline-move-subtree-up' | overridden | better: org-shiftup |
|
||||||
;; | `outline-move-subtree-down' | overridden | better: org-shiftdown |
|
;; | `outline-move-subtree-down' | overridden | better: org-shiftdown |
|
||||||
;; | `show-entry' | overridden | no replacement |
|
;; | `show-entry' | overridden | no replacement |
|
||||||
;; | `show-children' | `C-c C-i' | visibility cycling |
|
;; | `show-children' | `C-c C-i' | visibility cycling |
|
||||||
|
@ -17839,10 +17839,12 @@ BEG and END default to the buffer boundaries."
|
||||||
(org-defkey narrow-map "e" 'org-narrow-to-element)
|
(org-defkey narrow-map "e" 'org-narrow-to-element)
|
||||||
(org-defkey org-mode-map "\C-xne" 'org-narrow-to-element))
|
(org-defkey org-mode-map "\C-xne" 'org-narrow-to-element))
|
||||||
(org-defkey org-mode-map "\C-\M-t" 'org-element-transpose)
|
(org-defkey org-mode-map "\C-\M-t" 'org-element-transpose)
|
||||||
(org-defkey org-mode-map "\C-\M-f" 'org-element-forward)
|
(org-defkey org-mode-map [(control down)] 'org-element-forward)
|
||||||
(org-defkey org-mode-map "\C-\M-b" 'org-element-backward)
|
(org-defkey org-mode-map [(control up)] 'org-element-backward)
|
||||||
(org-defkey org-mode-map "\C-\M-u" 'org-element-up)
|
(org-defkey org-mode-map "\M-}" 'org-element-forward)
|
||||||
(org-defkey org-mode-map "\C-\M-d" 'org-element-down)
|
(org-defkey org-mode-map "\M-{" 'org-element-backward)
|
||||||
|
(org-defkey org-mode-map "\C-c\C-^" 'org-element-up)
|
||||||
|
(org-defkey org-mode-map "\C-c\C-_" 'org-element-down)
|
||||||
(org-defkey org-mode-map "\C-\M-t" 'org-element-transpose)
|
(org-defkey org-mode-map "\C-\M-t" 'org-element-transpose)
|
||||||
(org-defkey org-mode-map "\C-c\C-f" 'org-forward-same-level)
|
(org-defkey org-mode-map "\C-c\C-f" 'org-forward-same-level)
|
||||||
(org-defkey org-mode-map "\C-c\C-b" 'org-backward-same-level)
|
(org-defkey org-mode-map "\C-c\C-b" 'org-backward-same-level)
|
||||||
|
@ -17915,7 +17917,7 @@ BEG and END default to the buffer boundaries."
|
||||||
(org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull)
|
(org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull)
|
||||||
(org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push)
|
(org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push)
|
||||||
(org-defkey org-mode-map "\C-c@" 'org-mark-subtree)
|
(org-defkey org-mode-map "\C-c@" 'org-mark-subtree)
|
||||||
(org-defkey org-mode-map "\C-c\C-@" 'org-mark-list)
|
(org-defkey org-mode-map "\C-c\C-@" 'org-element-mark-element)
|
||||||
(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
|
(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
|
||||||
;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)
|
;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue