Resubmitting this patch with better commit message.

Mikhail Skorzhisnkii <mskorzhins...@eml.cc> writes:

> I have signed FSF papers. Attaching a rebased patch with additional changes to
> ORG-NEWS
>
> Ihor Radchenko <yanta...@gmail.com> writes:
>
>> “Mikhail Skorzhinskiy” <mskorzhins...@eml.cc> writes:
>>
>>> Thanks for review, Ihor. I have sent a copyright assignment request. Will
>>> resubmit the patches as soon as I complete the process.
>>
>> Thanks! Note that FSF clerk should reply within 5 working days. If not,
>> please let us know.
>>
>> Best,
>> Ihor
>
> [2. text/x-diff; 
> 0001-org-agenda.el-customize-outline-path-in-echo-area.patch]…
>From 38c940230e84af34f023a17033fbbe0723e25b0d Mon Sep 17 00:00:00 2001
From: Mikhail Skorzhinskii <mskorzhins...@eml.cc>
Date: Sat, 12 Sep 2020 18:27:23 +0200
Subject: [PATCH] ox-icalendar.el: customize vevent summary prefix

* lisp/ox-icalendar.el (org-icalendar-scheduled-summary-prepend): A new
customization option to control summary prefix in exported scheduled
events.
* lisp/ox-icalendar.el (org-icalendar-deadline-summary-prepend): 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 | 19 +++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 7dae03dc6..b40820c4a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -290,6 +290,13 @@ level used for top level headings, much like how
 headings in HTML export.
 
 ** New options
+*** A new custom settings =org-icalendar-scheduled-summary-prepend= and =org-icalendar-deadline-summary-prepend=
+
+These setting allow users to define prefixes for exported summary
+lines in ICS exports. Potential use would be to disable prefixes all
+together or be a little bit mode verbose (e.g. "Deadline: " instead of
+"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 352d16335..912e19e6c 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -98,6 +98,21 @@ 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
+  :package-version '(Org . "9.6")
+  :safe #'stringp)
+
+
+(defcustom org-icalendar-deadline-summary-prepend "DL: "
+  "String used for prepending summary in exported deadlines."
+  :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.
 
@@ -621,7 +636,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
@@ -632,7 +647,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.
-- 
2.35.1

Reply via email to