Re: Org-cite follow function for ebib

2021-08-07 Thread Thomas S. Dye
Aloha Joost,

Following some pointers from Eric and Bruce I have this in my
configuration and it seems to work fine, though I haven't had a chance
to use it very much.

  ;; Citations
  (defun tsd/choose-file (candidates)
(interactive)
(org-completing-read "Choose file: " candidates))

  (defun tsd/ebib-follow (datum _)
"Follow citation or citation reference DATUM. When DATUM is a
citation reference, open ebib to the entry referencing the
citation key."
(let* ((key
(if (eq 'citation-reference (org-element-type datum))
(org-element-property :key datum)
  (user-error "Not a citation reference")))
   (files (org-cite-list-bibliography-files))
   (file (if (> (length files) 1)
 (tsd/choose-file files)
   (nth 0 files
  (ebib file key)))
  (require 'oc-biblatex)
  (require 'oc-csl)
  (org-cite-register-processor 'ebib
  :follow #'tsd/ebib-follow)
  (setq org-cite-follow-processor 'ebib)

Also, it was easy to configure ebib to insert citations with the
org-cite syntax.

All the best,
Tom

Joost Kremers  writes:

> On Fri, Aug 06 2021, Thomas S. Dye wrote:
>> Yes, I have set the basic follow processor and org-open-at-point takes
>> me to the .bib file at the entry for the key at point.
>
> Unfortunately, I haven't had the time yet to update Ebib for the new
> functionality. Ebib needs to implement a follow processor so that
> `org-open-at-point` takes you to the entry in Ebib.
>
>> Surprisingly (to me), M-x ebib sometimes displays the entry for the key
>> at point, too.
>
> That's because when you start Ebib with `M-x ebib` (or a key bound to that
> function, of course), it checks to see if point is at something that looks 
> like
> a key and tries to find a corresponding entry in the current database. That
> functionality is not customisable and not very well implemented, so it doesn't
> always work. (Also, if point is at the `cite` prefix, it doesn't work.)


--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Org-cite follow function for ebib

2021-08-07 Thread Joost Kremers


On Fri, Aug 06 2021, Thomas S. Dye wrote:
> Yes, I have set the basic follow processor and org-open-at-point takes
> me to the .bib file at the entry for the key at point.

Unfortunately, I haven't had the time yet to update Ebib for the new
functionality. Ebib needs to implement a follow processor so that
`org-open-at-point` takes you to the entry in Ebib.

> Surprisingly (to me), M-x ebib sometimes displays the entry for the key
> at point, too.

That's because when you start Ebib with `M-x ebib` (or a key bound to that
function, of course), it checks to see if point is at something that looks like
a key and tries to find a corresponding entry in the current database. That
functionality is not customisable and not very well implemented, so it doesn't
always work. (Also, if point is at the `cite` prefix, it doesn't work.)

-- 
Joost Kremers
Life has its moments



Re: citations: rx problems with emacs-26.3

2021-08-07 Thread Nicolas Goaziou
Hello,

Maxim Nikulin  writes:

> I think citation support is a great feature. (Sorry, I do not work
> with references now, so I can tell nothing concerning implementation
> for org.)
>
> It seems, rx e.g. in emacs-26.3 does not support all features used in
> oc.el and oc-csl.el. Loading an org file using git master, I get
> a warning
>
>> Eager macro-expansion failure: (error "rx form ‘regexp’ requires args 
>> satisfying ‘stringp’")
>
> It looks like (rx (regexp ...)) require namely literal, variables are
> not supported yet. In additional (rx (literal ...)) is not supported
> as well.
>
>> Eager macro-expansion failure: (error "Unknown rx form ‘literal’")
>
> In a couple of places `rx-to-string' likely could be used instead of
> just `rx'. I have no idea yet what could be done with (pcase-let* ((rx 
> ...))) in `org-cite-adjust-note'.
>
>> diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el

Thanks. Could you send the patch again with a proper commit message,
using git format-patch?

Regards,
-- 
Nicolas Goaziou



Re: bug processing non emacs-lisp blocks

2021-08-07 Thread Nicolas Goaziou
Hello,

dmg  writes:

> org-babel-load-file will try to tangle any source block that contains
> the substring emacs-lisp or elisp in their language.
>
> For example, the following code block will be tangled:
>
> #+begin_src emacs-lispDONOT
> (use-package "org-sidebar")
> #+end_src
>
> the following patch fixes that problem. The Regular expression should
> be more stringent, so it does match exactly the string and not a
> substring.

Thank you. I applied an equivalent patch.

Regards,
-- 
Nicolas Goaziou



Re: Bug: invalid example for org-export-define-backend's :menu-entry argument [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/)]

2021-08-07 Thread Nicolas Goaziou
Hello,

Zachary Kanfer  writes:

> Ox.el contains the function org-export-define-backend. One of its
> keyword arguments is :menu-entry. The examples given include
> (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox.el#L1214)
>
> '(?l "Export to LaTeX"
>  (?p "As PDF file" org-latex-export-to-pdf)
>  (?o "As PDF file and open"
>  (lambda (a s v b)
>(if a (org-latex-export-to-pdf t s v b)
>  (org-open-file
>   (org-latex-export-to-pdf nil s v b))
>
> This is invalid for two reasons:
>
> 1. The ?p and ?o elements should be wrapped in an extra layer of
> parentheses. For example, the ?p element should be ((?p "As PDF file"
> org-latex-export-to-pdf)).
> 2. There is an extra parenthesis at the end of the block.

Fixed. Thank you.

Regards,
-- 
Nicolas Goaziou



Re: [PATCH] ox.el: fix spanish translation for `footnotes'

2021-08-07 Thread Nicolas Goaziou
Hello,

Juan Manuel Macías  writes:

> The Spanish translation for "Footnotes" in `org-export-dictionary' is
> "Nota al pie de página" ("Nota"[="Note"], in the singular form). I think
> it would be more correct "Notas", in the plural form. Attached a small
> patch.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou



Re: org-cite and pandoc

2021-08-07 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> By the way, ox-md also fails if there is a #+bibliography
> line.  Removing it allows for the export.  Very strange.

Would you have an ECM? I cannot reproduce it.

Regards,
-- 
Nicolas Goaziou



Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-07 Thread Sébastien Rey-Coyrehourcq

Hi there,

Thanks for this opportunity,

I also made recent research on this 
(https://orgmode.org/list/2b19797780df800a5feafd47836b83e5426752e1.ca...@univ-rouen.fr/), 
and Bastien update the  corresponding org parser page :


https://orgmode.org/worg/org-tools/

Best regards,

Le 03/08/2021 à 11:14, Karl Voit a écrit :

Hi,

I'm collecting information on basic Org mode support in tools that
are not Emacs.

I already have: GitHub, GitLab (exactly like GitHub), OrgModeWeb,
Orgzly, Orgro, Emacs, vim-orgmode.

What I need is information on much more tools.

I have set up a syntax checking file on
https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
which also contains my current compatibility table for the most
basic set that makes sense as a Markdown-pendant outside of Emacs
according to my subjective judgement on Org mode at the bottom.

My focus is on tools that - at least - offer text formatting syntax
highlighting for *bold* /italic/ and so forth. The rest could be
"works as text but has no special support for outlining and more".

The goals is to emphasize that there are much more tools that allow
for viewing and/or editing data in Org mode syntax.

Since I don't have an iPhone, iOS-based tools supporting Org mode
syntax is very much appreciated.

Please do hand in more lines for the table either here, via email or
as a GitHub pull request.

Thank you!





Re: [ANN] icsorg - node script to import events into org

2021-08-07 Thread Eric S Fraga
This looks very nice.  It would be good if a link and short description
(e.g. your email contents) were added to the page you cite on Worg.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-607-g185706
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: ConTeXt exporter for Org Mode

2021-08-07 Thread Axel Kielhorn



> Am 06.08.2021 um 17:04 schrieb Jason Ross :
> 
> > - I couldn’t find a way to change the paper size.
> >There is
> >  ;; US letter paper
> >  ("paper-letter" . "\\setuppapersize[letter]")
> >in the code, but it doesn’t appear in the output, and I prefer the 
> > a-sizes (especially 2 x a5 on a4)
> 
> To set the paper size in a particular document, add the following to the
> document header:
> 
> #+CONTEXT_HEADER: \setuppapersize[A4]


Thanks for the answer.

I would suggest going in a different direction.

I’ll post a suggestion on GitHub once I figured out what I want to suggest.

Greetings
Axel