Re: [O] export to odt with LaTeX math formulae and tables
Message: 2 Date: Sat, 19 May 2018 19:24:12 +0200 From: Joseph Vidal-RossetTo: emacs-orgmode list , John Kitchin ,John Kitchin Subject: Re: [O] export to odt with LaTeX math formulae and tables Message-ID:
[O] Exporting ODT to Org [was Re: General advice beyond Org]
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!
[O] Bug: Table update fails for named fields [9.1.13 (release_9.1.13)]
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)]
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)
Re: [O] org-link customization and org-open-link-functions
Hello, Michael Brandwrites: > 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
Re: [O] [PATCH] Add new keyword :coding for #+include directive
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