`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:
parent
0fff59cd43
commit
824e06752b
17
lisp/org.el
17
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)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue