emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: post+orgmodeml@guelker.eu,
	Emmanuel Charpentier <emm.charpentier@free.fr>,
	emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] c-csl : accept relative CSL filenames
Date: Fri, 18 Feb 2022 09:51:32 -0500	[thread overview]
Message-ID: <CAFyQvY2SZ3jMWo2uwVq0bzTkZGog8eyDSEwhdBZVc8ui9K54vQ@mail.gmail.com> (raw)
In-Reply-To: <87h7bgstmz.fsf@nicolasgoaziou.fr>

Hello Nicolas,

> Since you are probably busy, I implemented this on your behalf. The new
> behaviour is in main branch. Thank you.
>

Can this commit[1] be merged into the main branch. Locally on my
machine, I use org built from main and something like this was working
fine:

#+cite_export: csl cite/csl/ieee.csl

Here, "csl cite/csl/ieee.csl" is the csl path relative to the Org file.

But when the same ran on a CI where the stable Org version is used, it
failed with this error:

> Debugger entered--Lisp error: (user-error "Cannot handle relative style file name: "cite/csl/...")
> signal(user-error ("Cannot handle relative style file name: "cite/csl/..."))
> user-error("Cannot handle relative style file name: %S" "cite/csl/ieee.csl")

I believe the behavior I see with this commit on main branch is kind
of obvious and it should prevent this surprise failure for other users
too.

This is my current workaround for the Org stable version:

#+cite_export: csl ieee.csl

# Local Variables:
# org-cite-csl-styles-dir: "./cite/csl/"
# End:

This works for both main and bugfix, but while doing this, I realized
that even string values are not considered safe for this variable.

Looking through git revisions, I found
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=41e67cff0d3bf27ffb57f9a230598b0385341517.

Earlier `:safe t' was added for `org-cite-csl-styles-dir'. Instead can
we have `:safe #'string-or-null-p' as suggested by Glenn Morris in
that commit?

Thanks!




[1]: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c6186be3fd6c09a6deaa4edc1fbabbad0cb986d3


  reply	other threads:[~2022-02-18 14:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 17:56 [PATCH] c-csl : accept relative CSL filenames Emmanuel Charpentier
2021-11-19 12:54 ` Nicolas Goaziou
2021-11-19 18:10   ` M. ‘quintus’ Gülker
2021-12-10  9:20 ` Nicolas Goaziou
2022-02-18 14:51   ` Kaushal Modi [this message]
2022-02-18 18:16     ` Nicolas Goaziou
2022-02-18 19:17       ` Kaushal Modi
  -- strict thread matches above, loose matches on Subject: below --
2021-10-19 18:24 Emmanuel Charpentier
2021-11-03 16:19 ` Nicolas Goaziou
2021-11-04 16:25   ` Emmanuel Charpentier
2021-11-04 22:16     ` Nicolas Goaziou
2021-11-04 22:36       ` Bruce D'Arcus
2021-11-05 12:18         ` Eric S Fraga
2021-11-05  9:38       ` M. ‘quintus’ Gülker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY2SZ3jMWo2uwVq0bzTkZGog8eyDSEwhdBZVc8ui9K54vQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=emm.charpentier@free.fr \
    --cc=mail@nicolasgoaziou.fr \
    --cc=post+orgmodeml@guelker.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).