[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?
--
yashi
- Re: [O] [RFC] Moving "manual.org" into core, (continued)
- Re: [O] [RFC] Moving "manual.org" into core, Bastien Guerry, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Bastien Guerry, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Nicolas Goaziou, 2018/01/22
- [O] org-adapt-indentation 'content (was Re: [RFC] Moving "manual.org" into core), Christian Moe, 2018/01/23
- Re: [O] [RFC] Moving "manual.org" into core, Achim Gratz, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Thomas S. Dye, 2018/01/23
- Re: [O] [RFC] Moving "manual.org" into core, Rasmus, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Kaushal Modi, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Yasushi SHOJI, 2018/01/24
- Re: [O] [RFC] Moving "manual.org" into core, Nicolas Goaziou, 2018/01/24
- Re: [O] [RFC] Moving "manual.org" into core,
Yasushi SHOJI <=
- Re: [O] [RFC] Moving "manual.org" into core, Nicolas Goaziou, 2018/01/26
- Re: [O] [RFC] Moving "manual.org" into core, Yasushi SHOJI, 2018/01/27
- Re: [O] [RFC] Moving "manual.org" into core, Nicolas Goaziou, 2018/01/28
- Re: [O] [RFC] Moving "manual.org" into core, Yasushi SHOJI, 2018/01/28
- Re: [O] [RFC] Moving "manual.org" into core, Nicolas Goaziou, 2018/01/29
- Re: [O] [RFC] Moving "manual.org" into core, Thomas S. Dye, 2018/01/22
- Re: [O] [RFC] Moving "manual.org" into core, Christian Moe, 2018/01/23
- Re: [O] [RFC] Moving "manual.org" into core, Samuel Wales, 2018/01/23