diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-04-08 00:23:10 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-04-09 22:24:55 -0400 |
commit | 06c7a54f0b569ab74ed791ff21b247443c0ce2fd (patch) | |
tree | 9960e9f7e9bb55ab0da40e087a46aa83c5d44d5a | |
parent | 1ae1f8f2df1ae0cd013cfa0c65f170425956edb5 (diff) | |
download | org-mode-06c7a54f0b569ab74ed791ff21b247443c0ce2fd.tar.gz |
org-shift*: Honor org-support-shift-select for table cell movement
* lisp/org.el (org-support-shift-select): Mention table context.
(org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft): Don't move table cells when org-support-shift-select
is `always'.
Reported-by: Vladimir Panteleev <thecybershadow@gmail.com>
<CAHhfkvw8O4cSxe5CJXQ8L+ce+9wOhuM==Xv9rB2NVhsCgYANdA@mail.gmail.com>
-rw-r--r-- | lisp/org.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index 5b00191..0c2a81e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -854,6 +854,7 @@ cursor keys will then execute Org commands in the following contexts: - in a plain list item, changing the bullet type - in a property definition line, switching between allowed values - in the BEGIN line of a clock table (changing the time block). +- in a table, moving the cell in the specified direction. Outside these contexts, the commands will throw an error. When this variable is t and the cursor is not in a special @@ -863,9 +864,9 @@ cycling will no longer happen anywhere in an item line, but only if the cursor is exactly on the bullet. If you set this variable to the symbol `always', then the keys -will not be special in headlines, property lines, and item lines, -to make shift selection work there as well. If this is what you -want, you can use the following alternative commands: +will not be special in headlines, property lines, item lines, and +table cells, to make shift selection work there as well. If this is +what you want, you can use the following alternative commands: `\\[org-todo]' and `\\[org-priority]' \ to change TODO state and priority, `\\[universal-argument] \\[universal-argument] \\[org-todo]' \ @@ -17435,7 +17436,9 @@ individual commands for more information." ((and (not org-support-shift-select) (org-at-item-p)) (call-interactively 'org-previous-item)) ((org-clocktable-try-shift 'up arg)) - ((org-at-table-p) (org-table-move-cell-up)) + ((and (not (eq org-support-shift-select 'always)) + (org-at-table-p)) + (org-table-move-cell-up)) ((run-hook-with-args-until-success 'org-shiftup-final-hook)) (org-support-shift-select (org-call-for-shift-select 'previous-line)) @@ -17461,7 +17464,9 @@ individual commands for more information." ((and (not org-support-shift-select) (org-at-item-p)) (call-interactively 'org-next-item)) ((org-clocktable-try-shift 'down arg)) - ((org-at-table-p) (org-table-move-cell-down)) + ((and (not (eq org-support-shift-select 'always)) + (org-at-table-p)) + (org-table-move-cell-down)) ((run-hook-with-args-until-success 'org-shiftdown-final-hook)) (org-support-shift-select (org-call-for-shift-select 'next-line)) @@ -17499,7 +17504,9 @@ This does one of the following: (org-at-property-p)) (call-interactively 'org-property-next-allowed-value)) ((org-clocktable-try-shift 'right arg)) - ((org-at-table-p) (org-table-move-cell-right)) + ((and (not (eq org-support-shift-select 'always)) + (org-at-table-p)) + (org-table-move-cell-right)) ((run-hook-with-args-until-success 'org-shiftright-final-hook)) (org-support-shift-select (org-call-for-shift-select 'forward-char)) @@ -17537,7 +17544,9 @@ This does one of the following: (org-at-property-p)) (call-interactively 'org-property-previous-allowed-value)) ((org-clocktable-try-shift 'left arg)) - ((org-at-table-p) (org-table-move-cell-left)) + ((and (not (eq org-support-shift-select 'always)) + (org-at-table-p)) + (org-table-move-cell-left)) ((run-hook-with-args-until-success 'org-shiftleft-final-hook)) (org-support-shift-select (org-call-for-shift-select 'backward-char)) |