From 77312a266c200a65a4a8cf63040e32357304396c Mon Sep 17 00:00:00 2001 Message-Id: <77312a266c200a65a4a8cf63040e32357304396c.1637674022.git.yantar92@gmail.com> From: Ihor Radchenko Date: Tue, 23 Nov 2021 21:24:52 +0800 Subject: [PATCH] Make org-shiftmetaleft/org-shiftmetaright honour shift-select on MacOS * lisp/org.el (org-shiftmetaleft): (org-shiftmetaright): Honour shift-select bound to meta-arrow on MacOS when `org-support-shift-select' is non-nil. Fixes https://orgmode.org/list/CAEOO5Tdg6sdjNfAg=J_DVQ50xx1oxaFaVyyYnda6O_-t3hG2jg@mail.gmail.com --- lisp/org.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 048abb142..a86ad301f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17378,6 +17378,10 @@ (defun org-shiftmetaleft () individual commands for more information." (interactive) (cond + ((and (eq system-type 'darwin) + (or (eq org-support-shift-select 'always) + (and org-support-shift-select (org-region-active-p)))) + (org-call-for-shift-select 'backward-char)) ((run-hook-with-args-until-success 'org-shiftmetaleft-hook)) ((org-at-table-p) (call-interactively 'org-table-delete-column)) ((org-at-heading-p) (call-interactively 'org-promote-subtree)) @@ -17394,6 +17398,10 @@ (defun org-shiftmetaright () individual commands for more information." (interactive) (cond + ((and (eq system-type 'darwin) + (or (eq org-support-shift-select 'always) + (and org-support-shift-select (org-region-active-p)))) + (org-call-for-shift-select 'forward-char)) ((run-hook-with-args-until-success 'org-shiftmetaright-hook)) ((org-at-table-p) (call-interactively 'org-table-insert-column)) ((org-at-heading-p) (call-interactively 'org-demote-subtree)) -- 2.32.0