Re: [O] "File mode specification error: (user-error Empty table - created default table)"

2019-03-22 Thread Nicolas Goaziou
Hello,

William Denton  writes:

> I've updated Org from source a couple of times in the last couple of days and 
> this started happening:  when I restart Emacs, I get an error saying "File 
> mode 
> specification error: (user-error Empty table - created default table)" and 
> this 
> happens:  an empty table is added!  Here's an example:

You may want to start Emacs with --debug-on-init flag, and report the
backtrace here.

Regards,

-- 
Nicolas Goaziou



Re: [O] Use CHTML mathjax backend by default

2019-03-22 Thread Carlos Pita
Also, they said there:

> I think you'll find that CommonHTML is faster at rendering the math

So:

1. Recommended for newer mathjax versions.
2. Fixed my problem with web fonts.
3. Faster.

It seems like a Pareto improvement to me.



Re: [O] Use CHTML mathjax backend by default

2019-03-22 Thread Carlos Pita
TL;DR about the specific problem I was having with HTML-CSS:

> both HTML-CSS and CommonHTML use web fonts. But CommonHTML doesn't try to 
> detect their presence, while HTML-CSS does, and it is that detection that is 
> probably going wrong for some reason (I did say it was fragile). HTML-CSS 
> needed to wait for the fonts to arrive because (in the old days before 
> browsers were more consistent with each other), MathJax had to measure the 
> actual displayed subexpressions in order to determine their size, and that 
> meant the font had to be the right one. CommonHTML doesn't have to do that 
> because modern browsers are more consistent about their layout (thanks to 
> better standards and better adherence to them).



[O] Use CHTML mathjax backend by default

2019-03-22 Thread Carlos Pita
Hi all,

I was having some problems with the mathjax HTML-CSS backend and I
found out that the CHTML backend is currently the preferred one. See
details at https://github.com/mathjax/MathJax/issues/2132 and
http://docs.mathjax.org/en/latest/output.html. Changing the backend to
CHTML fixed my issue.

Wouldn't be time to update the default mathjax version to 2.7.1 (the
current one) and setting the backend to CHTML?

Best regards
--
Carlos



Re: [O] "File mode specification error: (user-error Empty table - created default table)"

2019-03-22 Thread John Kitchin
I saw something like this recently in a little different context. In the
output of a babel block I saw the empty table get inserted around the
results. It only happened in one file, and I didn't notice if there was a
user-error.  I can't reproduce it at the moment, and didn't spend any time
tracking it down. If I see it again I will see if I can track anything
down.

I am using Org mode version 9.2.1 (9.2.1-23-g126a37-elpaplus @
/Users/jkitchin/vc/jkitchin-github/scimax/elpa/org-plus-contrib-20190218/)

John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Thu, Mar 21, 2019 at 10:47 PM William Denton  wrote:

> I've updated Org from source a couple of times in the last couple of days
> and
> this started happening:  when I restart Emacs, I get an error saying "File
> mode
> specification error: (user-error Empty table - created default table)" and
> this
> happens:  an empty table is added!  Here's an example:
>
> #- begin
>
> #+NAME: count
> #+BEGIN_SRC sql :engine mysql :dbuser user :database db_name :exports
> results
> SELECT count(*) AS foo FROM bar
> #+END_SRC
>
> |   |   |   |   |   |
> |---+---+---+---+---|
> |   |   |   |   |   |
> #+RESULTS: count
> | foo   |
> |---|
> |  2782 |
>
> #- end
>
> Anyone else seeing this?
>
> Bill
> --
> William Denton :: Toronto, Canada   ---   Listening to Art:
> https://listeningtoart.org/
> https://www.miskatonic.org/ ---   GHG.EARTH: https://ghg.earth/
> Caveat lector.  ---   STAPLR: http://staplr.org/
>
>


Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Eric S Fraga
On Friday, 22 Mar 2019 at 13:06, Joost Kremers wrote:
> I'm pretty sure the regex is created automatically. I only needed to
> do this:

Yes, I was confused...  

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Eric S Fraga
On Friday, 22 Mar 2019 at 11:29, Eric S Fraga wrote:
> I am going down a rabbit hole here...

And came back out again.  Ignore this whole thread of self-indulgent
posts!  ~org-link-set-parameters~ does the job for me after
all.  Problem was that the regex does get updated but doesn't affect any
open buffers...  My fault.

Thanks and sorry for the noise.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> I am going down a rabbit hole here...
>
> Short question: how can I add a new link type to org?  It used to be
> that we would use ~org-add-link-type~ but this is
> deprecated.  Fine.  The documentation points to
> ~org-link-set-parameters~ instead but this can only set the parameters
> for known links.  Known links seem to be defined by a complex regex in
> ~org-link-types-re~.
>
> What is the replacement for ~org-add-link-type~ in the latest version of
> org, if any?  Or do I have to both add to the regex and set link
> parameters separately?

>From master, you can inspect any library prefixed with "ol-". For
example, "ol-info.el" uses this:

(org-link-set-parameters "info"
 :follow #'org-info-open
 :export #'org-info-export
 :store #'org-info-store-link)

and defines each function thereafter.

Welcome to the rabbit ol ;)

Regards,

-- 
Nicolas Goaziou



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Joost Kremers



On Fri, Mar 22 2019, Eric S Fraga wrote:

I am going down a rabbit hole here...

Short question: how can I add a new link type to org?  It used 
to be

that we would use ~org-add-link-type~ but this is
deprecated.  Fine.  The documentation points to
~org-link-set-parameters~ instead but this can only set the 
parameters
for known links.  Known links seem to be defined by a complex 
regex in

~org-link-types-re~.

What is the replacement for ~org-add-link-type~ in the latest 
version of

org, if any?  Or do I have to both add to the regex and set link
parameters separately?


I'm pretty sure the regex is created automatically. I only needed 
to do this:


   (org-link-set-parameters "ebib" :follow #'org-ebib-open :store 
   #'org-ebib-store-link)


And then define the functions `org-ebib-open` and 
`org-ebib-store-link`. (Cf. 
).


And yes, I apologize for the irony. ;-)


--
Joost Kremers
Life has its moments



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread John Kitchin
I guess this
http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/
will show you most of what you need to make new links.
 org-link-set-parameters Also makes new links.

On Fri, Mar 22, 2019 at 7:37 AM Eric S Fraga  wrote:

> I am going down a rabbit hole here...
>
> Short question: how can I add a new link type to org?  It used to be
> that we would use ~org-add-link-type~ but this is
> deprecated.  Fine.  The documentation points to
> ~org-link-set-parameters~ instead but this can only set the parameters
> for known links.  Known links seem to be defined by a complex regex in
> ~org-link-types-re~.
>
> What is the replacement for ~org-add-link-type~ in the latest version of
> org, if any?  Or do I have to both add to the regex and set link
> parameters separately?
>
> Thank you!
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827
>
> --
John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


Re: [O] [PATCH] org-collector.el: Add support for formulas appending

2019-03-22 Thread Nicolas Goaziou
Hello,

Slava Barinov  writes:

> So these options have to be documented?

I don't know, hence my question :) However, it is a good habit to
document features, IMO.

> I think there'll be more than one update then, for example :noquote and :scope
> options were not documented as well. I've been sure that it's okay to check
> source code and find all possible features.

OK.

> Anyway, where should documentation be added? I can prepare additional
> patch.

I see there is some documentation in the commentary part. Maybe that
could be a good place. If we move it into core, it would go in the
manual.

Speaking about "org-collector.el", it seems unmaintained. So we should
either move it into core, which may be a good idea, if it is useful
enough, or find a maintainer and move it elswhere (some ELPA, preferably
Org's or GNU's).

Regards,

-- 
Nicolas Goaziou



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Eric S Fraga
I am going down a rabbit hole here...

Short question: how can I add a new link type to org?  It used to be
that we would use ~org-add-link-type~ but this is
deprecated.  Fine.  The documentation points to
~org-link-set-parameters~ instead but this can only set the parameters
for known links.  Known links seem to be defined by a complex regex in
~org-link-types-re~.

What is the replacement for ~org-add-link-type~ in the latest version of
org, if any?  Or do I have to both add to the regex and set link
parameters separately?

Thank you!
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827



Re: [O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Eric S Fraga
On Friday, 22 Mar 2019 at 10:39, Eric S Fraga wrote:
> Hello,
>
> I have started using ivy-bibtex (wonderful package) but I have one
> strange behaviour: when I ask it to insert a citation, it inserts
> "ebib:".  I have searched but cannot see anywhere where I can tell
> ivy-bibtex to insert "cite:" instead.  Does anybody have any
> pointers?

Sigh.  As always, I find the answer *after* asking on the list.  I must
learn patience.

Anyway, the answer (in case anybody else wishes to know) is that this is
controlled by the variable ~bibtex-completion-format-citation-functions~
and which defaults to using ~bib-completion-format-citation-ebib~.  I am
not sure this is a reasonable default given that org does not understand
(out of the box) ebib: links.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827



[O] ivy-bibtex and orgmode inserts ebib: link

2019-03-22 Thread Eric S Fraga
Hello,

I have started using ivy-bibtex (wonderful package) but I have one
strange behaviour: when I ask it to insert a citation, it inserts
"ebib:".  I have searched but cannot see anywhere where I can tell
ivy-bibtex to insert "cite:" instead.  Does anybody have any
pointers?

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827



Re: [O] [PATCH] org-collector.el: Add support for formulas appending

2019-03-22 Thread Slava Barinov
Hello,

So these options have to be documented?

I think there'll be more than one update then, for example :noquote and :scope
options were not documented as well. I've been sure that it's okay to check
source code and find all possible features.

Anyway, where should documentation be added? I can prepare additional patch.

Best Regards,
Slava Barinov.

Nicolas Goaziou  wrote:
>
> Hello,
>
> Slava Barinov  writes:
>
> > * contrib/lisp/org-collector.el (org-dblock-write:propview): add
> >   :tblfm keyword parameter support
> >
> > This adds possiblity to append formula line to table which is useful
> > in certain cases, especially during updates and recalculation of whole
> > table.
>
> Thank you. Would it make sense to document it somewhere?
>
> Regards,
>
> --
> Nicolas Goaziou