From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QKdlHDD+/2CxLwAAgWs5BA (envelope-from ) for ; Tue, 27 Jul 2021 14:38:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UDcuGDD+/2CrCgAAbx9fmQ (envelope-from ) for ; Tue, 27 Jul 2021 12:38:08 +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 E2D0BBF99 for ; Tue, 27 Jul 2021 14:38:06 +0200 (CEST) Received: from localhost ([::1]:44198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8MLW-0003uU-0M for larch@yhetil.org; Tue, 27 Jul 2021 08:38:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8MKN-0003u5-M1 for emacs-orgmode@gnu.org; Tue, 27 Jul 2021 08:36:55 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:46685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8MKL-00085g-M0 for emacs-orgmode@gnu.org; Tue, 27 Jul 2021 08:36:55 -0400 Received: by mail-lf1-x131.google.com with SMTP id m13so21353360lfg.13 for ; Tue, 27 Jul 2021 05:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=Yzimy6wLzs7+7iiQ/8tjgfV5UKitPYGbDGngOOhL32k=; b=tzHSTTZWzoDrPKs3wJR3WW2mlLTa9hLaDAV6csts5NmaxrUF0bM+79Ud+TYBrkl50b lT9A6gtf40f3CvpWfUEIcZ6gIIPE+7Wj5CkaTK9du7I7Zn8uxA9W3LzZh5aLh2IBAhlh kVG6xptSRo36ez9PHDJvxo7HOpw8fVlFN0r4v67/lrGbO5IzqveiWLBCmasneQspyr10 aBc5Jfn9Vtya9Wu9eeSkT6hj/3UzQhaNHOVGwsHMiiPDuZhG7UAMiQv7W8kWoT1S2acF uhW/cQl9Qbe255fvuXuirCxqF+QLnSviQU4VZwuUNb8bQHRtQdata153U7+9xUdE0QjX RKTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=Yzimy6wLzs7+7iiQ/8tjgfV5UKitPYGbDGngOOhL32k=; b=VzqEU/lI1pnhXSgJPVrVa2FwgGAekqmqDcW2o8TY8WFrSrV6vnVFdtqdO35juA4JHO u+7wfqhpNxf5QfWGTJVpQoI4UeB8FG2SV+nxAUud/isMQ3NBk6D7PftKyXzaVqBBBoh0 QtCaK4KJgiSatF/p1a7YsOp9DPCgfGBp/Erq7sexpktYRtGKZfoY/vgqRg/V17gUsz9U Ib4k3pcq/t8UmHLO4MFzFtL/f0WVTsXiI2tXg+PJCv07ZnuiJse/S0Vp+mLRzPZo7nrk jS7mMmJssSyCIL7LNN4E7utf4U55gdA47KrpXnee9O6sn1cjVQhgaga+CJeooyWnZQVk ws5g== X-Gm-Message-State: AOAM530cT+X7nt6ijEHME4M1FSFpbb+uoaHJ15TazkBU32Mak24m93xV VSCMi90UKP9goKXBZGKXRiXYsAtq7OE= X-Google-Smtp-Source: ABdhPJyhb80JwfJRrJVGTVKkHHwdh7Hw9sztLAsACFvErepY5qjCLySSb5Ni9K6EZyjYPySBaS23WQ== X-Received: by 2002:a05:6512:3905:: with SMTP id a5mr8513912lfu.406.1627389410440; Tue, 27 Jul 2021 05:36:50 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id m5sm269202ljq.22.2021.07.27.05.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 05:36:49 -0700 (PDT) From: Ihor Radchenko To: Karl Voit Subject: Re: Dynamic block tables: adding prefix of "id:" to %ID In-Reply-To: <2021-07-27T14-01-26@devnull.Karl-Voit.at> References: <2021-07-23T10-42-47@devnull.Karl-Voit.at> <87v94yojwx.fsf@localhost> <2021-07-27T14-01-26@devnull.Karl-Voit.at> Date: Tue, 27 Jul 2021 20:36:41 +0800 Message-ID: <87wnpc0w86.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=yantar92@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: emacs-orgmode@gnu.org 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=1627389487; 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=Yzimy6wLzs7+7iiQ/8tjgfV5UKitPYGbDGngOOhL32k=; b=cVjwi7bgp5aHK30OHO+QhB6fvkg5ocz8MwkO6V3PwDwfmaalxfMsPLnfbsPKAsr2wkc/p/ 7EHXMxKch/9ZKuR9/W2J6NniW9yd+NifJRBD2yj9PNBbNin8DmZm/0WAMxJ1JLxvXSnjIZ 8IIhwhmhK/IPbne3Ghk+ge0zPKkWLFROc54ZoZYOIU/1cDDdFwl5nwFIwMFFfTMuYgb663 LSXFJoZ/3loxWLu0UnB43zl903eLmsw3JYULwa69qAlA9c4SxL9Swodd5+CuI1/k52NH5z G8XDn7kIB5CSd8djuTIxF6aD9t2f5K6m3yKPj7E/z/WT3ZZDgSZMTYZDDcqbaQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627389487; a=rsa-sha256; cv=none; b=oxrEWoPar73scKwB/5GQMjczyxk/N0EbziMEXe/b6Vh8yClTEPFaunSZcXf+39XPWZ+GN+ OsIcgPhHUXVAufRDr6IREhnwlRIIHqSzwvYSQii0FkIeApArq4y/yTsJMGxSMCCJJa6lNU gPgsfvS+Z+B90gV6li56AH+sz4jgON1H4G/vjLBUMp2d9vp/5FBRv28QtmIoEVYvNAqU+3 KHSeBPG/QF953zMVXsGMIiu7Z6lD98q+Z0FGIBQualEYYT3fOZNh1ESoJ6owlJ/GGa7JYS WyKqW6WA/ppqGM7a+5doOjsHKgVbV6Nl6sFAjDrkjpMojRqGE6cxbQx6JnIn7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=tzHSTTZW; 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: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=tzHSTTZW; 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: E2D0BBF99 X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: BNG+4HVcOg5f Karl Voit writes: > Thanks, this sounds clever and I think I understand the code. > Although I would have preferred not to overwrite a function. I > always have a fear that this leads to nasty side-effects with future > updates. That's not overwriting. org-columns-modify-value-for-display-function is not a function, but a custom variable defaulting to nil. You have all rights to set it to whatever you wish. > Without deeper knowledge, I was astonished that C-h f > org-columns-modify-value-for-display-function did not lead to a > matching function and C-h v ... to a matching variable. Hmm. You are right. This should be a bug. It happens because org-colview.el is only loaded after you actually run column view or corresponding dblock. Before that, Emacs is not aware about this variable (unless you require org-colview manually in your config). > When I applied the new change to update a table in a file of 71k > lines of org, I had to cancel the process after over two hours > without a result. Before the change, updating this table took > roughly 20 minutes. That's probably because the function I provided tries to compute the description part of the link by querying the headline for each result. You may get much better performance using the following version: (defun yant/org-columns-custom-formatter (column-title value) "Format column values for columns with ID-LINK title as proper Org mode id: link." (pcase column-title ("ID-LINK" (format "[[id:%s]]" value)) (_ nil))) Best, Ihor