emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Mekeor Melire <mekeor@posteo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Customizing org-columns-modify-value-for-display-function to shorten time-stamps in colview
Date: Fri, 01 Jul 2022 20:06:51 +0800	[thread overview]
Message-ID: <874k01jauc.fsf@localhost> (raw)
In-Reply-To: <87v8sr54bu.fsf@posteo.de>

Mekeor Melire <mekeor@posteo.de> 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))) ...)


  reply	other threads:[~2022-07-01 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 23:44 Customizing org-columns-modify-value-for-display-function to shorten time-stamps in colview Mekeor Melire
2022-07-01 12:06 ` Ihor Radchenko [this message]
2022-07-01 12:48   ` Max Nikulin
2022-07-04 14:44   ` Mekeor Melire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k01jauc.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mekeor@posteo.de \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).