emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: Concatenate properties


From: Ihor Radchenko
Subject: Re: [PATCH] Re: Concatenate properties
Date: Thu, 12 May 2022 17:59:37 +0800

Tyler Grinn <tylergrinn@gmail.com> writes:

> OK, what I have now is that if the car of an alist item is a list, exact
> matching will be done for each list item, but if it is a string, it will
> be matched as a regular expression.

Sounds reasonable.

Note that your patch is >15LOC long and you need to sign the copyright
agreement with FSF in order to contribute. See
https://orgmode.org/worg/org-contribute.html#copyright

Some comments on the patch:

> * lisp/org.el (org-property-separators, org-property-get-separator):
> Created.

I'd make the function private: org--property-get-separator. It is not
intended as an API function.

> (org-entry-get, org-entry-get-with-inheritance): Use new
> org-property-get-separator function.

> org-property-separators is a customization option that allows for

Please quote the function name as `org-property-get-separator'.

> +If a property is specified multiple times with a =+=, like
> +=:EXPORT_FILE_NAME+:=, the old behavior was to always combine them
> +with a single space. For the new variable, the car of each item in
> the

Please, use double space "  " to separate sentences. Also, see
doc/Documentation_Standards.org

> +For example, in order to combine =EXPORT_FILE_NAME= properties with a
> +forward slash =/=, one can use
> +
> +#+begin_src emacs-lisp
> +(setq org-use-property-inheritance '("EXPORT_FILE_NAME")
> +      org-property-separators '((("EXPORT_FILE_NAME") . "/")))
> +#+end_src

This example is a bit confusing because it is unclear what you want to
achieve and why you also need to set inheritance.

> +(defcustom org-property-separators nil
> ...
> +  :group 'org-properties
> +  :type '(alist :key-type string :value-type sexp))

This defcustom type does not match what you described in the docstring.
You need something like :type '(alist :key-type (choice string (repeat string)) 
:value-type string)

Best,
Ihor



reply via email to

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