From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iLrBMohUjV73HAAA0tVLHw (envelope-from ) for ; Wed, 08 Apr 2020 04:35:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8H9pF4lUjV4EeQAA1q6Kng (envelope-from ) for ; Wed, 08 Apr 2020 04:35:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C86E947FBC for ; Wed, 8 Apr 2020 04:27:12 +0000 (UTC) Received: from localhost ([::1]:55866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM2Iv-0001Po-Cn for larch@yhetil.org; Wed, 08 Apr 2020 00:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47430) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM2IT-0001Pe-QU for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 00:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jM2IR-00043K-U2 for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 00:26:41 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:56986) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jM2IR-00042G-GU for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 00:26:39 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0D2BA49E3F; Wed, 8 Apr 2020 00:26:38 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:date:message-id:mime-version:content-type; s=sasl; bh=IfMNdHjrsyTeZ2sZQmBH6zRtG/E=; b=Fgk2b87Ll0FjKTsYqtsx VqfRaQctGgoU7H5VyC4bIjB31J5kX7rj78dnDCc8bQs5oWfd1O/SzMYW2Xwo92Fx sBCVsc3447/V2DD3v46KYIqWVB5OqbfBTfVifv8iO48CsF1n+ac1omsQX75tsayx klT1VZXbTigvR0xzYpsMXbg= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0151C49E3E; Wed, 8 Apr 2020 00:26:38 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version:content-type; s=mesmtp; bh=xUmIC5wmmj17VO+kvylxzurZWZc2EGvXYnp6ivnupXQ=; b=QoV8OZI62OBcn/IJ97+d0MFTPSUvfJmRmBu9H18LyWr1WJ+9QUzgiPp4r8hA4ogeiSFoCF2FQuY8OKpAeTjTGUAYyTxzuCFd9kOFuTzueKqtukf00Rsj4IxHdPT76+y2H6/o6R2hbWqK/SWVxxkrI2UWshK5D3bzAjIOLxUb3Fo= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 7133349E3D; Wed, 8 Apr 2020 00:26:37 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Vladimir Panteleev Subject: [PATCH] org-shift*: Honor org-support-shift-select for table cell movement In-Reply-To: <87zhbnzxdf.fsf@kyleam.com> Date: Wed, 08 Apr 2020 04:26:36 +0000 Message-ID: <87mu7miow3.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 2300B570-7951-11EA-A54C-D1361DBA3BAF-24757444!pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.71 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=default; t=1586320033; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=CLfH++0n93f8KLsu+ysZ9MZkm5iyI05V6elVdmpNvgI=; b=BzVsUeKkIX7zaQbDeGdITN+/M/y+NojMG1gFEtA2tottfeZ4Ui3A5s4bbJMXFAw464hGk2 M7kYXAhOUfy+akm1G4qEpBaAbkTL2jyIaz8Njx4oy1n3bY7H2QELeKl/WkyH7KJ+uw5MtJ IP4Hw6z9FxXVTavJhletawImAC++xI0= ARC-Seal: i=1; s=default; d=yhetil.org; t=1586320033; a=rsa-sha256; cv=none; b=NtKRBBiQotabGh+nRQasJdjNaLvAr5EG/dUE1X3oMKUUNiNVjgdd2Af9NUmsaETxc4R5/f HMhJJL38GOrWt8a1WVbMk+VKT2eONGNm+i891/G5wUWvKa4hDjy8xATun5q6I7b/S036jg xgII31XS7PB5Hfdz0gd7O2satbyheLs= ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=Fgk2b87L; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=QoV8OZI6; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scanner: scn0 X-Spam-Score: -1.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=Fgk2b87L; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=QoV8OZI6; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-1.21 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.58221277504566]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.32), country: US(-0.01), ip: 209.51.188.17(-0.58)]; ARC_SIGNED(0.00)[i=1]; DKIM_TRACE(0.00)[pobox.com:+,kyleam.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.50)[eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl,kyleam.com:s=mesmtp]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: X5qdwfY24d8I Kyle Meyer writes: > The change in behavior happened with 09f950723 (Added keybindings for > `org-table-move-cell-*' functions), which was a part of the v9.3 > release. Looking at that commit and scanning the associated thread [^], > I'm guessing the interaction with org-support-shift-select was simply > overlooked and those org-table-move-cell-* calls should be updated to > inspect org-support-shift-select, like (some of) the other neighboring > branches in the code. > > I'll take a look at doing that tomorrow. Here's a patch that prevents calling org-table-move-cell-* when org-support-shift-select is `always'. I'll apply this in a day or two if no one chimes in to explain why org-table-move-cell-* shouldn't consider org-support-shift-select. -- >8 -- Subject: [PATCH] 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 --- lisp/org.el | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 3d841dfa6..c1dffab3c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -854,6 +854,7 @@ (defcustom org-support-shift-select nil - 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 @@ (defcustom org-support-shift-select nil 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 @@ (defun org-shiftup (&optional arg) ((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 @@ (defun org-shiftdown (&optional arg) ((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 @@ (defun org-shiftright (&optional arg) (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 @@ (defun org-shiftleft (&optional arg) (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)) base-commit: 561e9efd062e23321f3b56b2e3482ef3afc7416f -- 2.26.0