emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-lint and #+call lines
@ 2015-04-26 23:03 Thomas S. Dye
  2015-04-27  6:54 ` Nicolas Goaziou
  2015-05-28 12:45 ` Org-lint (was: Org-lint and #+call lines) Karl Voit
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-26 23:03 UTC (permalink / raw)
  To: Org-mode

Aloha all,

Org-lint is a big help picking up an old project.  Thanks Nicolas.

The original patch sent to the ML ran through my old org mode file and
found lots of potential problems.

So, I decided to track wip-lint.  Now, the linting stops with this
error:

,--------------------------------------------------------
| Org linting process starting...                        
| let: Wrong type argument: listp, ":results replace org"
`--------------------------------------------------------

The *Org Lint* buffer is empty, except for the header line.

Here is the offending line in the Org mode file:

,----------------------------------------------
| #+call: r-duplicate-ids() :results replace org
`----------------------------------------------

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-26 23:03 Org-lint and #+call lines Thomas S. Dye
@ 2015-04-27  6:54 ` Nicolas Goaziou
  2015-04-27  7:23   ` Thomas S. Dye
  2015-05-28 12:45 ` Org-lint (was: Org-lint and #+call lines) Karl Voit
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2015-04-27  6:54 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hello,

tsd@tsdye.com (Thomas S. Dye) writes:

> So, I decided to track wip-lint.  Now, the linting stops with this
> error:
>
> ,--------------------------------------------------------
> | Org linting process starting...                        
> | let: Wrong type argument: listp, ":results replace org"
> `--------------------------------------------------------
>
> The *Org Lint* buffer is empty, except for the header line.
>
> Here is the offending line in the Org mode file:
>
> ,----------------------------------------------
> | #+call: r-duplicate-ids() :results replace org
> `----------------------------------------------

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-27  6:54 ` Nicolas Goaziou
@ 2015-04-27  7:23   ` Thomas S. Dye
  2015-04-27  7:39     ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-27  7:23 UTC (permalink / raw)
  To: Org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> So, I decided to track wip-lint.  Now, the linting stops with this
>> error:
>>
>> ,--------------------------------------------------------
>> | Org linting process starting...                        
>> | let: Wrong type argument: listp, ":results replace org"
>> `--------------------------------------------------------
>>
>> The *Org Lint* buffer is empty, except for the header line.
>>
>> Here is the offending line in the Org mode file:
>>
>> ,----------------------------------------------
>> | #+call: r-duplicate-ids() :results replace org
>> `----------------------------------------------
>
> Fixed. Thank you.

Thanks.  This is really helpful.

Is org-lint supposed to catch :results output graphics?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-27  7:23   ` Thomas S. Dye
@ 2015-04-27  7:39     ` Nicolas Goaziou
  2015-04-27 11:38       ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2015-04-27  7:39 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

> Is org-lint supposed to catch :results output graphics?

It catches

:results output graphic

Is it

  :results output graphics


Regards,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-27  7:39     ` Nicolas Goaziou
@ 2015-04-27 11:38       ` Nicolas Goaziou
  2015-04-27 15:25         ` Thomas S. Dye
  2015-04-28  5:44         ` Thomas S. Dye
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2015-04-27 11:38 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> Is org-lint supposed to catch :results output graphics?
>
> It catches
>
> :results output graphic
>
> Is it
>
>   :results output graphics

Nevermind. 

I realized allowed values and combinations are already known to Babel,
so I improved the checker.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-27 11:38       ` Nicolas Goaziou
@ 2015-04-27 15:25         ` Thomas S. Dye
  2015-04-28  5:44         ` Thomas S. Dye
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-27 15:25 UTC (permalink / raw)
  To: Org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I realized allowed values and combinations are already known to Babel,
> so I improved the checker.

Looks good.  Org-lint raises many more warnings now.

Thanks,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-27 11:38       ` Nicolas Goaziou
  2015-04-27 15:25         ` Thomas S. Dye
@ 2015-04-28  5:44         ` Thomas S. Dye
  2015-04-28  7:57           ` Nicolas Goaziou
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-28  5:44 UTC (permalink / raw)
  To: Org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>>> Is org-lint supposed to catch :results output graphics?
>>
>> It catches
>>
>> :results output graphic
>>
>> Is it
>>
>>   :results output graphics
>
> Nevermind. 
>
> I realized allowed values and combinations are already known to Babel,
> so I improved the checker.

Org-lint gives this warning:

    ,----------------------------------------------------------
    | 31 low   Unknown value "no-export" for header ":eval"
    `----------------------------------------------------------

But, ob-core.el appears to know the value:

,--------------------------------------------------------------------------------
| ob-core.el:         (,eval-no-export (and ,export (or (equal ,eval "no-export")
`--------------------------------------------------------------------------------

Is this a false positive?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-28  5:44         ` Thomas S. Dye
@ 2015-04-28  7:57           ` Nicolas Goaziou
  2015-04-28 20:04             ` Thomas S. Dye
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2015-04-28  7:57 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

tsd@tsdye.com (Thomas S. Dye) writes:

> Org-lint gives this warning:
>
>     ,----------------------------------------------------------
>     | 31 low   Unknown value "no-export" for header ":eval"
>     `----------------------------------------------------------
>
> But, ob-core.el appears to know the value:
>
> ,--------------------------------------------------------------------------------
> | ob-core.el:         (,eval-no-export (and ,export (or (equal ,eval "no-export")
> `--------------------------------------------------------------------------------
>
> Is this a false positive?

Yes, this was an omission in "ob-core.el". I fixed it in master. You'll
need to rebase wip-lint against it.

Thank you.

Regards,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-28  7:57           ` Nicolas Goaziou
@ 2015-04-28 20:04             ` Thomas S. Dye
  2015-04-28 20:18               ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-28 20:04 UTC (permalink / raw)
  To: Org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Org-lint gives this warning:
>>
>>     ,----------------------------------------------------------
>>     | 31 low   Unknown value "no-export" for header ":eval"
>>     `----------------------------------------------------------
>>
>> But, ob-core.el appears to know the value:
>>
>> ,--------------------------------------------------------------------------------
>> | ob-core.el:         (,eval-no-export (and ,export (or (equal ,eval "no-export")
>> `--------------------------------------------------------------------------------
>>
>> Is this a false positive?
>
> Yes, this was an omission in "ob-core.el". I fixed it in master. You'll
> need to rebase wip-lint against it.

Another false positive, I think:

  1360 low   Unknown value "no" for header ":eval"

Also, after I run org-lint I sometimes lose the cursor.  The frame
around the *Org Lint* window flickers a bit, as if *Org Lint* is being
refreshed over and over.  Apologies in advance for such a vague report.
I'm not sure where to start debugging something like this.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint and #+call lines
  2015-04-28 20:04             ` Thomas S. Dye
@ 2015-04-28 20:18               ` Nicolas Goaziou
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2015-04-28 20:18 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

tsd@tsdye.com (Thomas S. Dye) writes:

> Another false positive, I think:
>
>   1360 low   Unknown value "no" for header ":eval"

Fixed too, and also cherry-picked from wip-lint.

> Also, after I run org-lint I sometimes lose the cursor.  The frame
> around the *Org Lint* window flickers a bit, as if *Org Lint* is being
> refreshed over and over.

It should only refresh if you press `g' in lint buffer.

> Apologies in advance for such a vague report. I'm not sure where to
> start debugging something like this.

You can debug `org-lint--generate-reports'. It is the function
responsible for refreshing the buffer. It should only be called once
after "M-x org-lint" and every time *Org Lint* buffer is refreshed
(i.e., with `g').


Regards,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Org-lint (was: Org-lint and #+call lines)
  2015-04-26 23:03 Org-lint and #+call lines Thomas S. Dye
  2015-04-27  6:54 ` Nicolas Goaziou
@ 2015-05-28 12:45 ` Karl Voit
  2015-05-28 17:28   ` Org-lint Nicolas Goaziou
  1 sibling, 1 reply; 12+ messages in thread
From: Karl Voit @ 2015-05-28 12:45 UTC (permalink / raw)
  To: emacs-orgmode

* Thomas S. Dye <tsd@tsdye.com> wrote:
>
> Org-lint is a big help picking up an old project.  Thanks Nicolas.

Hey, I missed org-lint so far.

However, I was desperately asking for an Org-mode syntax validation
multiple times for a long time.[1]

Who do I have to contact, when I've got ideas of checks that
corrupted my Org-mode files? 

For example, I have the issue that once upon a Org-mode-Git-
checkout, the property drawers got corrupted over time: duplicate
LOGBOOKs and order of LOGBOOK and PROPERTIES is switched. I noticed
it, when many drawers were already broken. I still find them in my
files from time to time :-(

Another one would be duplicate IDs.

[1] http://thread.gmane.org/gmane.emacs.orgmode/84494/focus=84864
    and others

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org-lint
  2015-05-28 12:45 ` Org-lint (was: Org-lint and #+call lines) Karl Voit
@ 2015-05-28 17:28   ` Nicolas Goaziou
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2015-05-28 17:28 UTC (permalink / raw)
  To: Karl Voit; +Cc: Karl Voit, emacs-orgmode

Hello,

Karl Voit <devnull@Karl-Voit.at> writes:

> Who do I have to contact, when I've got ideas of checks that
> corrupted my Org-mode files?

You can implement checks and send them to the ML. You can also suggest
them on the ML.

> For example, I have the issue that once upon a Org-mode-Git-
> checkout, the property drawers got corrupted over time: duplicate
> LOGBOOKs

Duplicate LOGBOOK drawers is not an error. You could, for example, use
the second one as an archive. More generally, you can have multiple
drawers with the same name in a given entry.

> and order of LOGBOOK and PROPERTIES is switched. I noticed
> it, when many drawers were already broken. I still find them in my
> files from time to time :-(

Org Lint already looks for PROPERTIES drawers not at their expected
location.

> Another one would be duplicate IDs.

Org Lint checks this already, but it proceed document-wise. It will not
find duplicate ID across files.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-28 17:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 23:03 Org-lint and #+call lines Thomas S. Dye
2015-04-27  6:54 ` Nicolas Goaziou
2015-04-27  7:23   ` Thomas S. Dye
2015-04-27  7:39     ` Nicolas Goaziou
2015-04-27 11:38       ` Nicolas Goaziou
2015-04-27 15:25         ` Thomas S. Dye
2015-04-28  5:44         ` Thomas S. Dye
2015-04-28  7:57           ` Nicolas Goaziou
2015-04-28 20:04             ` Thomas S. Dye
2015-04-28 20:18               ` Nicolas Goaziou
2015-05-28 12:45 ` Org-lint (was: Org-lint and #+call lines) Karl Voit
2015-05-28 17:28   ` Org-lint Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).