Re: How to debug a CSL problem

2022-06-06 Thread Alan Tyree
Hi Andras,
I will do that. Thanks to all of you for your help and for the great
system. I cannot believe that I once wrote using word processors!!
Cheers,
Alan

On Mon, 6 Jun 2022 at 15:34, András Simonyi 
wrote:

> Dear All,
>
> On Mon, 6 Jun 2022 at 03:45, Alan Tyree  wrote:
>
> > A short random test shows that the export chokes when there is a single
> name for an author. Again an example:
> > author = {{Wolfsberg Group}} works fine;
> > author = {{Wolfsberg}} chokes.
>
> Alan, could you open an issue in the citeproc-el issue tracker about
> this? Definitely looks like a citeproc-el bug and should be rather
> easy to fix. Thanks in advance!
>
> best wishes,
> András
>


-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan


Re: How to debug a CSL problem

2022-06-05 Thread András Simonyi
Dear All,

On Mon, 6 Jun 2022 at 03:45, Alan Tyree  wrote:

> A short random test shows that the export chokes when there is a single name 
> for an author. Again an example:
> author = {{Wolfsberg Group}} works fine;
> author = {{Wolfsberg}} chokes.

Alan, could you open an issue in the citeproc-el issue tracker about
this? Definitely looks like a citeproc-el bug and should be rather
easy to fix. Thanks in advance!

best wishes,
András



Re: How to debug a CSL problem

2022-06-05 Thread Alan Tyree
Thanks, Ihor. That found it.

The bibtex entry had:
author = {BIS},

Change to:
author = {{Bank for International Settlements}},

and it all works a treat.

A short random test shows that the export chokes when there is a single
name for an author. Again an example:
author = {{Wolfsberg Group}} works fine;
author = {{Wolfsberg}} chokes.

Thanks to you and to Bruce for the help.

Cheers,
Alan




On Mon, 6 Jun 2022 at 11:03, Ihor Radchenko  wrote:

> Alan Tyree  writes:
>
> > I guess the bad news is that the csl file validates. I also should have
> > mentioned that everything parses properly with pandoc, so I guess it is a
> > cireproc-el glitch.
> >
> > From the brief error report, it must just be choking  on a specific
> bibtex
> > entry, so it would still be helpful to be able to find it.
>
> Run M-x toggle-debug-on-error and then try to trigger the error. Then,
> you will be able to see the whole backtrace and potentially find out the
> problematic BiBTeX entry. If backtrace does not help, you may need to
> use M-x debug-on-entry and use debugger (See 19.1 The Lisp Debugger in
> Elisp manual).
>
> Best,
> Ihor
>


-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan


Re: How to debug a CSL problem

2022-06-05 Thread Ihor Radchenko
Alan Tyree  writes:

> I guess the bad news is that the csl file validates. I also should have
> mentioned that everything parses properly with pandoc, so I guess it is a
> cireproc-el glitch.
>
> From the brief error report, it must just be choking  on a specific bibtex
> entry, so it would still be helpful to be able to find it.

Run M-x toggle-debug-on-error and then try to trigger the error. Then,
you will be able to see the whole backtrace and potentially find out the
problematic BiBTeX entry. If backtrace does not help, you may need to
use M-x debug-on-entry and use debugger (See 19.1 The Lisp Debugger in
Elisp manual).

Best,
Ihor



Re: How to debug a CSL problem

2022-06-05 Thread Alan Tyree
Thanks for the prompt reply, Bruce.

I guess the bad news is that the csl file validates. I also should have
mentioned that everything parses properly with pandoc, so I guess it is a
cireproc-el glitch.

>From the brief error report, it must just be choking  on a specific bibtex
entry, so it would still be helpful to be able to find it.

Cheers,
Alan

On Mon, 6 Jun 2022 at 09:15, Bruce D'Arcus  wrote:

> On Sun, Jun 5, 2022 at 6:48 PM Alan Tyree  wrote:
>
> > I need some help with a debugging problem:
> >
> > I'm using
> >
> > #+cite_export: csl ~/Templates/csl/AGLC-intext.csl
> >
> > where AGLC-intext.csl is a custom csl file.
>
> I'm not sure if citeproc-el checks validity before running, but have
> you confirmed it's a valid style?
>
> This is the easiest way to do that, if you don't have a relax ng
> validator setup, with the schemas and such.
>
> https://validator.citationstyles.org/
>
> If yes, and it is valid, I would report it to the citeproc-el issue
> tracker.
>
> If your bib file(s) work fine with other CSL styles, it seems likely
> it's something with the style or the style and citeproc-el.
>
> Bruce
>


-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan


Re: How to debug a CSL problem

2022-06-05 Thread Bruce D'Arcus
On Sun, Jun 5, 2022 at 6:48 PM Alan Tyree  wrote:

> I need some help with a debugging problem:
>
> I'm using
>
> #+cite_export: csl ~/Templates/csl/AGLC-intext.csl
>
> where AGLC-intext.csl is a custom csl file.

I'm not sure if citeproc-el checks validity before running, but have
you confirmed it's a valid style?

This is the easiest way to do that, if you don't have a relax ng
validator setup, with the schemas and such.

https://validator.citationstyles.org/

If yes, and it is valid, I would report it to the citeproc-el issue tracker.

If your bib file(s) work fine with other CSL styles, it seems likely
it's something with the style or the style and citeproc-el.

Bruce



How to debug a CSL problem

2022-06-05 Thread Alan Tyree
I need some help with a debugging problem:

I'm using

#+cite_export: csl ~/Templates/csl/AGLC-intext.csl

where AGLC-intext.csl is a custom csl file.

Exporting to html gives this error in *Messages*:

citeproc-s-slice-by-matches: Wrong type argument: stringp, nil

The error does not occur with different csl files.

Is there some way other than bisection that I can find the citation that is
causing the error?

Emacs 27.1 on Debian stable.
Org version 9.5.4 from Melpa-stable

Thanks for any tips,

Alan

-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan