diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-01 20:37:16 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-01 20:37:16 +0200 |
commit | 824e06752b3ee98b3586da5c5b841cfa04ba3599 (patch) | |
tree | b90d4801f425e8999aef6b4cc961f5bbcac9aac7 | |
parent | 0fff59cd43619fcc5644501ac9df74f39d7adf67 (diff) | |
download | org-mode-824e06752b3ee98b3586da5c5b841cfa04ba3599.tar.gz |
`org-special-ctrl-a/e' effectively behaves specially on items
* lisp/org.el (org-end-of-line): When on an item, move point at the
end of the line, but before any hidden text. Thus, it's still
possible to use commands, like C-c C-c, acting at items. This is
still disabled if `org-special-ctrl-a/e' ignores C-e.
-rw-r--r-- | lisp/org.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index 5961fde..fe43676 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19919,13 +19919,14 @@ beyond the end of the headline." (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) org-special-ctrl-a/e))) - (if (or (not special) - (not (org-on-heading-p)) - arg) - (call-interactively - (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) - ((fboundp 'move-end-of-line) 'move-end-of-line) - (t 'end-of-line))) + (cond + ((or (not special) arg + (not (or (org-on-heading-p) (org-at-item-p)))) + (call-interactively + (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) + ((fboundp 'move-end-of-line) 'move-end-of-line) + (t 'end-of-line)))) + ((org-on-heading-p) (let ((pos (point))) (beginning-of-line 1) (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) @@ -19940,6 +19941,8 @@ beyond the end of the headline." (call-interactively (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))) + ;; At an item: Move before any hidden text. + (t (call-interactively 'end-of-line))) (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) |