Re: [PATCH] org-test: Create a collaborative test set for Org buffer parser

2021-12-14 Thread Max Nikulin

On 11/12/2021 21:39, Ihor Radchenko wrote:


The attached patch is an attempt to create something like shared repo
for Org element parser tests.


"[PATCH]" prefix in the subject might be a reason why you message 
received less attention than it should.



The test set is essentially a series of .org files alongside .el files
containing normalised output of `org-element-parse-buffer'. (see the
patch)


I think, the set should contain hundreds of tests to be helpful, thus 2 
files per test will likely be inconvenient since most of samples will be 
short. I suggest to group test input and results into large files. Such 
tests should be augmented by some metadata: keywords (labels, tags). 
E.g. besides heading


- sample: "* Simple Heading"
  keywords: heading

it should be possible to filter related cases with similar markup

- sample: "*Bold* emphasis"
  keywords: emphasis, heading
  description: Despite line is started from a star,
there is no space after it, so it is not a heading.

- sample: " * Unordered list item"
  keywords: list, heading
  description: Due to leading space it is a list item,
not a heading.

- sample: "*"
  keywords: text, heading
  description: Not a heading since there is no space after the star.

I omitted test IDs above.

Version of Org and test set should be included into metadata for the 
whole suite.


Since partial compliance is assumed, format of test results should be 
declared as well to be able to publish overview or comparison.


Are properties like :begin and :end mandatory for reference results of 
parsing? They make structures more verbose and harder to read. Often it 
is enough to compare content and similar properties.



Any comments or suggestions?
I am particularly looking for thoughts about licensing and possible
distribution of the test set in separate repository.


Since these tests will unlikely become a part of some software, I do not 
think that GPL may be an obstacle for any project. Requirement of signed 
consent will likely prevent contributing of new cases from some developers.





[org-cite] pandoc adds initial read/write support

2021-12-14 Thread Bruce D'Arcus
John MacFarlane merged initial support for org-cite to the pandoc org
reader and writer.

Only available in master ATM, but could use real-world testing,
including of the org-ref -> org-cite conversion, which you can get by
using org as both input and output format.

Bruce



Re: [PATCH] org-test: Create a collaborative test set for Org buffer parser

2021-12-14 Thread Tim Cross


Max Nikulin  writes:

> On 11/12/2021 21:39, Ihor Radchenko wrote:
>
> Since these tests will unlikely become a part of some software, I do not think
> that GPL may be an obstacle for any project. Requirement of signed consent 
> will
> likely prevent contributing of new cases from some developers.

I agree. The test org files are input data rather than code and I don't
think they fall under the copyright restrictions (or the code
contribution guidelines). They probably don't even need to be GPL'd -
possibly a CC license would be sufficient.

As to whether they should be part of the org-mode repository or in their
own repository, I'm not sure. It would be convenient to have them int he
org-mode repository as I expect they will become part of the testing
framework and only having to checkout one repository would be useful. On
the other hand, I guess there could be cases where people want to just
checkout these samples to use to validate their own library/parser etc.
I tend towards putting them in the org-mode repository for simplicity.





next-error for agenda searches

2021-12-14 Thread Samuel Wales
if you search for a regexp in a single org buffer, you can do
next-error to go to the next search.

if you search in agenda, there is a mode where the match will show up
in the ohter window.  i find this inconvenient.

there is no next-error to go to the next match for agenda searches.
or am i missing this feature someplace?  seems strange not to?

such a thing would be consistent with c-c / / in an org buffer,
grep-mode, occur-mode, compilation-shell-minor-mode.  thanks!

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com