emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC] Rewrite `org-entry-properties' using parser
Date: Sun, 03 Aug 2014 20:45:44 -0700	[thread overview]
Message-ID: <53df01ea.9126460a.276a.ffff935b@mx.google.com> (raw)
In-Reply-To: <87fvhd762x.fsf@andrew.cmu.edu>

Hi John,

Thanks for the tips! I have been using this:

* Foo
  :PROPERTIES:
  :subject:  Bar; Baz
  :END:

This allows me to search with subject={Bar}, which is very helpful.
But it would be nice if org supported multi-valued properties. Again,
though, I don’t know how hard this would be.

best, Erik

At Sun, 03 Aug 2014 14:59:02 -0400,
John Kitchin wrote:
> 
> 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 
> (read (org-entry-get (point) "SUBJECT"))
> #+END_SRC
> 
> #+RESULTS:
> | quote | (subject1 subject2 subject3) |
> 
> 
> * Second heading 
>   :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 <egh@e6h.org> writes:
> 
> > At Fri, 01 Aug 2014 01:21:47 +0200,
> > Thorsten Jolitz wrote:
> >> 
> >> Hi List,
> >> 
> >> here is my first take of rewriting `org-entry-properties'.
> >> 
> >> 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. 
> >>
> >> […]
> >
> > Hi Thorsten,
> >
> > This doesn’t 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’t know if this is feasible given the
> > current codebase; when I looked into it, it seemed pretty difficult.
> >
> > best, Erik
> 
> -- 
> -----------------------------------
> John Kitchin
> Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu

-- 
Sent from my free software system <http://fsf.org/>.

  reply	other threads:[~2014-08-04  3:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 23:21 [RFC] Rewrite `org-entry-properties' using parser Thorsten Jolitz
2014-08-01 11:44 ` Bastien
2014-08-01 12:44   ` Thorsten Jolitz
2014-08-01 13:28 ` Nicolas Goaziou
2014-08-05 12:52   ` Thorsten Jolitz
2014-08-06  9:59     ` Rasmus
2014-08-06 12:04     ` Nicolas Goaziou
2014-08-21  0:16       ` Thorsten Jolitz
2014-08-01 18:41 ` Erik Hetzner
2014-08-03 18:59   ` John Kitchin
2014-08-04  3:45     ` Erik Hetzner [this message]
2014-08-04  4:07       ` Aaron Ecay
2014-08-04 14:11         ` Erik Hetzner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53df01ea.9126460a.276a.ffff935b@mx.google.com \
    --to=egh@e6h.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).