From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MJmZJK3An2CaEAAAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 14:38:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0HI9IK3An2BHKwAAB5/wlQ (envelope-from ) for ; Sat, 15 May 2021 12:38:05 +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 E7BD5244F6 for ; Sat, 15 May 2021 14:38:04 +0200 (CEST) Received: from localhost ([::1]:42096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhtYR-00070K-Uu for larch@yhetil.org; Sat, 15 May 2021 08:38:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhtW3-0002jE-Tv for emacs-orgmode@gnu.org; Sat, 15 May 2021 08:35:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42486) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhtW2-0007c2-HR; Sat, 15 May 2021 08:35:35 -0400 Received: from [2a01:e34:ec2b:7150:5476:c9c5:afea:5f2a] (port=33176 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhtW2-0000YD-Bm; Sat, 15 May 2021 08:35:34 -0400 Received: by guerry (Postfix, from userid 1000) id 4ACE41A60E69; Sat, 15 May 2021 14:35:33 +0200 (CEST) From: Bastien To: Ihor Radchenko Subject: Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)] In-Reply-To: <87sg2oqmrx.fsf@localhost> (Ihor Radchenko's message of "Sat, 15 May 2021 19:06:26 +0800") Organization: GNU References: <875z8s5wu7.fsf@gnu.org> <877dk23hqn.fsf@gnu.org> <87sg2oqmrx.fsf@localhost> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Sat, 15 May 2021 14:35:33 +0200 Message-ID: <87r1i8dvje.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain 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, Christian Hemminghaus , mail Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621082285; 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: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=9vImXn9eNnZ3F6F9EoA5y6EEyNfq1OTUHQoOhelTVzE=; b=n+ust8YcHSchsBxoAZUdbtIru1a6CFdQ0l8xzD5gbYx4EKMyd1xr3m40mfTUmU61D0cbs5 3oHnYp5ED7hnvDP3T3tAfW6/WUwX20uCS6ir4xXL1zjlQCclE3eYCRq295E+fMESa4UQ3E 4CeMJhNkJ99uTpXmwLTzrdo55N6p/JrXTTxdC4AEaR3M7LjOFaGt7p4yB9Bpm5Exv4pA42 aSBK6gLiCznu/hHycJOV8SGm7dII+TqQ1mjyp86s3N2mrW0V7B7n/dn9pryPXGBwnmqTBe tuw7auh7a0qXxWYohCAaU2P3Nu0ofyVkrGFYt3DCF5szKYt2EzwuvhxlitM2Sw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621082285; a=rsa-sha256; cv=none; b=ctQoRmaPI8RBJHtf4gOv+yLbLhVXa7+vJe5vJWJ2CQiIb/BmcFdPv+EakSGfZjTd5KO3h2 Bd3cnKdawVZjB4pA7bfbWDEI9YjuCaEOiglCz8D3kOZ2mkBA6awCewl2YoPjvQRsj5SoIg Fh7TsDm6Yvdm9zNjOPJVYCtwV7zXoI/3SGIQZ289eAgLg0ZQ1VsILiRAUMbHqxXY9SxC// 7LsDb2hQlewOhc7K4g7BbLL7gbIw3pM4TU2fIn+h01+aPrQTnvuVQQo33hPC+UUkVA+LAn aYIyEa55U3SshecGOrbhQIUV8JlzP/GqoDomyK/dolRh9y1Ulb0bPPR6Aa3GMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Queue-Id: E7BD5244F6 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: f6YDT7jLagln Ihor Radchenko writes: > Bastien writes: >> Carsten proposed a patch that I adapted a little bit and pushed to the >> maint branch. We now throw an error saying that dragging inline tasks >> is not supported. > > Isn't it easy to implement using org-element-swap-A-B? Well, probably, I didn't try this. > Something like > > (defun org-element-swap-at-point (&optional down) > (when-let* ((el-cur (org-element-at-point)) > (el-other (org-with-point-at > (if down > (org-element-property :end el-cur) > (1- (org-element-property :begin el-cur))) > (org-element-at-point)))) > (unless (equal el-cur el-other) > (org-element-swap-A-B el-cur el-other)))) Can you make a patch for this? -- Bastien