From: Oleh Krehel <ohwoeowho@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Is it possible to keep /all/ the heading properties in one place?
Date: Thu, 25 Feb 2016 20:17:55 +0100 [thread overview]
Message-ID: <87a8mooazg.fsf@gmail.com> (raw)
In-Reply-To: <87h9gw20mi.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 25 Feb 2016 17:52:37 +0100")
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> I do not feel like asking users to write directly the AST for their
> plain text documents, really.
It's not an AST though. It's simply nested lists. Like JSON or XML but
better. And the idea is to both have it automatic and manual. For
example, `org-set-property' would work exactly as it does right now -
interactively. But on the programming level it would use `read',
`delete-sexp', `plist-put' and `prin1'. Isn't it much better to defer
all the heavy lifting to the Elisp reader?
Additionally, LISP readers are readily available outside of Emacs. It
would ease other projects' Org-mode integration. Like mobile apps,
taskwarrior, github, whatever - the people would be able to parse and
modify Org with simply:
import lisp_reader
instead of grokking the full Org property syntax and all if its oddities
and idiosyncrasies. Because the basic Org heading structure is genius
simple. It's all the extra "stuff" than drags it down in terms of
simplicity.
> Parsing an Org document is a solved problem. I do not pretend the
> solution cannot be improved, but at least, it is complete.
Just like reading LISP is a solved problem. And not just in Emacs.
> I'm not sure about your motivations. If they are about reducing visual
> clutter, you can work it out at the display level. I'm pretty sure this
> improvement would be appreciated.
The motivation is to have Org look simpler by virtue of /being/ simpler.
Compare (require 'org-element) and hours of grokking it and looking up
docs to simply:
(defun all-props ()
(save-excursion
(goto-char (point-min))
(let (props)
(while (re-search-forward "^(properties" nil t)
(goto-char (match-beginning 0))
(push (read (current-buffer)) props))
(nreverse props))))
(mapcar (lambda (p)
(assoc 'deadline (cdr p)))
(all-props))
;; =>
;; ((deadline "<2016-02-26 Fri 17:00 +1w>") nil)
next prev parent reply other threads:[~2016-02-25 19:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 10:59 Is it possible to keep /all/ the heading properties in one place? Oleh Krehel
2016-02-25 13:37 ` Nicolas Goaziou
2016-02-25 13:46 ` Oleh Krehel
2016-02-25 14:03 ` Nicolas Goaziou
2016-02-25 14:26 ` Oleh Krehel
2016-02-25 16:52 ` Nicolas Goaziou
2016-02-25 18:21 ` Eric S Fraga
2016-02-26 16:35 ` Rasmus
2016-02-28 9:35 ` Eric S Fraga
2016-02-28 11:32 ` Rasmus
2016-02-28 12:44 ` Eric S Fraga
2016-02-28 16:46 ` Rasmus
2016-02-28 17:05 ` Eric S Fraga
2016-02-25 19:17 ` Oleh Krehel [this message]
2016-02-25 20:16 ` Nicolas Goaziou
2016-02-26 8:18 ` Oleh Krehel
2016-02-28 8:59 ` Nicolas Goaziou
2016-02-28 12:17 ` Oleh Krehel
2016-02-28 16:34 ` Thomas S. Dye
2016-02-29 10:05 ` Nicolas Goaziou
2016-02-29 13:42 ` Thomas S. Dye
2016-02-29 15:00 ` Nicolas Goaziou
2016-02-29 13:53 ` Marcin Borkowski
2016-02-29 15:05 ` Nicolas Goaziou
2016-02-29 17:57 ` Revisiting moving manual to Org (was: Is it possible to keep /all/ the heading properties in one place?) Kyle Meyer
2016-02-29 17:17 ` Is it possible to keep /all/ the heading properties in one place? Achim Gratz
2016-02-29 18:01 ` Thomas S. Dye
2016-02-29 18:47 ` Nicolas Goaziou
2016-02-25 17:47 ` Michael Brand
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8mooazg.fsf@gmail.com \
--to=ohwoeowho@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.