* [PATCH 5/8] ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property'
@ 2015-11-08 10:18 Kosyrev Serge
2015-11-12 16:53 ` Rasmus
0 siblings, 1 reply; 3+ messages in thread
From: Kosyrev Serge @ 2015-11-08 10:18 UTC (permalink / raw)
To: emacs-orgmode
* ox-taskjuggler.el (org-taskjuggler-multivalued-property): new function
to operate on multivalued properties.
---
contrib/lisp/ox-taskjuggler.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 82aaa7e..8036af3 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -836,6 +836,16 @@ channel."
;; Closing report.
"}\n"))
+(defun org-taskjuggler-multivalued-property (property element)
+ "Obtain PROPERTY of ELEMENT, treating it as a multi-valued property.
+
+See `org-entry-get-multivalued-property' for details."
+ (let ((prop (org-element-property property element)))
+ (and prop
+ (mapcar 'org-entry-restore-space
+ (org-split-string prop
+ "[ \t]")))))
+
(defun org-taskjuggler--build-task (task info)
"Return a task declaration.
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property'
2015-11-08 10:18 [PATCH 5/8] ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property' Kosyrev Serge
@ 2015-11-12 16:53 ` Rasmus
2015-11-12 17:03 ` Kosyrev Serge
0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2015-11-12 16:53 UTC (permalink / raw)
To: emacs-orgmode
Kosyrev Serge <_deepfire@feelingofgreen.ru> writes:
> * ox-taskjuggler.el (org-taskjuggler-multivalued-property): new function
> to operate on multivalued properties.
> ---
> contrib/lisp/ox-taskjuggler.el | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
> index 82aaa7e..8036af3 100644
> --- a/contrib/lisp/ox-taskjuggler.el
> +++ b/contrib/lisp/ox-taskjuggler.el
> @@ -836,6 +836,16 @@ channel."
> ;; Closing report.
> "}\n"))
>
> +(defun org-taskjuggler-multivalued-property (property element)
> + "Obtain PROPERTY of ELEMENT, treating it as a multi-valued property.
Isn't the docstring a bit tautological? Does property mean the same in
the beginning and the end of the sentence? Sorry if I’m missing something
obvious here...
--
Vote for proprietary math!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property'
2015-11-12 16:53 ` Rasmus
@ 2015-11-12 17:03 ` Kosyrev Serge
0 siblings, 0 replies; 3+ messages in thread
From: Kosyrev Serge @ 2015-11-12 17:03 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> Kosyrev Serge <_deepfire@feelingofgreen.ru> writes:
>> +(defun org-taskjuggler-multivalued-property (property element)
>> + "Obtain PROPERTY of ELEMENT, treating it as a multi-valued property.
>
> Isn't the docstring a bit tautological? Does property mean the same in
> the beginning and the end of the sentence? Sorry if I’m missing something
> obvious here...
The first occurence "binds" the parameter name within the semantic
structure of the sentence, so to speak, whereas the second one provides
the description of what is done to the obtained entity.
Coming from the Common Lisp background, the uppercased argument names
are often used for this kind of semantic "binding", and in these cases
the need to explain what is done to the "bound" names isn't obviated.
It's merely a cultural default, so I have no particularly strong feeling
about the docstring.
If you have a better idea, we can discuss that : -)
--
с уважениeм,
Косырев Сергей
руководитель отдела технологий виртуализации
Positive Technologies
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-12 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08 10:18 [PATCH 5/8] ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property' Kosyrev Serge
2015-11-12 16:53 ` Rasmus
2015-11-12 17:03 ` Kosyrev Serge
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).