Re: [O] [PATCH] Add new keyword :coding for #+include directive

2018-05-20 Thread Nicolas Goaziou
Hello,

pierre.techouey...@free.fr (Pierre Téchoueyres) writes:

> I've used the following command to do the test :
> for emacs 25.3
>
> #+begin_src sh
> emacs -Q -L lisp -L ~/.emacs.d/elpa-25/htmlize-20180412.1244 -l 
> ~/.emacs.d/elpa-25/htmlize-20180412.1244/htmlize-autoloads.el 
> testing/examples/test.org
> #+end_src

With the command above, you're not exporting the file using "ox.el".
What are you testing? Could you use a command that exports the file
(preferably using ASCII (utf-8) export back-end)?

>TEST WITH DIFFERENT ENCODINGS.
>
>  Pierre TÚchoueyres
  ^^^
  see

Regards,

-- 
Nicolas Goaziou



Re: [O] org-link customization and org-open-link-functions

2018-05-20 Thread Nicolas Goaziou
Hello,

Michael Brand  writes:

> Customization of the face org-link changes org-open-link-functions
> resulting in org-open-at-point asking for a TAGS file. Is that
> intended behavior?

Yes, it's apparently a feature from "org-ctags.el".

See `org-ctags-open-link-functions'.

Regards,

-- 
Nicolas Goaziou



[O] Bug: Table update fails for named fields [9.1.13 (release_9.1.13)]

2018-05-20 Thread Piyush Srivastava

In the current org mode version (release_9.1.13), when a named cell
formula is stored using C-u C-c =, the #+TBLFM line stores the name of
the cell without a prefix '$' sign, as in the following table (notice
that is the #+TBLFM row, there is no '$' sign before the 'sum'
variable):

|   |   c |
|---+-|
|   |   3 |
|   |  10 |
|---+-|
| # |  14 |
| ^ | sum |
|---+-|
#+TBLFM: sum=vsum(@-II$0..@-I$0)


With this storage, pressing TAB in the row after changing some entries
does not update the filed referred to by 'sum', contrary to the
description in the manual.


However, if I manually prefix a '$; to the variable 'sum' as in the
table below, then TAB update work as described in the manual (notice the
$sum variable in the #+TBLFM row):


|   |   c |
|---+-|
|   |   3 |
|   |  12 |
|---+-|
| # |  15 |
| ^ | sum |
|---+-|
#+TBLFM: $sum=vsum(@-II$0..@-I$0)


A fix is to ensure that if the LHS of a field formula being inserted
is a field name rather than a numerical reference, then a '$' is
prefixed to it.  I have the following patch with implements this:


diff --git a/lisp/org-table.el b/lisp/org-table.el
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2301,7 +2301,13 @@ LOCATION instead."
(org-indent-line)
(insert (or (match-string 2) "#+TBLFM:")))
   (insert " "
- (mapconcat (lambda (x) (concat (car x) "=" (cdr x)))
+ (mapconcat (lambda (x)
+  (let* ((name (car x))
+ (first (substring-no-properties name 0 1))
+ (test (or (string= first "@") (string= first 
"$")))
+ )
+(concat (if test name (concat "$" name))
+"=" (cdr x
 (sort alist #'org-table-formula-less-p)
 "::")
  "\n"


What this patch does is the following: if the reference being inserted
does not begin with an '@' or a '$', then it is assumed to be a named
reference, and a '$' is prefixed to it.  This will work *provided* no
named references themselves start with a '$'.

I am happy to assign copyright for the patch, if that is needed and if
the patch if found suitable, for it to be included in org-mode code.


Thanks,
-- Piyush.


Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09
Package: Org mode version 9.1.13 (release_9.1.13)



[O] Bug: Table update fails for named fields [9.1.13 (release_9.1.13)]

2018-05-20 Thread Piyush Srivastava

In the current org mode version (release_9.1.13), when a named cell
formula is stored using C-u C-c =, the #+TBLFM line stores the name of
the cell without a prefix '$' sign, as in the following table (notice
that is the #+TBLFM row, there is no '$' sign before the 'sum'
variable):

|   |   c |
|---+-|
|   |   3 |
|   |  10 |
|---+-|
| # |  14 |
| ^ | sum |
|---+-|
#+TBLFM: sum=vsum(@-II$0..@-I$0)


With this storage, pressing TAB in the row after changing some entries
does not update the filed referred to by 'sum', contrary to the
description in the manual.


However, if I manually prefix a '$; to the variable 'sum' as in the
table below, then TAB update work as described in the manual (notice the
$sum variable in the #+TBLFM row):


|   |   c |
|---+-|
|   |   3 |
|   |  12 |
|---+-|
| # |  15 |
| ^ | sum |
|---+-|
#+TBLFM: $sum=vsum(@-II$0..@-I$0)


A fix is to ensure that if the LHS of a field formula being inserted
is a field name rather than a numerical reference, then a '$' is
prefixed to it.  I have the following patch with implements this:


diff --git a/lisp/org-table.el b/lisp/org-table.el
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2301,7 +2301,13 @@ LOCATION instead."
(org-indent-line)
(insert (or (match-string 2) "#+TBLFM:")))
   (insert " "
- (mapconcat (lambda (x) (concat (car x) "=" (cdr x)))
+ (mapconcat (lambda (x)
+  (let* ((name (car x))
+ (first (substring-no-properties name 0 1))
+ (test (or (string= first "@") (string= first 
"$")))
+ )
+(concat (if test name (concat "$" name))
+"=" (cdr x
 (sort alist #'org-table-formula-less-p)
 "::")
  "\n"


What this patch does is the following: if the reference being inserted
does not begin with an '@' or a '$', then it is assumed to be a named
reference, and a '$' is prefixed to it.  This will work *provided* no
named references themselves start with a '$'.

I am happy to assign copyright for the patch, if that is needed and if
the patch if found suitable, for it to be included in org-mode code.


Thanks,
-- Piyush.


Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09
Package: Org mode version 9.1.13 (release_9.1.13)



[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-20 Thread edgar

Message: 4
Date: Sun, 20 May 2018 10:08:46 +0200
From: 
To: help-gnu-em...@gnu.org
Subject: Re: General advice beyond Org
Message-ID: <20180520080846.ga15...@tuxteam.de>
Content-Type: text/plain; charset=utf-8; x-action=pgp-signed

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, May 19, 2018 at 06:24:49PM -0700, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


This resonates with some vague ideas that keep haunting some
dark corners of my mind:

it isn't generally possible to convert "Word" [1] into Org. But what
if that "Word" is just a slight modification of something which has
been transformed from an Org document we know?

Of course, augmenting that with "pockets" where to stash 
meta-information
which might get lost on round-trip would be even more interesting. 
Perhaps
those pockets are external, tied to some (possibly change-resistant) 
hash

made of enough context.

Did I say dark corners?

Cheers


Makes me feel lucky of being able to tie my laces! :D .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-20 Thread edgar

Message: 2
Date: Sat, 19 May 2018 19:24:12 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list ,   John Kitchin
,John Kitchin 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hello John, hello the list,

The results of my efforts to export an org file with equations, proofs 
and
so on to odt: imagemagick works, but the png images are ugly. 
References of

equations and bibliography do not work,


I have the same problem. So far, I can either get inter-text references 
or external packages (depending on whether I use the export from Org or 
Pandoc), but not both. I wonder if using an OTT would suffice to change 
the size of all equations in the ODT (cannot test now; away from my 
computer). If that is the case, there is an option to change the 
configuration of imagemagick and dvipng when exporting from Org to ODT. 
There, you can set the scale or resolution, I think. It makes the 
pictures to look bigger, but if the OTT forces them to be smaller again, 
I'm sure that they would look much better.



because the png images do not
reproduce the org-ref references.


I get the tags for the inter-text and bibliographic references coming 
from the LaTeX document (originally produced from Org --> LaTeX) when 
using Pandoc. I want to know: are you using Pandoc for this too?


Otherwise, I get nice inter-text references and can tweak the format if 
I take the Org export + LaTeXMLMath + OTT (template for ODT) --> ODT, 
but then I get no bibliograhpy. Is this the case for you too? If not, 
can you tell me how you solved this? (that is why I wanted to know if 
you are using Pandoc). Thanks!



I am afraid that by using another way of
exporting math. (Mathjax, Mathml...) I will not get the natural 
deductions

proofs that I get via proof.sty.


Yes, I think that has been my experience with other packages. You may 
want to get in touch with the people from LaTeXML to see if they can 
support proof.sty. In any case, there seems to be no immediate solution.



(The export to odt or docx seems to be a
real nightmare, and that is not very surprising, because LaTeX is the 
only

good solution...)


I agree on the nightmare! I made a bug (enhancement) report on 
LibreOffice to see if they can help with this. May be it would help if 
you add your "I want this too" :) . Also, consider that, when exporting 
to ODT, it's most likely because you are working with someone who does 
not care too much about the nice side of LaTeX. I would also advise you 
to consider loosing part of your format in your document. Instead of 
using \myformattingcommand{arg 1}{arg 2} which would produce a nice 
\frac{arg 1}{arg 2} in LaTeX, just replace your text for 1/2. They don't 
care!




Best wishes,

Jo.

-- next part --
An HTML attachment was scrubbed...
URL:




This link leads nowhere.

Having said all of this, I would like to ask the Org team to consider 
the next two improvements for the ODT export:
1. Support the \printbibliography[heading=none] LaTeX command (I am away 
from my computer right now, and cannot tell if it works without 
[heading=none]).
2. Support Org --> MathML with LaTeX packages (as compared to exporting 
with ImageMagick, MathToWeb or LaTeXML).



Salut!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!