emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org eb5ef0ae14: ox-icalendar.el: Customize vevent summa


From: ELPA Syncer
Subject: [elpa] externals/org eb5ef0ae14: ox-icalendar.el: Customize vevent summary prefix
Date: Thu, 8 Sep 2022 01:57:55 -0400 (EDT)

branch: externals/org
commit eb5ef0ae1424a725f933ef3929e5396a2ab727ab
Author: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
Commit: Ihor Radchenko <yantar92@gmail.com>

    ox-icalendar.el: Customize vevent summary prefix
    
    * lisp/ox-icalendar.el (org-icalendar-scheduled-summary-prefix): A new
    customization option to control summary prefix in exported scheduled
    events.
    * lisp/ox-icalendar.el (org-icalendar-deadline-summary-prefix): A new
    customization option to control summary prefix in exported deadline
    events.
    * lisp/ox-icalendar.el (org-icalendar-entry): Use configurable summary
    prefixes for scheduled and deadline events, instead of hardcoded ones.
---
 etc/ORG-NEWS         |  7 +++++++
 lisp/ox-icalendar.el | 21 +++++++++++++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 713a850f6b..3c98e8ba0c 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -295,6 +295,13 @@ Use the header argument =:var x=code-block[]= or
 to pass the contents of a named code block as a string argument.
 
 ** New options
+*** New custom settings =org-icalendar-scheduled-summary-prefix= and 
=org-icalendar-deadline-summary-prefix=
+
+These settings allow users to define prefixes for exported summary
+lines in ICS exports.  The customization can be used to disable
+the prefixes completely or make them a little bit more verbose
+(e.g. "Deadline: " instead of the default "DL: ").
+
 *** A new custom setting =org-hide-drawer-startup= to control initial folding 
state of drawers
 
 Previously, all the drawers were always folded when opening an Org
diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 1a510f2a87..e5b2f7b363 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -101,6 +101,21 @@ keyword."
   :group 'org-export-icalendar
   :type '(repeat (string :tag "Tag")))
 
+(defcustom org-icalendar-scheduled-summary-prefix "S: "
+  "String prepended to exported scheduled headlines."
+  :group 'org-export-icalendar
+  :type 'string
+  :package-version '(Org . "9.6")
+  :safe #'stringp)
+
+
+(defcustom org-icalendar-deadline-summary-prefix "DL: "
+  "String prepended to exported headlines with a deadline."
+  :group 'org-export-icalendar
+  :type 'string
+  :package-version '(Org . "9.6")
+  :safe #'stringp)
+
 (defcustom org-icalendar-use-deadline '(event-if-not-todo todo-due)
   "Contexts where iCalendar export should use a deadline time stamp.
 
@@ -624,7 +639,8 @@ 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-prefix summary)
+                  loc desc cat tz class)))
          (let ((scheduled (org-element-property :scheduled entry))
                (use-scheduled (plist-get info :icalendar-use-scheduled)))
            (and scheduled
@@ -635,7 +651,8 @@ 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-prefix 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 via email to

[Prev in Thread] Current Thread [Next in Thread]