From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] ox-icalendar.el: create alarm at event time
Date: Sun, 26 Dec 2021 22:22:59 +0100 [thread overview]
Message-ID: <875yrbawng.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <fce47a5a9400d2c3fd7fc44b2ff64eab9f14086d.camel@eml.cc> (Mikhail Skorzhinskii's message of "Sat, 25 Dec 2021 16:24:15 +0100")
Hello,
Mikhail Skorzhinskii <mskorzhinskiy@eml.cc> writes:
> * lisp/ox-icalendar.el (org-icalendar-force-alarm): option to set alarm
> even if alarm time is set to zero.
> * lisp/ox-icalendar.el (org-icalendar--valarm): create VALARM at the
> event start if the alarm time is set to zero and
> `org-icalendar-force-alarm' is set to true.
Thanks. Some comments follow.
> +(defcustom org-icalendar-force-alarm nil
> + "Non-nil means alarm will be created even if is set to zero.
> +
> +This overrides default behaviour where zero means no alarm. With
^^^
You need two spaces after full stop.
> +this set to non-nil and alarm set to zero, alarm will be created
> +and will fire at the event start."
> + :group 'org-export-icalendar
> + :type 'bool)
`boolean' is the valid type.
You also need to add :package-version '(Org . "9.6") and :safe #'booleanp.
> + (if org-icalendar-force-alarm
> + (if alarm-time
> + alarm-time
> + org-icalendar-alarm-time)
> + (if (zerop alarm-time)
> + org-icalendar-alarm-time
> + alarm-time))))))
I suggest to refactor the above into something like:
(cond
((> alarm-time 0) alarm-time)
((and (= 0 alarm-time) org-icalendar-force-alarm) alarm-time)
(t org-icalendar-alarm-time))
Could you send an updated patch?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2021-12-26 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-25 15:24 [PATCH] ox-icalendar.el: create alarm at event time Mikhail Skorzhinskii
2021-12-26 21:22 ` Nicolas Goaziou [this message]
2021-12-28 12:08 ` Mikhail Skorzhinskii
2022-07-31 7:07 ` Ihor Radchenko
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
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=875yrbawng.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=mskorzhinskiy@eml.cc \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).