From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IKlRK4r4L2RDVQEASxT56A (envelope-from ) for ; Fri, 07 Apr 2023 13:03:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IH9YK4r4L2QJjgAA9RJhRA (envelope-from ) for ; Fri, 07 Apr 2023 13:03:38 +0200 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 665AF32001 for ; Fri, 7 Apr 2023 13:03:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkjrn-00048V-SS; Fri, 07 Apr 2023 07:02:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkjr3-0003zj-Fu for emacs-orgmode@gnu.org; Fri, 07 Apr 2023 07:02:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkjqt-0002Hc-L1 for emacs-orgmode@gnu.org; Fri, 07 Apr 2023 07:01:59 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7215E2402F5 for ; Fri, 7 Apr 2023 13:01:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680865306; bh=adsNPfNCxDjnNvI+0F2kVFDArAP4lB3MrD4IBJaLTo4=; h=From:To:Cc:Subject:Date:From; b=k7lOGzkObDSYi/2/zggVm0E92cnQPyOh/saC6qTyiHKirQWbQctyvz+54n8AtVOJd j8wQbG/hexvAILIPPq9acnN39gFGPBw5jK580at+B9tEEPiRap1V6Qi+7uvd8tT8Dw AG+YIUZtOf13fP2EEDMHSl/Ayf7t7RiaXqrABydNqusP3T3llogj+kfYqOMmT9UJXY 95Ircaz3I9f2YFW5WGFLsE9cJS6+Us8zugbCkT/DnJXzK+FOJNvNJKdtl21GC4ZUAb Qlxn+tgB82bViFQIDwhih+W7ISP9Ob6TfjkaMH3h5eIzVTKTZ49S/49QL/cIWA5nX+ uz4shpbOL7B+w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PtFmp0BmBz6tvr; Fri, 7 Apr 2023 13:01:45 +0200 (CEST) From: Ihor Radchenko To: =?utf-8?Q?S=C5=82awomir?= Grochowski Cc: emacs-orgmode@gnu.org Subject: Re: [RFC] [feat] org-colview/org-columns: 'column view' moving rows up/down In-Reply-To: <87lej51frx.fsf@gmail.com> References: <87lej51frx.fsf@gmail.com> Date: Fri, 07 Apr 2023 11:04:06 +0000 Message-ID: <87355ckl7d.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680865418; a=rsa-sha256; cv=none; b=tlNFsxd7nGezMyVpJGubkTtpoSGFweBj2h4FpPzLtyvpR6Qvt/d9lL/89VQvwwh+REjOh8 MSf9pgB0VbbuRPH3t7NsfdXFDk3PC3ufSSKt59Zqj1YRHDQXnCNPnv4xtUAYBYiZNzkXDn t1gYs0og2eLdVMrM5s3+1M8+wnQp9Net3NQztZRlp9exEimYYnlzhbgNZUM4HS9cbPkM47 EVQrJ/rTAOWqCkKdQlKYdsTeaFfdOmxZ8XWSsOoM9ZfZ5E4pojLNsSKhHaPpt/If+gWo2H lGlTTWuwU/sX8hQVrsq7yCzfbCa2KSaQ5dma1zN6n24eeRUjWQJ3Vpg5c1cxng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k7lOGzkO; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680865418; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=DNeAUgWyxtGgltwhBUDy3znPF3+IY7hfRaxA7saWLFo=; b=XE49BDMHl7E6nvIQfBbmIaJ859h2TaOhgm/1b2IOygf3+cU0xiO1JSg7k82gQQVCd+6Ak9 kbaFIA61BmPhzPxcdi4dItFgu75TSlj5TQdqaeGh8gXqmnRN3fEsHfmyG1q64ULvhAkLjd /SPSX1n5gvkde4KxG62+6Aikn9lBlr9GwWDfv0zt+usbbjQZdFXNjY6dgURjpeLc1D+qTF Pv6OpeuXlPSttGDO16bM1meMIABUXn1H06vKXDQgZUWQXwFHhJw7PJJnT+7mwGthSqFYY9 XSLZYswtzRltnY5ZlGa1TvuflnRtF8Sga95WfvLZKevjOCifJ4ynt71x2zMIaA== X-Migadu-Spam-Score: -4.72 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k7lOGzkO; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Spam-Score: -4.72 X-Migadu-Queue-Id: 665AF32001 X-TUID: BET2euYTCVgc S=C5=82awomir Grochowski writes: > Recently I often use 'column view' feature.=20 > To my suprise in 'column view' user can't move rows up & down. > So I wrote a little code snippet to be able to do it, and I'm sharing it = with you. > > Questions: > 1. Why user can't move rows up & down in 'column view'? > 2. Is this was intentional design decision? I do not see any particular reason. The current design dates back to 15 years ago - the initial commit in our current git repo. > I think 'column view' is missing one the core feel & functionality of org= -mode - moving rows (headings) up & down. > In my experiance with 'column view' & tables I shuffle a lot of columns &= rows order. Sounds reasonable. > From 1f0f2052b8dddf4982ab35267ed1564f2250784b Mon Sep 17 00:00:00 2001 > From: S=C5=82awomir Grochowski > Date: Mon, 3 Apr 2023 19:23:09 +0200 > Subject: [PATCH] org-columns: add feat to move row up/down The patch looks good in general, but you need to add proper commit message. See https://orgmode.org/worg/org-contribute.html#commit-messages Also, you need to add etc/ORG-NEWS entry about the new functionality and also modify the manual. Finally, I see no records about you copyright assignment status. Please take a look at https://orgmode.org/worg/org-contribute.html#copyright > +(defun org-columns--move-row (&optional up) > + "Move table row. Calls `org-move-subtree-down' or `org-move-subtree-= up'." *Move column view table row. We generally prefer single sentence as the first line of the docstring. Also, please describe UP argument in the docstring. > +;; Each column is an overlay on top of a character. So there has > +;; to be at least as many characters available on the line as > +;; columns to display. > +;; 'org-columns--display-here' > +(ert-deftest test-org-colview/bug-add-whitespace () > + "Insert space characters if number of characters on the line > + is lower then number of columns." > + :expected-result :failed Does this test have anything to do with the new feature? > +(ert-deftest test-org-colview/columns-move-row-down () > + "Test `org-columns-move-row-down' specifications." > + (should > + (equal "* H > +** B > +** A > +" > + (org-test-with-temp-text "* H > +** A > +** B > +" > + (let ((org-columns-default-format "%ITEM")) (org-columns) > + (next-line 1) > + (org-columns-move-row-down) > + (buffer-substring-no-properties (point-min) (point-max)= )))))) One special case we may want to consider is when columns are from different heading levels, like * H ** A *** A1 ** B --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at