From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Erik Hetzner <egh@e6h.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC] Rewrite `org-entry-properties' using parser
Date: Sun, 03 Aug 2014 14:59:02 -0400 [thread overview]
Message-ID: <87fvhd762x.fsf@andrew.cmu.edu> (raw)
In-Reply-To: 53dbdf3f.a189440a.151e.ffff8468@mx.google.com
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
next prev parent reply other threads:[~2014-08-03 18:59 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 [this message]
2014-08-04 3:45 ` Erik Hetzner
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=87fvhd762x.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=egh@e6h.org \
--cc=emacs-orgmode@gnu.org \
/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).