From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner Subject: Re: [RFC] Rewrite `org-entry-properties' using parser Date: Sun, 03 Aug 2014 20:45:44 -0700 Message-ID: <53df01ea.9126460a.276a.ffff935b@mx.google.com> References: <87tx5xunas.fsf@gmail.com> <53dbdf3f.a189440a.151e.ffff8468@mx.google.com> <87fvhd762x.fsf@andrew.cmu.edu> Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE9Dh-0003v9-W4 for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 23:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XE9Da-0001Jp-16 for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 23:45:57 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:34535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE9DZ-0001Jg-Pd for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 23:45:49 -0400 Received: by mail-pa0-f50.google.com with SMTP id et14so9168969pad.23 for ; Sun, 03 Aug 2014 20:45:48 -0700 (PDT) In-Reply-To: <87fvhd762x.fsf@andrew.cmu.edu> 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: John Kitchin Cc: emacs-orgmode@gnu.org Hi John, Thanks for the tips! I have been using this: * Foo :PROPERTIES: :subject: Bar; Baz :END: This allows me to search with subject=3D{Bar}, which is very helpful. But it would be nice if org supported multi-valued properties. Again, though, I don=E2=80=99t know how hard this would be. best, Erik At Sun, 03 Aug 2014 14:59:02 -0400, John Kitchin wrote: >=20 > I have used the following approaches in the past: >=20 > Lisp lists, and use read later to get them. > * Some heading > :PROPERTIES: > :SUBJECT: '(subject1 subject2 subject3) > :END: >=20 > #+BEGIN_SRC emacs-lisp=20 > (read (org-entry-get (point) "SUBJECT")) > #+END_SRC >=20 > #+RESULTS: > | quote | (subject1 subject2 subject3) | >=20 >=20 > * Second heading=20 > :PROPERTIES: > :SUBJECT: subject1 subject2 subject3 > :END: >=20 > 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. >=20 > #+BEGIN_SRC emacs-lisp > (split-string (org-entry-get (point) "SUBJECT")) > #+END_SRC >=20 > #+RESULTS: > | subject1 | subject2 | subject3 | >=20 > They are both pretty flexible. >=20 > Erik Hetzner writes: >=20 > > 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 > >> > >> [=E2=80=A6] > > > > Hi Thorsten, > > > > This doesn=E2=80=99t directly related to this work, but I have been try= ing 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=E2=80=99t know if this is feasible given the > > current codebase; when I looked into it, it seemed pretty difficult. > > > > best, Erik >=20 > --=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 --=20 Sent from my free software system .