From: Mekeor Melire <mekeor@posteo.de>
To: Ihor Radchenko <yantar92@gmail.com>
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 [thread overview]
Message-ID: <87fsjh3piu.fsf@posteo.de> (raw)
In-Reply-To: <874k01jauc.fsf@localhost>
2022-07-01 / 20:06 / yantar92@gmail.com:
> 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))) ...)
>
> Best,
> Ihor
thank you very much, ihor. this worked! :)
prev parent reply other threads:[~2022-07-04 15:03 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
2022-07-01 12:48 ` Max Nikulin
2022-07-04 14:44 ` Mekeor Melire [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsjh3piu.fsf@posteo.de \
--to=mekeor@posteo.de \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.