[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: official orgmode parser
From: |
tomas |
Subject: |
Re: official orgmode parser |
Date: |
Wed, 16 Sep 2020 14:20:30 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Sep 16, 2020 at 02:09:42PM +0200, Przemysław Kamiński wrote:
[...]
> So I looked at (pp (org-element-parse-buffer)) however it does print
> out recursive stuff which other schemes have trouble parsing.
>
> My code looks more or less like this:
>
> (defun org-parse (f)
> (with-temp-buffer
> (find-file f)
> (let* ((parsed (org-element-parse-buffer))
> (all (append org-element-all-elements org-element-all-objects))
> (mapped (org-element-map parsed all
> (lambda (item)
> (strip-parent item)))))
> (pp mapped))))
Actually I'd tend to not modify the result, but to walk
it.
See `pcase' for a powerful pattern matcher which might
help you there.
Cheers
- t
signature.asc
Description: Digital signature
- Re: official orgmode parser, (continued)
- Re: official orgmode parser, Gerry Agbobada, 2020/09/15
- Re: official orgmode parser, Tim Cross, 2020/09/15
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/15
- Re: official orgmode parser, Russell Adams, 2020/09/15
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/15
- Re: official orgmode parser, tomas, 2020/09/15
- Re: official orgmode parser, Diego Zamboni, 2020/09/15
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/16
- Re: official orgmode parser,
tomas <=
- Re: official orgmode parser, Ihor Radchenko, 2020/09/16
- Re: official orgmode parser, Tim Cross, 2020/09/15
- Re: official orgmode parser, Marcin Borkowski, 2020/09/16
- Re: official orgmode parser, Ihor Radchenko, 2020/09/16
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/16
- Re: official orgmode parser, Ihor Radchenko, 2020/09/16
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/16
- Re: official orgmode parser, Ihor Radchenko, 2020/09/16
- Re: official orgmode parser, Przemysław Kamiński, 2020/09/17
Re: official orgmode parser, Bastien, 2020/09/23