Hello all,
When operating on a heading, M-Right/M-Left promotes or demotes one
heading only, and M-S-Right/M-S-Left promotes or demotes an entire
subtree.
When operating on list items however, there is no distinction between
M-Right/M-Left and M-S-Right/M-S-Left. Both key combinations operate
on the current item and on all subitems
Example: No difference between M-Right and M-S-Right on item 1 below:
- item 1
- item 2
- item 3
I find this behaviour somewhat confusing.
Attached patch seems to fix that for me.
Kind Regards,
Matti
diff --git a/lisp/org-list.el b/lisp/org-list.el
index d3bfb6b..05793e7 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -975,12 +975,15 @@ I.e. to the text after the last item."
(setq firstp (org-first-list-item-p))
(save-excursion
(setq end (and (org-region-active-p) (region-end)))
- (if (memq last-command '(org-shiftmetaright org-shiftmetaleft))
+ (if (and (memq last-command '(org-shiftmetaright org-shiftmetaleft))
+ (memq this-command '(org-shiftmetaright org-shiftmetaleft)))
(setq beg org-last-indent-begin-marker
end org-last-indent-end-marker)
(org-beginning-of-item)
(setq beg (move-marker org-last-indent-begin-marker (point)))
- (org-end-of-item)
+ (if (memq this-command '(org-shiftmetaright org-shiftmetaleft))
+ (org-end-of-item)
+ (org-end-of-line))
(setq end (move-marker org-last-indent-end-marker (or end (point)))))
(goto-char beg)
(setq ind-bul (org-item-indent-positions)
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode