On 2025-11-19 Wed 16:58, Titus von der Malsburg <[email protected]> wrote:
> On 2025-11-15 Sat 21:00, Ihor Radchenko <[email protected]> wrote:
>> Titus von der Malsburg <[email protected]> writes:
>>
>>> However, it would be good to fix the relevant documentation, which
>>> creates the impression that PROPERTY+ is only used add values to those
>>> inherited from elsewhere.  Perhaps the documentation could include an
>>> example from org contacts where multi-valued properties are common
>>> (phone numbers, e-mail addresses, …).
>>>
>>>> The manual also says that "Note that a property can only have one
>>>> entry per drawer."
>>>
>>> This wording should be made more precise since, as you show above, it’s
>>> actually possible to have multiple entries per drawer via the PROPERTY+
>>> syntax.
>>
>> Would you be interested to prepare a patch that improves the wording?
>
> Of course, see attachment.  I’ve added info on how to use the PROPERTY+
> syntax and how not to use the PROPERTY syntax.  I also took the liberty
> of slightly simplifying the first example and changed existing text that
> implied that the separator for multiple values was necessarily a space
> which it may not be.  Let me know if you want me to make changes.
>
> I have signed the FSF paperwork some years ago and have previously
> contributed patches.

Sorry, there was a typo in the last patch.  Fixed patch attached.

  Titus

-- 
Titus von der Malsburg, Jun.-Prof. Dr.
Psycholinguistics and Cognitive Modeling
Institute of Linguistics, University of Stuttgart
https://tmalsburg.github.io
>From 572a06094e0e26e06fc2c5cebd76ac58032b5ee9 Mon Sep 17 00:00:00 2001
From: Titus von der Malsburg <[email protected]>
Date: Wed, 19 Nov 2025 16:38:21 +0100
Subject: [PATCH] doc/org-manual.org: Elaborate description of PROPERTY+ syntax

* doc/org-manual.org: Added information on possible uses of the
PROPERTY+ syntax and impossible uses of the PROPERTY syntax (without
appended +).  Simplified an existing example.

Link: https://list.orgmode.org/[email protected]/
---
 doc/org-manual.org | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 50359ef5b..2da7f12b8 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5403,16 +5403,17 @@ Properties can also be defined using lines like:
 #+cindex: @samp{+} suffix, in properties
 If you want to add to the value of an existing property, append a =+=
 to the property name.  The following results in the property =var=
-having the value =foo=1 bar=2=.
+having the values =foo= and =bar=.
 
 #+begin_example
-,#+PROPERTY: var  foo=1
-,#+PROPERTY: var+ bar=2
+,#+PROPERTY: var  foo
+,#+PROPERTY: var+ bar
 #+end_example
 
-It is also possible to add to the values of inherited properties.  The
-following results in the =Genres= property having the value =Classic
-Baroque= under the =Goldberg Variations= subtree.
+Using the appended =+=, it is also possible to add to the values of
+inherited properties.  The following results in the =Genres= property
+having the values =Classic=, =Baroque=, and =Keyboard music= under the
+=Goldberg Variations= subtree.
 
 #+begin_example
 ,* CD collection
@@ -5428,10 +5429,13 @@ Baroque= under the =Goldberg Variations= subtree.
     :Publisher: Deutsche Grammophon
     :NDisks:    1
     :Genres+:   Baroque
+    :Genres+:   Keyboard music
     :END:
 #+end_example
 
-Note that a property can only have one entry per drawer.
+Note that a property can only have multiple entries per drawer when
+used with the appended =+=.  When a property has multiple entries
+without =+=, the result is undefined.
 
 #+vindex: org-global-properties
 Property values set with the global variable ~org-global-properties~
-- 
2.43.0

Reply via email to