emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] ox-icalendar.el: customizable vevent summary prefix
Date: Sat, 25 Dec 2021 16:24:21 +0100	[thread overview]
Message-ID: <0a1b98af1974ec260c4074df056715e237c08fce.camel@eml.cc> (raw)


* lisp/ox-icalendar.el (org-icalendar-scheduled-summary-prepend):
configurable prefix for the scheduled headlines
* lisp/ox-icalendar.el (org-icalendar-deadline-summary-prepend):
configurable prefix for the headlines with a deadline
* lisp/ox-icalendar.el (org-icalendar-entry): use a configurable
headline prefixes (see above) instead of hardcoded ones
---
 lisp/ox-icalendar.el | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 68c5679ea..0a56e08e5 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -84,6 +84,17 @@ keyword."
   :group 'org-export-icalendar
   :type '(repeat (string :tag "Tag")))
 
+(defcustom org-icalendar-scheduled-summary-prepend "S: "
+  "String used for prepending summary in exported scheduled
headlines."
+  :group 'org-export-icalendar
+  :type 'string)
+
+
+(defcustom org-icalendar-deadline-summary-prepend "DL: "
+  "String used for prepending summary in exported deadlines."
+  :group 'org-export-icalendar
+  :type 'string)
+
 (defcustom org-icalendar-use-deadline '(event-if-not-todo todo-due)
   "Contexts where iCalendar export should use a deadline time stamp.
 
@@ -607,7 +618,7 @@ inlinetask within the section."
                   (_ (memq 'event-if-not-todo use-deadline)))
                 (org-icalendar--vevent
                  entry deadline (concat "DL-" uid)
-                 (concat "DL: " summary) loc desc cat tz class)))
+                 (concat org-icalendar-deadline-summary-prepend
summary) loc desc cat tz class)))
          (let ((scheduled (org-element-property :scheduled entry))
                (use-scheduled (plist-get info :icalendar-use-
scheduled)))
            (and scheduled
@@ -618,7 +629,7 @@ inlinetask within the section."
                   (_ (memq 'event-if-not-todo use-scheduled)))
                 (org-icalendar--vevent
                  entry scheduled (concat "SC-" uid)
-                 (concat "S: " summary) loc desc cat tz class)))
+                 (concat org-icalendar-scheduled-summary-prepend
summary) loc desc cat tz class)))
          ;; When collecting plain timestamps from a headline and its
          ;; title, skip inlinetasks since collection will happen once
          ;; ENTRY is one of them.



             reply	other threads:[~2021-12-25 15:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-25 15:24 Mikhail Skorzhinskii [this message]
2021-12-26 21:26 ` [PATCH] ox-icalendar.el: customizable vevent summary prefix Nicolas Goaziou
2021-12-28 12:10   ` Mikhail Skorzhinskii
2022-07-31  7:16     ` Ihor Radchenko
2022-07-31  7:35       ` Mikhail Skorzhinskiy
2022-07-31 13:02         ` Ihor Radchenko
2022-08-30 13:50           ` Mikhail Skorzhisnkii
2022-08-31 12:09             ` Ihor Radchenko
2022-09-05 18:50               ` Mikhail Skorzhisnkii
2022-09-08  5:40                 ` Ihor Radchenko
2022-09-08 20:10                   ` Mikhail Skorzhisnkii
2022-09-09 10:13                     ` Ihor Radchenko
2022-10-23 19:15                       ` Mikhail Skorzhisnkii
2022-10-25  6:59                         ` Ihor Radchenko
2022-08-31 12:11             ` Ihor Radchenko
2022-09-01  7:29               ` Bastien
2022-08-31 12:13             ` Ihor Radchenko
2022-09-05 18:59               ` Mikhail Skorzhisnkii
2022-09-05 19:28             ` Mikhail Skorzhisnkii
2022-09-08  5:33               ` 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=0a1b98af1974ec260c4074df056715e237c08fce.camel@eml.cc \
    --to=mskorzhinskiy@eml.cc \
    --cc=emacs-orgmode@gnu.org \
    /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).