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 ms0.migadu.com with LMTPS id +NQ/Ly9HUGFlBwAAgWs5BA (envelope-from ) for ; Sun, 26 Sep 2021 12:10:55 +0200 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 8LVrKi9HUGGCEwAA1q6Kng (envelope-from ) for ; Sun, 26 Sep 2021 10:10:55 +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 1E5CE29688 for ; Sun, 26 Sep 2021 12:10:54 +0200 (CEST) Received: from localhost ([::1]:48614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUR7O-0001BQ-72 for larch@yhetil.org; Sun, 26 Sep 2021 06:10:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUR6G-0001BI-8T for emacs-orgmode@gnu.org; Sun, 26 Sep 2021 06:09:36 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUR6B-0004oy-LO for emacs-orgmode@gnu.org; Sun, 26 Sep 2021 06:09:35 -0400 Received: by mail-wr1-x42f.google.com with SMTP id w29so42048279wra.8 for ; Sun, 26 Sep 2021 03:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=Jhh5XSNr8m/Pea34RvIQ8lynV3h+4xL/Q3eKMzgisTU=; b=PU6hXGYk0u4C/RTriZHWq6AUmVM0XQgy6tcs9jsdFfX0RC/7fxBJHs2T6WS41UZ7aW jypzMe71fwA77CUMqDNNpJ5rjxjhRUJuzANuVIa2nYM5UzjxluXuQK9+nGJMByVx4vaT xUmtHIBZhaTz/7R3iCFIqGJiiNHvG2X1z2zLHca7drviHA21uvjOTixrz8Nxt+dl09+j 3v3kbqgwuCtQdTC+8DtffsLy8LZqr4hKSenx7WzBSxhgsm83tObu7KD2wHYLuG90UBmG hwnmPmaesIl0a2SGiu+G6wfNDYCIbUmQCam1DGamjv5LXCSsCRuQsW1qNVbIshvKPlM2 IMsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=Jhh5XSNr8m/Pea34RvIQ8lynV3h+4xL/Q3eKMzgisTU=; b=bcF7/Xmce61jZVFBb8R1D7oJqNYGtSPsuBTADySXGV4OotekWiw7Gb6avaep4JjH7h ThdohWw64aOC4ZQRLbWAmwvqYmsKzvAozSRh+7UpTGaOO/IIgLBXj5w4pP13EP23Ukhi abgRStiz8GZZEmojVFpCedHOTRGIMwMN15tSL5kA+4NQKeVee12QiMfzzXF193WfTUBx 0D1gSJxRWj600wcTHCkDkH0/TOyJ1s+HpTx6dARvcMkoFKzo6CDScqDJrum60iWSp0Su F/FN/KYdFGzjdVk0Wd7PIwfZBkU4FjZExjQa58XdMMhvGM9jgrF+39FLCUhddtJUJQKB O7PQ== X-Gm-Message-State: AOAM531sNQj2ev7EJKaKOazja6P3U1xsFwG85goEvfCo98jKNXTp+o3v Hgzy4WYicojyP5Uzd6qX3r4= X-Google-Smtp-Source: ABdhPJwT9aUkmRQeHImL5okFsqQTM0Tkz1KfQvKVt3lV+8Rt7X0HfwNdqa/vhp6qZM5tMrlbRziNew== X-Received: by 2002:adf:de86:: with SMTP id w6mr10042182wrl.287.1632650970123; Sun, 26 Sep 2021 03:09:30 -0700 (PDT) Received: from aspire-5942 (p200300d867459b0080243a886f8a10cb.dip0.t-ipconnect.de. [2003:d8:6745:9b00:8024:3a88:6f8a:10cb]) by smtp.gmail.com with ESMTPSA id m4sm15742552wrx.81.2021.09.26.03.09.29 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Sep 2021 03:09:29 -0700 (PDT) From: Marco Wahl To: emacs-orgmode@gnu.org Subject: Re: shrink table in columnmode view (poor man's issue system) In-Reply-To: <87czowrgeu.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 25 Sep 2021 14:25:13 +0200") References: <87czowrgeu.fsf@mat.ucm.es> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 26 Sep 2021 12:09:12 +0200 Message-ID: <878rzjlkc7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=marcowahlsoft@gmail.com; helo=mail-wr1-x42f.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Uwe Brauer 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=1632651054; 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=Jhh5XSNr8m/Pea34RvIQ8lynV3h+4xL/Q3eKMzgisTU=; b=hU84uLGBcf2r990e2Yk9Xq/NyAlec8LFjShHLRQldqnkYE+64iSfrVrGFvWFIRdLxukpHq cXUkLXW85jWxjfRFECmGewluu/YcYuzVkYrx+ZfTytS5M0BQXM/ZIZxQxWPmbwqW0PSZnr HtHNyrhysqo7fZkecPtttGaaErpRYS78hpY1doYV+nSgtJbndENu3quum4LNXJ+u5b/pdQ AgBZ4WKMYiQxV+1jISxcDFM/W8ugpEpic7/1lwcjmCSsRjNfa8/Y6SBjtDfTa5HoIdytJ6 O5wP98YAlADiCWxHCjEynMVfa7BOKR85QJyYIRdMV1TEbrRiRVmIZm2KjtOuuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632651054; a=rsa-sha256; cv=none; b=tZUoasNPuhtHAYjhOY5U4DzuxZGw6C8DnGbVdeiqDZT/d/jWxqiTdxwjaAgqyE3dYGoom5 1ABtTZbITOR+TTa1JvA3c1lgCHRYcFMgvsQ01gLDP4WaNeoNS0IVrQNg6UGuSOJOTMe5X4 OCDdF0JWoFBSDGe6B741IHBgprzxgt7QUfrOLEjxnQMoJy0gOV6GrNrqcwYQmePf+JwboO ZuHWuqcEWlqy8h4Z1/zkfnx36DV5ahzU5l8atB01JIqpWB8/kPpZWg7Y+5E9sMvl6mgcfY f52SvZmMn6FEL6+f+l1I6bKhCdtw8ZVJCI4WsBq+Vyg022JLxRHqRS9ottLYoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PU6hXGYk; dmarc=pass (policy=none) header.from=gmail.com; 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: -1.59 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PU6hXGYk; dmarc=pass (policy=none) header.from=gmail.com; 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: 1E5CE29688 X-Spam-Score: -1.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: /TYGI1VMzyN2 Hi! Uwe Brauer writes: > I use the following org file to organise my issues. > It works quite well, however I would like to have a shrink option > automatically in my columnview. Your suggestion looks quite useful to me. > Any idea how to achieve that? One possibility is to write your own dynamic block writer function. Find documentation at (info "(org) Dynamic Blocks") . > File starts here: > > #+begin_src=20 > #+STARTUP: shrink > > * Issues > :PROPERTIES: > :COLUMNS: %50ITEM(Problem) %10Is(Issue Nr) %7TODO(Status) %26TAGS(Whi= ch) %17Date(Date) %7STATUS(Status){X/}=20 > :ID: Issues > :END: > > ** TODO Why is \eqref{eq:section4-sh15}: not used in the proof of propos= ition 5 (section 4) > :PROPERTIES: > :ID: Issues > :Date: <2021-09-25 s=C3=A1b> > :STATUS: [ ] > :Is: 9 > :END: > > The table is generated like this > #+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%= 5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}" > | Problem = | Issue | TODO | Date | Status | > |------------------------------------------------------------------------= --------------+-------+------+--------------+--------| > | Issues = | | | | [0/1] | > |------------------------------------------------------------------------= --------------+-------+------+--------------+--------| > | Why is \eqref{eq:section4-sh15}: not used in the proof of proposition = 5 (section 4) | 9 | TODO | <2021-09-25 s=C3=A1b> | [ ] | > #+END: > > > But I would like to have this > > #+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%= 5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}" > |<45> > | Problem = | Issue | TODO | Date | Status | > |------------------------------------------------------------------------= --------------+-------+------+--------------+--------| > | Issues = | | | | [0/1] | > |------------------------------------------------------------------------= --------------+-------+------+--------------+--------| > | Why is \eqref{eq:section4-sh15}: not used in the proof of proposition = 5 (section 4) | 9 | TODO | <2021-09-25 s=C3=A1b> | [ ] | > #+END: > > #+end_src=20 Concretely check out this proposition (tested with your example). Have (defun org-dblock-write:columnview2 (params) "Write the column view table. =09 Like org-dblock-write:columnview but write a line with shrink widths taken= from the column view format. =09 PARAMS is the same as in `org-dblock-write:columnview'." (insert (format "|%s|\n" (mapconcat (lambda (x) (concat "<" (number-to-string x) ">")) (mapcar (lambda (x) (nth 2 x)) (org-columns-compile-format (plist-get params :format))) "|"))) (org-dblock-write:columnview params)) defined. E.g. type C-x C-e after the last paren. Then use "columnview2" instead of "columnview" and get #+BEGIN: columnview2 :hlines 2 :skip-empty-rows t :indent nil :format "%5= ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}" | <5> = | <5> | <12> | <12> | <7> | | Problem = | Issue | TODO | Date | Status | |--------------------------------------------------------------------------= ------------+-------+------+------------------+--------| | Issues = | | | | [0/1] | |--------------------------------------------------------------------------= ------------+-------+------+------------------+--------| | Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 = (section 4) | 9 | TODO | <2021-09-25 s=C3=A1b> | [ ] | #+END: HTH