0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 10:10:42 +00:00

`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.
This commit is contained in:
Nicolas Goaziou 2011-10-01 20:37:16 +02:00
parent 0fff59cd43
commit 824e06752b

View file

@ -19919,13 +19919,14 @@ beyond the end of the headline."
(let ((special (if (consp org-special-ctrl-a/e) (let ((special (if (consp org-special-ctrl-a/e)
(cdr org-special-ctrl-a/e) (cdr org-special-ctrl-a/e)
org-special-ctrl-a/e))) org-special-ctrl-a/e)))
(if (or (not special) (cond
(not (org-on-heading-p)) ((or (not special) arg
arg) (not (or (org-on-heading-p) (org-at-item-p))))
(call-interactively (call-interactively
(cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line)
((fboundp 'move-end-of-line) 'move-end-of-line) ((fboundp 'move-end-of-line) 'move-end-of-line)
(t 'end-of-line))) (t 'end-of-line))))
((org-on-heading-p)
(let ((pos (point))) (let ((pos (point)))
(beginning-of-line 1) (beginning-of-line 1)
(if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) (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) (call-interactively (if (fboundp 'move-end-of-line)
'move-end-of-line 'move-end-of-line
'end-of-line))))) 'end-of-line)))))
;; At an item: Move before any hidden text.
(t (call-interactively 'end-of-line)))
(org-no-warnings (org-no-warnings
(and (featurep 'xemacs) (setq zmacs-region-stays t))))) (and (featurep 'xemacs) (setq zmacs-region-stays t)))))