From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wMM8CLODYF8/JAAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 09:04:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ON2XArODYF/iZwAA1q6Kng (envelope-from ) for ; Tue, 15 Sep 2020 09:04:51 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 753C09404C3 for ; Tue, 15 Sep 2020 09:04:50 +0000 (UTC) Received: from localhost ([::1]:50666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI6tN-0004l8-8f for larch@yhetil.org; Tue, 15 Sep 2020 05:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI6sf-0004ix-Me for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 05:04:05 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:37990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kI6sd-0008VW-Gv for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 05:04:05 -0400 Received: by mail-pl1-x630.google.com with SMTP id c3so1007006plz.5 for ; Tue, 15 Sep 2020 02:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:in-reply-to:message-id:date :mime-version:content-transfer-encoding; bh=GQ2xf/xhh3VOSFTnaD5i0gkiRHflW4E7Panr72m7+CA=; b=RHg/ArmVsNaJM56Jc+Dxv/WhiyPvKWYPVR+0ADoH4LyRukF67S7j9dtXNV0Ze+XJUL 6w3Xiq24VW5k8JblV2bKzTnInXzgVzgzw9mQku9/Va3WbiQvMFGrUrgKYWag20wdZsej zrLfYwc56ciinMwSfnRk+JyysYDr25ToITOBHe5/WxHrnX1SZQsxJfIUzyWV2hjz0uvR +bbkGMQqPhxEnLj9MOjs5oPIbCUOCURxXL6OhRNeJeK3kn67eLbnevMWSpRKJIJC3JnM fRhbOKmlmhsVArXRsAaViw5upW20xoXxrAy0mjhaPIVXEsGd2P1r7lgoMjCeN/Em3yIq 1Vug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=GQ2xf/xhh3VOSFTnaD5i0gkiRHflW4E7Panr72m7+CA=; b=nH44uwfm0O3tVxL9Ztr6HWSuaAJRKEciC5+Ky/zGzsjMyrRmVYjpOv3B7dKSoCzOtb ffumcoHJ30H5hxPq33Fnj2lFB00kKgq9mn1PhkEjHobFIPSEcKAfNAEuQ9KxvXQRVbQO f7g8bayQzVALX1NYmY5ei1ZZPcnsrSGw8jYobSEGxM9Dw/YOup44dI7QclPcwnqMSrPB Fw3Cp8LsIY2BWB4r2PjaVbt6GnxqmhnvVoA5CeLt3ms04V3PQMt55C8/voxhwZqnDYa7 QBMAEH7+PQmqxMN0CXafAjz874aRI3AymH4J4Ip7fHmSXkEC3imz+FTBdOyWZTHDHUZi FQxA== X-Gm-Message-State: AOAM530R51UYQvYtQZRwcal6w9it6Uv84Ms/HXdlzabvtrXw/6lAUFTF lL3gjrai4vf0GLUQEKEs/TTfa95u8HM= X-Google-Smtp-Source: ABdhPJwpjZnVYbkU1Ad9ijqeQJyeFoeKb2OxXQ7NRUElEMz0L/ys2+4WkZzg1VJxlZJaBqscTReeew== X-Received: by 2002:a17:90a:a78d:: with SMTP id f13mr3350711pjq.69.1600160641310; Tue, 15 Sep 2020 02:04:01 -0700 (PDT) Received: from tim-desktop (106-69-73-134.dyn.iinet.net.au. [106.69.73.134]) by smtp.gmail.com with ESMTPSA id il14sm11179463pjb.54.2020.09.15.02.03.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 02:04:00 -0700 (PDT) References: <68dc1ea1-52e8-7d9e-fb2d-bcf08c111eca@intrepidus.pl> User-agent: mu4e 1.5.5; emacs 27.1.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: official orgmode parser In-reply-to: <68dc1ea1-52e8-7d9e-fb2d-bcf08c111eca@intrepidus.pl> Message-ID: <87d02n2yyr.fsf@gmail.com> Date: Tue, 15 Sep 2020 19:03:56 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x630.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=RHg/ArmV; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: rtTHJcsDYUnR Przemys=C5=82aw Kami=C5=84ski writes: > Hello, > > I oftentimes find myself needing to parse org files with some external=20 > tools (to generate reports for customers or sum up clock times for given= =20 > month, etc). Looking through the list > > https://orgmode.org/worg/org-tools/ > > and having tested some of these, I must say they are lacking. The=20 > Haskell ones seem to be done best, but then the compile overhead of=20 > Haskell and difficulty in embedding this into other languages is a drawba= ck. > > I think it might benefit the community when such an official parser=20 > would exist (and maybe could be hooked into org mode directly). > > I was thinking picking some scheme like chicken or guile, which could be= =20 > later easily embedded into C or whatever. Then use that parser in org=20 > mode itself. This way some important part of org mode would be outside=20 > of the small world of elisp. > > This is just an idea, what do you think? :) > The problem with this idea is maintenance. It is also partly why external tools are not terribly reliable/good. Org mode is constantly being enhanced and improved. It is very hard for external tools to keep pace with org-mode development, so they soon get out of date or stop working correctly.=20 Org mode IS an elsip application. This is the main goal. The reason it works so well is because elisp is largely a DSL that focuses on text manipulation and is therefore ideally suited for a text based organiser.=20 This means if you want to implement parsing of org files in any other language, there is a lot of fundamental functionality which willl need to be implemented that is not necessary when using elisp as it is already built-in. Not only that, it is also 'battle hardened' and well tested. The other problem would be in selecting another language which behaves consistently across all the platforms Emacs and org-mode is supported on. As org-mode is a stnadard part of Emacs, it also needs to be implemented in something which is also available on all the platforms emacs is on without needing the user to install additional software.=20 The other issue is that you would need another skill in order to maintain/extend org-mode. In addition to elisp, you will also need to know whatever the parser implementation language is. A third negative is that if the parser was in a different language to elisp, the interface between the rest of org mode (in elisp) and the parser would become an issue. At the moment, there are far fewer barriers as it is all elisp. However, if part of the system is in another language, you are now restricted to whatever defined interface exists. This would likely also have performance issues and overheads associated with translating from one format to another etc. So, in short, the chances of org mode using a parser written in something other than elisp is pretty close to 0. This leaves you with 2 options - 1. Implement another external tool which can parse org-files. As metnioned above, this is a non-trivial task and will likely be difficult to maintain. Probably not the best first choice. 2. Provide some details about your workflow where you believe you need to use external tools to process the org-files. It is very likely there are alternative approaches to give you the result you want, but without the need to do external parsing of org-files. There isn't sufficient details in the examples you mention to provide any specific details. However, I have used org-mode for reporting, invoicing, time tracking, documentation, issue/request tracking, project planning and project management and never needed to parse my org files with an external tool. I have exported the data in different formats which have then been processed by other tools and I have tweaked my setup to support various enterprise/corporate standards or requirements (logos, corporate colours, report formats, etc). Sometimes these tweaks are trivial and others require more extensive effort. Often, others have had to do something the same or similar and have working examples etc. So my recommendation is post some messages to this list with details on what you need to try and do and see what others can suggest. I would keep each post to a single item rather than one long post with multiple requests. From watching this list, I've often see someone post a "How can I ..." question only to get the answer "Oh, that is already built-in, just do .....". Org is a large application with lots of sophisticated power that isn't always obvious from just reading the manual.=20