[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [RFC] Moving "manual.org" into core

From: Yasushi SHOJI
Subject: Re: [O] [RFC] Moving "manual.org" into core
Date: Fri, 26 Jan 2018 17:52:20 +0900

Hi Nicolas,

On Wed, Jan 24, 2018 at 8:28 PM, Nicolas Goaziou <address@hidden> wrote:
> Org Lint is not a formatter. It detects common mistakes or hypothetical
> mistakes in an Org document, e.g., invalid links. In particular, it
> doesn't detect stylistic issues like those discussed above.

Oh, OK.

> It doesn't mean we couldn't run it automatically. However, it also emits
> warnings (see `trust' property) on perfectly valid syntax.
> As a side note, writing an Org formatter is trivial:
>     (when (yes-or-no-p "Really format current buffer ? ")
>       (let ((document (org-element-interpret-data 
> (org-element-parse-buffer))))
>         (erase-buffer)
>         (insert document)
>         (goto-char (point-min))))

You know, this is a mind-blowing.  Org already has everything it needs ;-)

Anyway, I tried the code and it took 2.4 second to reformat the whole document
on my i5-3360M 2.80GHz CPU.  It's a bit long for every commit, i guess.
But, could be installed on received hook, perhaps?

Also, the code converts all lower case "#+title",  "+begin_src" and
other "#+"s to
the UPCASE.  Is this intended?  I thought we are moving away from CAP to lower?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]