From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sD/0IDv5b2ahNAEAqHPOHw:P1 (envelope-from ) for ; Mon, 17 Jun 2024 08:52:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sD/0IDv5b2ahNAEAqHPOHw (envelope-from ) for ; Mon, 17 Jun 2024 10:52:11 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Seal: i=1; s=key1; d=yhetil.org; t=1718614331; a=rsa-sha256; cv=none; b=bfayBHG+5tlKHDeiqq/aKToJrQM1KiHH47oyA6QoRs6jl8eViNHGvROUreoYS+tgC+Nw06 SD2LI0YTqO08uqvosHa/R3fcwEXxQ4SRtYJHedIKoxDoDW7k6ZXHb0r/2alqxyd3ciGZmA X2RFWfTFg8BtPRuvCpMx3AE570m/jKqdCUJteFF6eUaYIbijEm/s8YKjB5y01tkcNEAVO4 126lgSnBh60IjzdQCaYe7uzSmgZo5eITDe25JF5tjnuq9jEOp2PBpLkUNSL43B7yLr7LOX H2OP2bvY60RcOU3pTKYgrbH2KwcRxTvapfwihWv2bFOs/ZrqffFgtYsEkS5jww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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=1718614331; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=IqgjupU3s/yoPvx03tMChT4dbvO6VU0T15Vuyx6uTAY=; b=RC21Jx+iWhcKYJ33hNCE95kx51alSGNrT5KByNX/Akkaow+UIEOw5vUz/7CkGtCGRbeBsp EitI9gfTwDs8SnQfDRpH94j3+YbO7RE6k8UklN2MVLpuc+IeZPHwl/bytjL0znsME+FhUs +Yau9JnYXxtRc80EO3bQTFlFmV1PBaDNlhsWWt6Ijjj/kTRlBuU9uoo9bI9NBtkuj7FkEm D7uC3BQFcLqKvTfO6qj7VKYA5prWoUUj7fF3n6gxF17hmjtvOcK1SugTTZ8DOQhlcxL9BN zShU5VlQ0kJZV7A4YX+Ge3Owij3fS/jSAmy+PPqqWaBl7FSNIev9FjqDX8tNdA== 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 75C6F13B0D for ; Mon, 17 Jun 2024 10:52:11 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJ84y-0001FN-Rk; Mon, 17 Jun 2024 04:51:08 -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 1sJ84w-0001FA-Kq for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 04:51:06 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJ84u-00028Y-Gp for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 04:51:06 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4W2kBB6tD7z1sCmD for ; Mon, 17 Jun 2024 10:50:58 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4W2kBB5H2Wz1qqlS for ; Mon, 17 Jun 2024 10:50:58 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id YkXXiehucreo for ; Mon, 17 Jun 2024 10:50:47 +0200 (CEST) X-Auth-Info: GI/v45vW5q+iGYeCrsw1JOSH0AaMtgTJkqyMU86nEaqxmXjKlx24Y1SlnCLQeU33 Received: from Whiteflame (ppp-212-114-182-170.dynamic.mnet-online.de [212.114.182.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for ; Mon, 17 Jun 2024 10:50:47 +0200 (CEST) From: Raffael Stocker To: emacs-orgmode@gnu.org Subject: [BUG] Columnview makes attributes wander [9.7.4 (9.7.4-1387e3 @ /home/rst/.emacs.d/elpa/org-9.7.4/)] Date: Mon, 17 Jun 2024 10:50:41 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2001:a60:0:28:0:1:25:1; envelope-from=r.stocker@mnet-mail.de; helo=mail-out.m-online.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.45 X-Migadu-Scanner: mx12.migadu.com X-Spam-Score: -6.45 X-Migadu-Queue-Id: 75C6F13B0D X-TUID: tX3Ba1rvSGbr --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ Hello fellow org-modists, in columnview dblocks, attribute and tblfm lines wander to the right instead of staying in place when the table is re-evaluated (see the example file in the appendix). This could be cured with a couple of =E2=80=98string-trim-left=E2=80=99 applications in =E2=80=98org-columns-dbl= ock-write-default=E2=80=99 like so: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=colview-trim.patch Content-Description: columnview trim patch diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 961ae0fbe..bc93941e4 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1662,7 +1662,7 @@ defun org-columns-dblock-write-default ;; Insert affiliated keywords before the table. (when content-lines (while (string-match-p "\\`[ \t]*#\\+" (car content-lines)) - (insert (pop content-lines) "\n"))) + (insert (string-trim-left (pop content-lines)) "\n"))) (save-excursion ;; Insert table at point. (insert @@ -1675,7 +1675,7 @@ defun org-columns-dblock-write-default (let ((case-fold-search t)) (dolist (line content-lines) (when (string-match-p "\\`[ \t]*#\\+TBLFM:" line) - (insert "\n" line) + (insert "\n" (string-trim-left line)) (unless recalc (setq recalc t)))))) (when recalc (org-table-recalculate 'all t)) (org-table-align) --=-=-= Content-Type: text/plain Regards, Raffael Emacs : GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) Package: Org mode version 9.7.4 (9.7.4-1387e3 @ /home/rst/.emacs.d/elpa/org-9.7.4/) --=-=-= Content-Type: text/x-org; charset=utf-8 Content-Disposition: attachment; filename=columnview-trim.org Content-Transfer-Encoding: quoted-printable Content-Description: columnview with wandering lines * Overview The ~ATTR_LATEX~ and ~TBLFM~ lines will wander to the right with every = =E2=80=98C-c C-c=E2=80=99 on the columnview. #+BEGIN: columnview :hlines 1 :id "tasks" #+ATTR_LATEX: :width \textwidth | <40> | | | | | Task | Estimated Effort | Actual Effort | | |-------+------------------+---------------+-------| | Tasks | 20:00 | | 20.00 | | Foo | 8:00 | | 8.00 | | Bar | 12:00 | | 12.00 | #+TBLFM: $4=3D$2;t #+END: =20=20 * Tasks :PROPERTIES: :ID: tasks :END: =20=20 ** TODO Foo :PROPERTIES: :Effort: 8:00 :END: =20=20 ** TODO Bar :PROPERTIES: :Effort: 12:00 :END: --=-=-=--