From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YDryIprjvmJxRgEAbAwnHQ (envelope-from ) for ; Fri, 01 Jul 2022 14:07:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4HPeIprjvmLCCgEA9RJhRA (envelope-from ) for ; Fri, 01 Jul 2022 14:07:54 +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 3C3F18C61 for ; Fri, 1 Jul 2022 14:07:54 +0200 (CEST) Received: from localhost ([::1]:39208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7FRB-0006t1-81 for larch@yhetil.org; Fri, 01 Jul 2022 08:07:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7FPA-0006sp-Ls for emacs-orgmode@gnu.org; Fri, 01 Jul 2022 08:05:48 -0400 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:43630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7FP9-0001jR-3c for emacs-orgmode@gnu.org; Fri, 01 Jul 2022 08:05:48 -0400 Received: by mail-oi1-x234.google.com with SMTP id q11so3200201oih.10 for ; Fri, 01 Jul 2022 05:05:46 -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:date:message-id :mime-version; bh=UOej5ailTCy8ceaasurCPQj0zl6Eg5dHrk1gSG0XMUA=; b=USEH2DwQCjtKoe/A3WvNGD7QbsrxZgWBE0VagKwhOPjFPizMRCs/lh64GpKjzkGbgi ugnWNJ/kMvCboOJrk2mqX/65haTTZEPzYcUYEv/7yOwpSgpYgaE0+ggOJ6Huxnl0Dz9w KEQNFQpqQJGC/QeEtpr+BK+FXL9KA4ThwmFqSe8pONax6YUZOgj9LisGKooRR/KLqUEp ocxzfb95V+Cundjlavuhlz97p0CAg938sqcpY+/oyxQ61gM3WmSD268c2Z3zId6u8Y8p Ezp8MUBmsEUM4Z+8MX4oI8OWfRnBKJAau3kmI+cwVs8cki9P+yqIxSvLi/FW7kWQOJpI 3HAw== 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:date :message-id:mime-version; bh=UOej5ailTCy8ceaasurCPQj0zl6Eg5dHrk1gSG0XMUA=; b=DcnhHPbJS2BTKdKALDzRVm3Z6eS0uIr+BI/xWFDI4q+C4LGyQTgKBveVZu4tgARLuN agCItO5Obpkp0YpFudus+xqF+zgDcfrBbirPk4xN6MRBWHvz6Noa9meVwCjrtl4Yd6K9 0Sxh7AOr9aWR0BRmrO5BdYfpMK/TuDFhWPWS6ovkbTgEMx6S66t3ZJaUDeExRaD4x21V 2zO9X/CUyVjSJaMAaeG+6yN2iaBfn+xQ18u4c+aP2M0xyMNcjtAd5/f9cXONyFJ40y0D 4KcLYIWTOKOy8PGB5ZAYodpvqWEAAvEHSVw0hA71PWW6M6w6Z5Ad/S4MTFOPlSmerDUO rBrw== X-Gm-Message-State: AJIora/yZeXP/CWp+ueX7KJIu2zpBGBEHwRKAC8oL8hwOR3gIs4O4+JE 5tr3LBO4dzfQHZJnjXAJMKU= X-Google-Smtp-Source: AGRyM1tc2ebYxP7CYNjGMn9JBMPmfW+O5FIEJswGuD30dZk+kChcNExxBxpplEXBJbmws4BPpDANcw== X-Received: by 2002:a05:6808:300f:b0:325:a942:fd64 with SMTP id ay15-20020a056808300f00b00325a942fd64mr8200238oib.41.1656677145377; Fri, 01 Jul 2022 05:05:45 -0700 (PDT) Received: from localhost ([207.126.88.10]) by smtp.gmail.com with ESMTPSA id w3-20020a056830110300b0060bf9d6c060sm1386146otq.1.2022.07.01.05.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 05:05:44 -0700 (PDT) From: Ihor Radchenko To: Mekeor Melire Cc: emacs-orgmode@gnu.org Subject: Re: Customizing org-columns-modify-value-for-display-function to shorten time-stamps in colview In-Reply-To: <87v8sr54bu.fsf@posteo.de> References: <87v8sr54bu.fsf@posteo.de> Date: Fri, 01 Jul 2022 20:06:51 +0800 Message-ID: <874k01jauc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::234; envelope-from=yantar92@gmail.com; helo=mail-oi1-x234.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656677274; 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=UOej5ailTCy8ceaasurCPQj0zl6Eg5dHrk1gSG0XMUA=; b=opLHB8T/oyLC7a+mZqqPXhG5JkR/SnHnSneaz190+a4Cx100Bz+q0NSbRPhqeQDP5wJ2pU 53xajKK2rq2faV9PDOT5lG1703uY3M4oBoDoNxeho4K1zwD7BofpR9RLtK+pnNA4htEzeB UQuxNubqu5kiBDC0cHIwVKNLOnaCiP8sRRGCYkhNB9rDHQbHIFiWRuEre2ydXLp1jo37l/ Ob8dLP2kFa/B61CpUmOHS+uXghkrBRrDAsOiG0J3lGk10MzearlR6ARdyb02ec3XLICgHn ljmekpQ3ShkMKG4dLQma4BeM5nirvv9B0G0yTHzUAKZCcJey1wgtvRhABZV+Xg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656677274; a=rsa-sha256; cv=none; b=IjLlF0yolJP3HP6nkNueqlB7KcqAroFRFc3XonYCyIzAHdbehARdzDOcPwk9IYF/PbBhVZ GJP8OUzW3v0YIGiUnRGy+NrG6fFZ3uwRcpMQNtPkkvh8iyXGPn4xBqU+hB5ompw7PZRzKJ gCCngmuyYcWcxhFGmjTkaCkvqV3Ledzv+h4+kWzyv5wG/MHh7VDtyVp5gPzAt+ARJKEo+R r+xlttJa0eslPrALJcKtyuKsR6LtyROisK2sCd+ZKvYYjy62C9tbYAu1SGLcUF/mRQmNOd TbFFxcjXw1aXbvhFM7qfmd5EIbXT4mlmvTA6IUYeQ1lLcZipaj6vUtmf6hitzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=USEH2DwQ; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Spam-Score: -3.45 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=USEH2DwQ; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: 3C3F18C61 X-Spam-Score: -3.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: CEOMkpj2uVrQ Mekeor Melire writes: > But it results in empty (nil, I guess) time-stamps being displayed as > the current time; and non-nil time-stamps being displayed with the > current hour and minute. What's wrong? Empty time-stamps will be literally empty: "" (that is: empty string). (if "" 1 2) will return 1. That's why you got unexpected result. You could instead use (if (and value (not (string-empty-p value))) ...) Best, Ihor