From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uDJ4HzRL52UXAAAAe85BDQ:P1 (envelope-from ) for ; Tue, 05 Mar 2024 17:41:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uDJ4HzRL52UXAAAAe85BDQ (envelope-from ) for ; Tue, 05 Mar 2024 17:41:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="WB/eS6go"; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709656884; 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:dkim-signature; bh=AjQCjs6akTjOFze/WRZrUx0vKvlCqqHmKXI/iBrEs30=; b=O3U44VuIu4F+hQoueq2ATztXuNikeqGYxPrqeyg6+v7Ako9nUVa8w6PnyzEi+fSPckZiy1 7C4nvnB5p1sW9zKCrLJn5yAGw1YV9/ioxW9b07/ZbtDIi5ihVQaeaVG7PFqVoeS6pLF0th 4zmoMw/mPH+XkD3wVLQb114RzRjMXlTZIBD5m7vFaOG2xhpf97DxLGcDVisvnboYKS3VwB zTb02Vvo6CwvZnnZizFqP+hNcNp4hVC4c35w3jgFsgg9+rEuNozxzMGWwUHwQnc18Na1qH hrHRVqhyzDVB3K9ZQAOP7gjWU+ApIoEkPVfCHgkKDjh1VYSdIL/g6ApAk51pCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="WB/eS6go"; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709656884; a=rsa-sha256; cv=none; b=EfxX5RONtXGMZikABPoTTe52SLGOlHtBfF2eVe0nRRJE/IJdsPFWXpbbPfQTkA9rLvk9IT 8wpsDLQDdZR21LObkUTmKrkrDldD78TGxeuPw5lcPH22+JRLhsENeSlA2lxiay96zDJO7S eopFOo1vH3qYrXTG9wi7hvOHdduKwkcr/TTH1FnfSvd+seQCHu4Qtrbd54TLfV6M6+m4Pn UMe5l8RtWDg0M32AJvJlUwUciSR0bEPafmpQbmcv5OhN6aWQWw0fhhOh5MlELTz6bI+DDG 1qtLEetn1L7OpBESIdB7OBPxHJmQEmYjnRV0tryus/wxMQLg92TBhyJCco1g/w== 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 3FE8B2278A for ; Tue, 5 Mar 2024 17:41:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhXqS-0000nm-N2; Tue, 05 Mar 2024 11:40:48 -0500 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 1rhXqM-0000ld-94 for emacs-orgmode@gnu.org; Tue, 05 Mar 2024 11:40:42 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhXqJ-0000UQ-8l for emacs-orgmode@gnu.org; Tue, 05 Mar 2024 11:40:42 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a445587b796so606147666b.1 for ; Tue, 05 Mar 2024 08:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709656836; x=1710261636; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=AjQCjs6akTjOFze/WRZrUx0vKvlCqqHmKXI/iBrEs30=; b=WB/eS6goVjqFnZc204glv9Z42D9W4hKuyYwVcVjKMcWQ8HAd7voFuhNsWFg+kgturO j/I25BcGPLsIP+lumcSubyarasWz0GPhtSfxlWCO9fmZDKu/ctJK694wGlcEkVGFnEzw TAYcmrOvSgf313CcoBKpO9mUEDeCZDOpvYXRPG/aHBdtw/HrEvIwbQGZnwUFUdxLFqJW dFt6A7TE6xqcYVUj/w3ZZZZvXjEm3IkXUYd0dldNo2g6TBNHUnusVVDZt4vuAhNKX6Fi vkjs0K8EtsixdVFNb/cCsTkOhTtZ1V+n/ObDKPgZlKbxEgfe/vemePF+wHXz+qfRG321 BKkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709656836; x=1710261636; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AjQCjs6akTjOFze/WRZrUx0vKvlCqqHmKXI/iBrEs30=; b=JG1H0dfFMgqt5vA6aV/HX9MbPkkS1A74b+Rflc6RWUAdDjH13Xf+24sJqXF3cwlANz anRSR3VbEasbJdm17lV4ciM08MaadUOvpyDeTGDTsSt5HrzvybzWjufadJA1Al7GahKS V+0itZov7DLoYZJesF8OFtklvndGzg9U4uyvgbJjYosA7R+vDRrGcwrALLlioJU3m5Xm UOI2RQYl1dpSPNhjeoOCRvqZktlavDnnapqGukAT9WW2/WR/yDgS8+B/bBCl4/iRy78U cjQb3sNqRkJ6EDyhJVXokQyoDs+ahGhfM5Jjf3E0aEbT9YIEetkOFB+ME/TRVfdszKJz hvHw== X-Gm-Message-State: AOJu0YxZMowz6GpKEt0zBKagve9+3Enj7yv8ESIwpUBtZcAIcQGZ6whc lR1KdlQRQUxhHl3S2sUxKNikxXTmse5QGRWndjsinQilZdoJQnow X-Google-Smtp-Source: AGHT+IHtsVN4WpH/zEX1U0hY5jUOr28BIInSjby/NRXYyjsF7SCEmvCtWfM/fJ0PnykWfSBuFV29Kg== X-Received: by 2002:a17:906:1959:b0:a3e:93d0:3443 with SMTP id b25-20020a170906195900b00a3e93d03443mr7791776eje.34.1709656836198; Tue, 05 Mar 2024 08:40:36 -0800 (PST) Received: from windows ([2a01:110f:1506:3300:ddd:4f44:2e2:a16d]) by smtp.gmail.com with ESMTPSA id am20-20020a170906569400b00a459d922903sm1093259ejc.207.2024.03.05.08.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 08:40:35 -0800 (PST) From: Slawomir Grochowski To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, t_leitner@gmx.at Subject: Re: [FR] multiple column view definition In-Reply-To: <87r0go4zr2.fsf@localhost> References: <87cysa0zed.fsf@gmail.com> <87r0go4zr2.fsf@localhost> Date: Tue, 05 Mar 2024 17:40:30 +0100 Message-ID: <8734t4lji9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=slawomir.grochowski@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.54 X-Spam-Score: -9.54 X-Migadu-Queue-Id: 3FE8B2278A X-TUID: 000hktX5R+cz Ihor Radchenko writes: > It looks like you are asking for a way to choose between multiple column > specs when building column view. And that you have a very specific idea > how to implement it. However, the details of the idea are elusive to me. > May you elaborate? Sure. We have two COLUMNS definition: * 2024 :PROPERTIES: :COLUMNS: %ITEM(B) %TEST(B column) :COLUMNS: %ITEM(A) %TEST(A column) :END: #+BEGIN: columnview :hlines 1 | A | A column | |------+----------| | 2024 | | #+END: When and run `org-columns' on that heading it will display column view using :COLUMNS: definition from bottom. ':COLUMNS: %ITEM(A) %TEST(A column)'. The definition on top ':COLUMNS: %ITEM(B) %TEST(B column)' is ignored. The function to get the :COLUMN: definition to display is (org-entry-get nil "COLUMNS" t). Based on that behavior I made a simple function: (defun org-columns-switch-columns () (interactive) (save-excursion (org-columns-goto-top-level) (re-search-forward ":COLUMNS:") (org-metadown) (org-columns))) So it's just to move :COLUMNS: definition from top to bottom. And run `org-columns'. It works fine. The problem is when I want to modify the :COLUMNS: definition. In e.g. * 2024 :PROPERTIES: :COLUMNS: %ITEM(B) %TEST(B column) :COLUMNS: %ITEM(A) %TEST(A column) :END: It will display ':COLUMNS: %ITEM(A) %TEST(A column)' #+BEGIN: columnview :hlines 1 | A | A column | |------+----------| | 2024 | (put cursor here and run org-columns-delete) | #+END: It will modify the ':COLUMNS: %ITEM(B) %TEST(B column)'. So :COLUMNS: definition from top not from bottom. The function to modify :COLUMNS: definition is (org-entry-put nil "COLUMNS" fmt). So this is the problem. So in my opinion (org-entry-put nil "COLUMNS" fmt) should modify the :COLUMNS: definition from bottom (the last one) not from top (the first one). Or maybe someone has a better idea how to implement the functionality 'multiple column view definition'? -- Slawomir Grochowski