From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: [RFC] Rewrite `org-entry-properties' using parser Date: Sun, 03 Aug 2014 14:59:02 -0400 Message-ID: <87fvhd762x.fsf@andrew.cmu.edu> References: <87tx5xunas.fsf@gmail.com> <53dbdf3f.a189440a.151e.ffff8468@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE103-0002Qb-45 for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 14:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XE0zy-0007au-7O for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 14:59:19 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:41415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE0zy-0007ag-2a for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 14:59:14 -0400 Received: by mail-qg0-f51.google.com with SMTP id a108so8173999qge.10 for ; Sun, 03 Aug 2014 11:59:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Hetzner Cc: emacs-orgmode@gnu.org I have used the following approaches in the past: Lisp lists, and use read later to get them. * Some heading :PROPERTIES: :SUBJECT: '(subject1 subject2 subject3) :END: #+BEGIN_SRC emacs-lisp=20 (read (org-entry-get (point) "SUBJECT")) #+END_SRC #+RESULTS: | quote | (subject1 subject2 subject3) | * Second heading=20 :PROPERTIES: :SUBJECT: subject1 subject2 subject3 :END: delimited strings. You have to split them them yourself later if you are using the properties in code. You can delimit on spaces, commas, etc...= depending on your subjects. #+BEGIN_SRC emacs-lisp (split-string (org-entry-get (point) "SUBJECT")) #+END_SRC #+RESULTS: | subject1 | subject2 | subject3 | They are both pretty flexible. Erik Hetzner writes: > At Fri, 01 Aug 2014 01:21:47 +0200, > Thorsten Jolitz wrote: >>=20 >> Hi List, >>=20 >> here is my first take of rewriting `org-entry-properties'. >>=20 >> The existing function predates the new parser and some Org variables, >> and thus does the parsing and the property classification itself. The >> new version leaves parsing to the parser and property classification >> (mostly) to existing Org variables, resulting in much simpler code.=20 >> >> [=A1=AD] > > Hi Thorsten, > > This doesn=A1=AFt directly related to this work, but I have been trying to > come up with a workflow for using org-mode for research and have had > trouble with the fact that user properties cannot be multi-valued. So > if a user wants to assign subjects to an entry, they need to figure > some way to assign multiple subjects. > > There are workarounds, but it would be helpful if user properties > could be multivalued. I don=A1=AFt know if this is feasible given the > current codebase; when I looked into it, it seemed pretty difficult. > > best, Erik --=20 ----------------------------------- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu