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 qMjvOiQBw2JlRQEAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 17:03:01 +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 SP6/OiQBw2K9fgAA9RJhRA (envelope-from ) for ; Mon, 04 Jul 2022 17:03:00 +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 A66EE3F06 for ; Mon, 4 Jul 2022 17:03:00 +0200 (CEST) Received: from localhost ([::1]:34020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8NbH-0000qq-LC for larch@yhetil.org; Mon, 04 Jul 2022 11:02:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8NLu-0004GP-30 for emacs-orgmode@gnu.org; Mon, 04 Jul 2022 10:47:06 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8NLr-00025A-N7 for emacs-orgmode@gnu.org; Mon, 04 Jul 2022 10:47:05 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 74CED240026 for ; Mon, 4 Jul 2022 16:47:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1656946020; bh=S4EPlifiUuF5bIvXydTrFgRfwS05ustjUBWxCeVVKgU=; h=From:To:Cc:Subject:Date:From; b=gwqIxMx5m2QGq9oe5/IWThoEyFC9hALBTXc0kaxj60GI6rLnQGwkIX7jOOZwj2J2y 4SCd7eyehNe5QEvcG1a4jyKrFGWBs4rv9+S6kcay8VG5U3A3HfsFpFgzmY7DYlWT3I Zp9Q7fq58gAyX/urNogxQHJSdYnkfP5kAwp/iu8z85vBJ4i84EgJGDIih6pHZHBEqH M2Q1SjMx2Q18h/RcySSpoLbOPUO/BD6dMOkbIPC+yN5SoeAYiWL4BBaiE322Iy03IQ 2GNBv3fF7R9IQvNCTCsNTnA0espWjOI3O250GNOJD8wTOmzMTrorrYgk1gErYH40H3 /dfh2Iy/ocoLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lc7tW4W3dz6tm4; Mon, 4 Jul 2022 16:46:59 +0200 (CEST) References: <87v8sr54bu.fsf@posteo.de> <874k01jauc.fsf@localhost> From: Mekeor Melire To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Customizing org-columns-modify-value-for-display-function to shorten time-stamps in colview Date: Mon, 04 Jul 2022 14:44:36 +0000 In-reply-to: <874k01jauc.fsf@localhost> Message-ID: <87fsjh3piu.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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=1656946980; 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=S4EPlifiUuF5bIvXydTrFgRfwS05ustjUBWxCeVVKgU=; b=RMcjF1aWpvfb7v0goHwLmK6K12ephle9uchkUmYnJBE28opwRvpFA8qAsadkvvIJuk7qhG 398wDwunQX284UfG+vMJvImwJe9VFzz5tSYwy/ryEyAVXeZgi6uUnMqtkd/36XPCLIffEX vmYbQTlsPxHn+ESUTqF3MJYFT37tTHZkzscPEknZ77cHmegpmGL12LfJ8Zc+IRSOjAdIHk bJqyPVbCstkZolvhxI3p5gx6/e7csDrPqRER6UvkIe3WkZLw6Rs94ShXRAeRVDNvblhucd lzyzq34vUGNlhl/Fsm2BAjo7nXHtrIZmTQVRZD4cqejWQaenUIEcPiqMMv4L0Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656946980; a=rsa-sha256; cv=none; b=WyJStQLq7fwCxOkuXp/zLIZCyqJqUPu6ie2ajf4s3COr8TdBBsohGjaW9EDcORLqzkTe+k Aq9eI9X3zy/Gpo7TSQHf86lkBgZ4hMq/uJgtID6jQtux/dT43I6Icu0iPIjEZc5uQza66M 1RwYfpDNeE5iVdTxtQthy5EbJQyuJ0fNGGEDd3Xey8/fcpr2m/TD2IaLsOX0V92RBJBaqx xIKvRc2H2sE2oFV/Rq2ZQgOOYPMxfJZuDD6z/YWLvMYQGzIpgLiHwx/TEOTZIg1+hX/hor itarqS3Y34qxFL0C3PUJiCk1gJcXrQb8/LZ1f9LfdChfad8IKHuiCU1BqN7srg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=gwqIxMx5; dmarc=pass (policy=none) header.from=posteo.de; 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: -5.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=gwqIxMx5; dmarc=pass (policy=none) header.from=posteo.de; 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: A66EE3F06 X-Spam-Score: -5.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7Eq0OKwQRQ2y 2022-07-01 / 20:06 / yantar92@gmail.com: > 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 thank you very much, ihor. this worked! :)