all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] ox-icalendar.el: customizable vevent summary prefix
@ 2021-12-25 15:24 Mikhail Skorzhinskii
  2021-12-26 21:26 ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Skorzhinskii @ 2021-12-25 15:24 UTC (permalink / raw)
  To: Org Mode


* 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.



^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-10-25  8:24 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-25 15:24 [PATCH] ox-icalendar.el: customizable vevent summary prefix Mikhail Skorzhinskii
2021-12-26 21:26 ` 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

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.