emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* odt export version conflict on emacs for mac os x
@ 2013-08-11 13:50 Skip Collins
  2013-08-19 20:09 ` Skip Collins
  2013-08-29  4:55 ` Jambunathan K
  0 siblings, 2 replies; 14+ messages in thread
From: Skip Collins @ 2013-08-11 13:50 UTC (permalink / raw)
  To: emacs-orgmode

The version of org that comes with my stock Emacs on OS X (from
emacsformacosx.org) seems to conflict with my git installation of org.
This is particularly evident when trying to use ODT export. Emacs.app
is located in the usual /Applications folder. The newer org, which I
intend to completely supplant the version that comes with Emacs, was
installed with prefix /usr/local/share using the 'make up2' command.
My minimal init file is:
(setq load-path (cons "/usr/local/share/emacs/site-lisp/org" load-path))

I start Emacs from the command line:
/Applications/Emacs.app/Contents/MacOS/Emacs -Q -l
~/.emacs.d/minimalinit.el ~/test.org

Doing M-x org-version yields:
Org-mode version 8.0.7 (release_8.0.7-369-g9154c7 @
/usr/local/share/emacs/site-lisp/org/)

I immediately browse the ODT customization options showing that all
variables are prefixed with org-export-odt-. In order to be able to
select ODT in the export dispatcher, I have to add odt to
org-export-backends. Curiously, it shows that it is changed outside of
customize before I make any changes. So I have to unselect odt and
reselect it and then Save for Current Session for ODT export to be
enabled. When I finally use the dispatcher to generate an ODT file,
the following happens:

1) an odt file is generated (good)

2) These Emacs messages appear (bad):
Debug (ox-odt): Searching for OpenDocument styles files...
Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
Debug (ox-odt): Trying /usr/local/share/emacs/etc/styles/...
Debug (ox-odt): Trying /usr/local/share/emacs/site-lisp/org/etc/styles/...
Debug (ox-odt): Trying /Applications/Emacs.app/Contents/Resources/etc/org/...
Debug (ox-odt): Using styles under
/Applications/Emacs.app/Contents/Resources/etc/org/
Debug (ox-odt): Searching for OpenDocument schema files...
Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
Debug (ox-odt): No OpenDocument schema files installed

3) I find that there are new variables with the org-odt- prefix. Many
of them seem like duplicates of the org-export-odt set (bad).

It appears that the old version of ODT export (the one bundled inside
Emacs.app) is getting loaded and ox-odt is looking in the wrong
directories for schemas and styles. Explicitly setting
org-export-backends, org-export-odt-schema-dir, and
org-export-odt-styles-file in minimalinit.el has no effect. These
variables seem to be superseded when ox-odt is invoked.

I started digging into this when I noticed some odd behavior while
using ODT export. I think I am stuck using the older, buggier ox-odt
and my setup is mixing two versions of org.

I have installed the latest release of Emacs for Mac OS X:
GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
2013-03-13 on bob.porkrind.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-11 13:50 odt export version conflict on emacs for mac os x Skip Collins
@ 2013-08-19 20:09 ` Skip Collins
  2013-08-20  7:53   ` Christian Moe
  2013-08-29  5:05   ` Jambunathan K
  2013-08-29  4:55 ` Jambunathan K
  1 sibling, 2 replies; 14+ messages in thread
From: Skip Collins @ 2013-08-19 20:09 UTC (permalink / raw)
  To: emacs-org list

I think this is a bug. Can someone confirm? After I do an ODT export,
many ox-odt variables are duplicated with old variable names:
    | [-]-\ Group Org Export ODT
    |  |  |--- Option Org Odt Prettify Xml
    |  |  |--- Option Org Odt Schema Dir
    |  |  |--- Option Org Odt Content Template File
    |  |  |--- Option Org Odt Styles File
    |  |  |--- Option Org Odt Display Outline Level
    |  |  |--- Option Org Odt Convert Processes
    |  |  |--- Option Org Odt Convert Process
    |  |  |--- Option Org Odt Convert Capabilities
    |  |  |--- Option Org Odt Preferred Output Format
    |  |  |--- Option Org Odt Format Drawer Function
    |  |  |--- Option Org Odt Format Headline Function
    |  |  |--- Option Org Odt Format Inlinetask Function
    |  |  |--- Option Org Odt With Latex
    |  |  |--- Option Org Odt Inline Formula Rules
    |  |  |--- Option Org Odt Inline Image Rules
    |  |  |--- Option Org Odt Pixels Per Inch
    |  |  |--- Option Org Odt Create Custom Styles For Srcblocks
    |  |  |--- Option Org Odt Fontify Srcblocks
    |  |  |--- Option Org Odt Table Styles
    |  |  |--- Option Org Odt Use Date Fields
    |  |  |--- Option Org Export Odt Schema Dir
    |  |  |--- Option Org Export Odt Content Template File
    |  |  |--- Option Org Export Odt Styles File
    |  |  |--- Option Org Export Odt Inline Image Extensions
    |  |  |--- Option Org Export Odt Pixels Per Inch
    |  |  |--- Option Org Export Odt Create Custom Styles For Srcblocks
    |  |  |--- Option Org Export Odt Preferred Output Format
    |  |  |--- Option Org Export Odt Table Styles
    |  |  |--- Option Org Export Odt Fontify Srcblocks
    |  |  |--- Option Org Export Odt Category Strings
    |  |  |--- Option Org Export Odt Prettify Xml
    |  |  |--- Option Org Export Odt Convert Processes
    |  |  |--- Option Org Export Odt Convert Process
    |  |  `--- Option Org Export Odt Convert Capabilities

This is apparently caused by interference from an old version of
org-mode that is bundled inside my OS X Emacs.app. How can I
completely disable the old version?


-- 
skip collins
240 687 7802


On Sun, Aug 11, 2013 at 9:50 AM, Skip Collins <skip.collins@gmail.com> wrote:
> The version of org that comes with my stock Emacs on OS X (from
> emacsformacosx.org) seems to conflict with my git installation of org.
> This is particularly evident when trying to use ODT export. Emacs.app
> is located in the usual /Applications folder. The newer org, which I
> intend to completely supplant the version that comes with Emacs, was
> installed with prefix /usr/local/share using the 'make up2' command.
> My minimal init file is:
> (setq load-path (cons "/usr/local/share/emacs/site-lisp/org" load-path))
>
> I start Emacs from the command line:
> /Applications/Emacs.app/Contents/MacOS/Emacs -Q -l
> ~/.emacs.d/minimalinit.el ~/test.org
>
> Doing M-x org-version yields:
> Org-mode version 8.0.7 (release_8.0.7-369-g9154c7 @
> /usr/local/share/emacs/site-lisp/org/)
>
> I immediately browse the ODT customization options showing that all
> variables are prefixed with org-export-odt-. In order to be able to
> select ODT in the export dispatcher, I have to add odt to
> org-export-backends. Curiously, it shows that it is changed outside of
> customize before I make any changes. So I have to unselect odt and
> reselect it and then Save for Current Session for ODT export to be
> enabled. When I finally use the dispatcher to generate an ODT file,
> the following happens:
>
> 1) an odt file is generated (good)
>
> 2) These Emacs messages appear (bad):
> Debug (ox-odt): Searching for OpenDocument styles files...
> Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
> Debug (ox-odt): Trying /usr/local/share/emacs/etc/styles/...
> Debug (ox-odt): Trying /usr/local/share/emacs/site-lisp/org/etc/styles/...
> Debug (ox-odt): Trying /Applications/Emacs.app/Contents/Resources/etc/org/...
> Debug (ox-odt): Using styles under
> /Applications/Emacs.app/Contents/Resources/etc/org/
> Debug (ox-odt): Searching for OpenDocument schema files...
> Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
> Debug (ox-odt): No OpenDocument schema files installed
>
> 3) I find that there are new variables with the org-odt- prefix. Many
> of them seem like duplicates of the org-export-odt set (bad).
>
> It appears that the old version of ODT export (the one bundled inside
> Emacs.app) is getting loaded and ox-odt is looking in the wrong
> directories for schemas and styles. Explicitly setting
> org-export-backends, org-export-odt-schema-dir, and
> org-export-odt-styles-file in minimalinit.el has no effect. These
> variables seem to be superseded when ox-odt is invoked.
>
> I started digging into this when I noticed some odd behavior while
> using ODT export. I think I am stuck using the older, buggier ox-odt
> and my setup is mixing two versions of org.
>
> I have installed the latest release of Emacs for Mac OS X:
> GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
> 2013-03-13 on bob.porkrind.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-19 20:09 ` Skip Collins
@ 2013-08-20  7:53   ` Christian Moe
  2013-08-20 17:05     ` Skip Collins
  2013-08-29  5:05   ` Jambunathan K
  1 sibling, 1 reply; 14+ messages in thread
From: Christian Moe @ 2013-08-20  7:53 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-org list


Hi,

I confirm that I see the same behavior, i.e. after ODT export old
variable names show up in the customize group, similar to what you show
below. 

This is on GNU Emacs 24.3.1 on a Mac, installed with homebrew, with
Org-mode 8.0.7 installed via `make update2'.

This probably accounts for my problems with using a styles file. I had
thought it a problem with my installation or setup that I never got to
the bottom of.

Yours,
Christian



Skip Collins writes:

> I think this is a bug. Can someone confirm? After I do an ODT export,
> many ox-odt variables are duplicated with old variable names:
>     | [-]-\ Group Org Export ODT
>     |  |  |--- Option Org Odt Prettify Xml
>     |  |  |--- Option Org Odt Schema Dir
>     |  |  |--- Option Org Odt Content Template File
>     |  |  |--- Option Org Odt Styles File
>     |  |  |--- Option Org Odt Display Outline Level
>     |  |  |--- Option Org Odt Convert Processes
>     |  |  |--- Option Org Odt Convert Process
>     |  |  |--- Option Org Odt Convert Capabilities
>     |  |  |--- Option Org Odt Preferred Output Format
>     |  |  |--- Option Org Odt Format Drawer Function
>     |  |  |--- Option Org Odt Format Headline Function
>     |  |  |--- Option Org Odt Format Inlinetask Function
>     |  |  |--- Option Org Odt With Latex
>     |  |  |--- Option Org Odt Inline Formula Rules
>     |  |  |--- Option Org Odt Inline Image Rules
>     |  |  |--- Option Org Odt Pixels Per Inch
>     |  |  |--- Option Org Odt Create Custom Styles For Srcblocks
>     |  |  |--- Option Org Odt Fontify Srcblocks
>     |  |  |--- Option Org Odt Table Styles
>     |  |  |--- Option Org Odt Use Date Fields
>     |  |  |--- Option Org Export Odt Schema Dir
>     |  |  |--- Option Org Export Odt Content Template File
>     |  |  |--- Option Org Export Odt Styles File
>     |  |  |--- Option Org Export Odt Inline Image Extensions
>     |  |  |--- Option Org Export Odt Pixels Per Inch
>     |  |  |--- Option Org Export Odt Create Custom Styles For Srcblocks
>     |  |  |--- Option Org Export Odt Preferred Output Format
>     |  |  |--- Option Org Export Odt Table Styles
>     |  |  |--- Option Org Export Odt Fontify Srcblocks
>     |  |  |--- Option Org Export Odt Category Strings
>     |  |  |--- Option Org Export Odt Prettify Xml
>     |  |  |--- Option Org Export Odt Convert Processes
>     |  |  |--- Option Org Export Odt Convert Process
>     |  |  `--- Option Org Export Odt Convert Capabilities
>
> This is apparently caused by interference from an old version of
> org-mode that is bundled inside my OS X Emacs.app. How can I
> completely disable the old version?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-20  7:53   ` Christian Moe
@ 2013-08-20 17:05     ` Skip Collins
  0 siblings, 0 replies; 14+ messages in thread
From: Skip Collins @ 2013-08-20 17:05 UTC (permalink / raw)
  To: Christian Moe; +Cc: emacs-org list

Thanks Christian. That this behavior shows up in homebrew leads me to
suspect it might be happening on all platforms with recent Emacs,
unless steps are taken to eradicate the bundled org-mode. Exactly what
those steps should be is not clear to me. I suppose I could just
delete files inside Emacs.app. But this seems undesirable for many
reasons. Are there any suggestions for handling this more elegantly?


On Tue, Aug 20, 2013 at 3:53 AM, Christian Moe <mail@christianmoe.com> wrote:
>
> Hi,
>
> I confirm that I see the same behavior, i.e. after ODT export old
> variable names show up in the customize group, similar to what you show
> below.
>
> This is on GNU Emacs 24.3.1 on a Mac, installed with homebrew, with
> Org-mode 8.0.7 installed via `make update2'.
>
> This probably accounts for my problems with using a styles file. I had
> thought it a problem with my installation or setup that I never got to
> the bottom of.
>
> Yours,
> Christian
>
>
>
> Skip Collins writes:
>
>> I think this is a bug. Can someone confirm? After I do an ODT export,
>> many ox-odt variables are duplicated with old variable names:
>>     | [-]-\ Group Org Export ODT
>>     |  |  |--- Option Org Odt Prettify Xml
>>     |  |  |--- Option Org Odt Schema Dir
>>     |  |  |--- Option Org Odt Content Template File
>>     |  |  |--- Option Org Odt Styles File
>>     |  |  |--- Option Org Odt Display Outline Level
>>     |  |  |--- Option Org Odt Convert Processes
>>     |  |  |--- Option Org Odt Convert Process
>>     |  |  |--- Option Org Odt Convert Capabilities
>>     |  |  |--- Option Org Odt Preferred Output Format
>>     |  |  |--- Option Org Odt Format Drawer Function
>>     |  |  |--- Option Org Odt Format Headline Function
>>     |  |  |--- Option Org Odt Format Inlinetask Function
>>     |  |  |--- Option Org Odt With Latex
>>     |  |  |--- Option Org Odt Inline Formula Rules
>>     |  |  |--- Option Org Odt Inline Image Rules
>>     |  |  |--- Option Org Odt Pixels Per Inch
>>     |  |  |--- Option Org Odt Create Custom Styles For Srcblocks
>>     |  |  |--- Option Org Odt Fontify Srcblocks
>>     |  |  |--- Option Org Odt Table Styles
>>     |  |  |--- Option Org Odt Use Date Fields
>>     |  |  |--- Option Org Export Odt Schema Dir
>>     |  |  |--- Option Org Export Odt Content Template File
>>     |  |  |--- Option Org Export Odt Styles File
>>     |  |  |--- Option Org Export Odt Inline Image Extensions
>>     |  |  |--- Option Org Export Odt Pixels Per Inch
>>     |  |  |--- Option Org Export Odt Create Custom Styles For Srcblocks
>>     |  |  |--- Option Org Export Odt Preferred Output Format
>>     |  |  |--- Option Org Export Odt Table Styles
>>     |  |  |--- Option Org Export Odt Fontify Srcblocks
>>     |  |  |--- Option Org Export Odt Category Strings
>>     |  |  |--- Option Org Export Odt Prettify Xml
>>     |  |  |--- Option Org Export Odt Convert Processes
>>     |  |  |--- Option Org Export Odt Convert Process
>>     |  |  `--- Option Org Export Odt Convert Capabilities
>>
>> This is apparently caused by interference from an old version of
>> org-mode that is bundled inside my OS X Emacs.app. How can I
>> completely disable the old version?
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-11 13:50 odt export version conflict on emacs for mac os x Skip Collins
  2013-08-19 20:09 ` Skip Collins
@ 2013-08-29  4:55 ` Jambunathan K
  1 sibling, 0 replies; 14+ messages in thread
From: Jambunathan K @ 2013-08-29  4:55 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-orgmode


Skip Collins <skip.collins@gmail.com> writes:

> I started digging into this when I noticed some odd behavior while
> using ODT export. I think I am stuck using the older, buggier ox-odt
> and my setup is mixing two versions of org.

Your settings seem OK to me.

> 1) an odt file is generated (good)

This is what matters!

> Explicitly setting org-export-backends, org-export-odt-schema-dir, and
> org-export-odt-styles-file in minimalinit.el has no effect. These
> variables seem to be superseded when ox-odt is invoked.

org-export-odt-*   => These are LEGACY settings. IGNORE THEM.
org-odt            => Settings used by NEW exporter, ox-odt.el

> I immediately browse the ODT customization options showing that all
> variables are prefixed with org-export-odt-. 

You will see that 

    M-x customize-group RET org-export-odt RET

shows variables with both the prefixes `org-export-odt-*' and
`org-odt-*'.  It is the later one that you should use.    

Seeing both the old and new custom variables is NORMAL and nothing to
worry about.  You will similar behaviour for other exporters - latex and
html - as well.  This mixing up of LEGACY and NEW variables will go away
with Emacses that have new ox-odt.el. 

If the new variables are not seen do

    M-x load-library RET ox-odt RET

Also remember to add odt to 

   M-x customize-variable RET org-export-backends RET


> 2) These Emacs messages appear (bad):
> Debug (ox-odt): Searching for OpenDocument styles files...
> Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
> Debug (ox-odt): Trying /usr/local/share/emacs/etc/styles/...
> Debug (ox-odt): Trying /usr/local/share/emacs/site-lisp/org/etc/styles/...
> Debug (ox-odt): Trying /Applications/Emacs.app/Contents/Resources/etc/org/...

The *BEST* way to pick the right styles file is to set the
`org-odt-data-dir' directly.

I have the following setting in my .emacs

    (setq org-odt-data-dir "~/src/org-mode/etc/")

OrgOdtStyles.xml is under styles/ subdir of that dir.

Modify the above variable according to your setting.

> The newer org, which I intend to completely supplant the version that
> comes with Emacs, was installed with prefix /usr/local/share using the
> 'make up2' command.

make is what sets up `org-odt-data-dir' for you.  In your setting check
the value of `org-odt-data-dir' and make sure that the OrgOdtStyles.xml
file is available where the ODT exporter looks for it.

Ping Achim Gratz if you think make is not doing the right thing.

Btw, (I think) you will get the right behaviour if you do

        make install

> Debug (ox-odt): Using styles under
> /Applications/Emacs.app/Contents/Resources/etc/org/

The above directory is `data-directory' of Vanilla Emacs.

> Debug (ox-odt): Searching for OpenDocument schema files...
> Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
> Debug (ox-odt): No OpenDocument schema files installed

Absence of schema files is just a normal warning.  A user need not
bother about it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-19 20:09 ` Skip Collins
  2013-08-20  7:53   ` Christian Moe
@ 2013-08-29  5:05   ` Jambunathan K
  2013-08-29 18:25     ` Skip Collins
  1 sibling, 1 reply; 14+ messages in thread
From: Jambunathan K @ 2013-08-29  5:05 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-org list



Skip Collins <skip.collins@gmail.com> writes:

> After I do an ODT export, many ox-odt variables are duplicated with
> old variable names:
>     | [-]-\ Group Org Export ODT
>     |  |  |--- Option Org Odt Schema Dir
>     |  |  |--- Option Org Odt Content Template File

Above ones come from NEW exporter, ox-odt.el

>     |  |  |--- Option Org Export Odt Schema Dir
>     |  |  |--- Option Org Export Odt Content Template File

Above ones come from LEGACY exporter.  Not used by ox-odt.el.

> I think this is a bug. Can someone confirm? 

Not a bug.  This is expected on Emacses that don't ship with ox-odt.el.
Currently none of the Emacses has ox-odt.el.  So everyone - even those
with the right installation - will see it.

This is confusing but the behaviour is expected and NOT BUGGY.

Talk to Org maintainers (may be Nicolas Goaziou) and request that *ALL*
the new exporters - latex, html, odt, blah - all use a new defgroup for
their variables.

> This is apparently caused by interference from an old version of
> org-mode that is bundled inside my OS X Emacs.app. How can I
> completely disable the old version?

It has nothing to do with "mixed" installation.  Seeing mixed variables
is normal and nothing to worry about.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-29  5:05   ` Jambunathan K
@ 2013-08-29 18:25     ` Skip Collins
  2013-08-31  6:04       ` Carsten Dominik
  0 siblings, 1 reply; 14+ messages in thread
From: Skip Collins @ 2013-08-29 18:25 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-org list

Jambunathan K <kjambunathan@gmail.com> wrote:
>> After I do an ODT export, many ox-odt variables are duplicated with
>> old variable names:
>>     | [-]-\ Group Org Export ODT
>>     |  |  |--- Option Org Odt Schema Dir
>>     |  |  |--- Option Org Odt Content Template File
>
> Above ones come from NEW exporter, ox-odt.el
>
>>     |  |  |--- Option Org Export Odt Schema Dir
>>     |  |  |--- Option Org Export Odt Content Template File
>
> Above ones come from LEGACY exporter.  Not used by ox-odt.el.
>
> This is confusing but the behaviour is expected and NOT BUGGY.

Thank you for clarifying a confusing situation. I am not sure why I
assumed that the org-export-odt variables were the newer ones.

Suggestion for maintainers: a new, separate customization group, with
appropriate pointers in the documentation, would be helpful.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-29 18:25     ` Skip Collins
@ 2013-08-31  6:04       ` Carsten Dominik
  2013-08-31  6:28         ` Jambunathan K
  2013-08-31  7:26         ` Achim Gratz
  0 siblings, 2 replies; 14+ messages in thread
From: Carsten Dominik @ 2013-08-31  6:04 UTC (permalink / raw)
  To: Skip Collins; +Cc: emacs-org list, Jambunathan K

Hi,

can someone please summarize this discussion for me and tell me what action is required?

Thank you!

- Carsten

On 29.8.2013, at 20:25, Skip Collins <skip.collins@gmail.com> wrote:

> Jambunathan K <kjambunathan@gmail.com> wrote:
>>> After I do an ODT export, many ox-odt variables are duplicated with
>>> old variable names:
>>>    | [-]-\ Group Org Export ODT
>>>    |  |  |--- Option Org Odt Schema Dir
>>>    |  |  |--- Option Org Odt Content Template File
>> 
>> Above ones come from NEW exporter, ox-odt.el
>> 
>>>    |  |  |--- Option Org Export Odt Schema Dir
>>>    |  |  |--- Option Org Export Odt Content Template File
>> 
>> Above ones come from LEGACY exporter.  Not used by ox-odt.el.
>> 
>> This is confusing but the behaviour is expected and NOT BUGGY.
> 
> Thank you for clarifying a confusing situation. I am not sure why I
> assumed that the org-export-odt variables were the newer ones.
> 
> Suggestion for maintainers: a new, separate customization group, with
> appropriate pointers in the documentation, would be helpful.
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  6:04       ` Carsten Dominik
@ 2013-08-31  6:28         ` Jambunathan K
  2013-08-31  7:26         ` Achim Gratz
  1 sibling, 0 replies; 14+ messages in thread
From: Jambunathan K @ 2013-08-31  6:28 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Skip Collins, emacs-org list


Best way to explain is with an example:

1. emacs -Q
2. eval this

    (add-to-list 'load-path "~/src/org-mode/lisp/")
    (require 'org-loaddefs)

  Ensure that there is org-loaddefs available from git path.

3. M-x load-library ox-odt.el

4. Ensure  (featurep 'org-odt) reports nothing.

5. M-x customize-group  org-export-odt.

6. See both legacy (org-export-odt-*) and new variables (org-odt-*)
being reported.

----------------------------------------------------------------

s/odt/latex/.  The result will be the same

----------------------------------------------------------------

What needs to happen:

Put new things in new groups.  I suggest org-export-ng or org-export-new
prefix for new exporter and backends.

Both the backend groups and the parent groups.

----------------------------------------------------------------

Long winded explanation:
-----------------------

Both the legacy and new exporters, declare SAME ":group
'org-export-backend" for but DIFFERENT user variables.  Similar looking
variables is NOT guaranteed to have same functionality.

Vanialla Emacs "somehow" tracks the custom variables and it's group
/even if/ legacy exporters are NOT in the load path.  So when new
exporter is loaded, the group displays BOTH the LEGACY and NEW
variables.

org-odt.el uses

    (defgroup org-export-odt nil
      "Options specific for ODT export of Org-mode files."
      :tag "Org Export ODT"
      :group 'org-export
      :version "24.1")


    (defcustom org-export-odt-content-template-file nil
      "Template file for \"content.xml\".
    The exporter embeds the exported content just before
    \"</office:text>\" element.

    If unspecified, the file named \"OrgOdtContentTemplate.xml\"
    under `org-odt-styles-dir' is used."
      :type 'file
      :group 'org-export-odt
      :version "24.1")
    )


ox-odt.el uses


    (defgroup org-export-odt nil
      "Options for exporting Org mode files to ODT."
      :tag "Org Export ODT"
      :group 'org-export)


    (defcustom org-odt-content-template-file nil
      "Template file for \"content.xml\".
    The exporter embeds the exported content just before
    \"</office:text>\" element.

    If unspecified, the file named \"OrgOdtContentTemplate.xml\"
    under `org-odt-styles-dir' is used."
      :type '(choice (const nil)
                     (file))
      :group 'org-export-odt
      :version "24.1")


Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi,
>
> can someone please summarize this discussion for me and tell me what action is required?
>
> Thank you!
>
> - Carsten
>
> On 29.8.2013, at 20:25, Skip Collins <skip.collins@gmail.com> wrote:
>
>> Jambunathan K <kjambunathan@gmail.com> wrote:
>>>> After I do an ODT export, many ox-odt variables are duplicated with
>>>> old variable names:
>>>>    | [-]-\ Group Org Export ODT
>>>>    |  |  |--- Option Org Odt Schema Dir
>>>>    |  |  |--- Option Org Odt Content Template File
>>> 
>>> Above ones come from NEW exporter, ox-odt.el
>>> 
>>>>    |  |  |--- Option Org Export Odt Schema Dir
>>>>    |  |  |--- Option Org Export Odt Content Template File
>>> 
>>> Above ones come from LEGACY exporter.  Not used by ox-odt.el.
>>> 
>>> This is confusing but the behaviour is expected and NOT BUGGY.
>> 
>> Thank you for clarifying a confusing situation. I am not sure why I
>> assumed that the org-export-odt variables were the newer ones.
>> 
>> Suggestion for maintainers: a new, separate customization group, with
>> appropriate pointers in the documentation, would be helpful.
>> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  6:04       ` Carsten Dominik
  2013-08-31  6:28         ` Jambunathan K
@ 2013-08-31  7:26         ` Achim Gratz
  2013-08-31  8:47           ` Christian Moe
  2013-08-31  8:54           ` Carsten Dominik
  1 sibling, 2 replies; 14+ messages in thread
From: Achim Gratz @ 2013-08-31  7:26 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik writes:
> can someone please summarize this discussion for me and tell me what action is required?

There is nothing to do here.  The "legacy" defcustoms are built into
Emacs and are not easy to remove as there is no official interface to do
this.  I have code that tries to do clean things up, but it may have
unwanted side-effects depending on how the startup files are organized.
Eric Abrahamsen wanted to check some things but I haven't heard back.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  7:26         ` Achim Gratz
@ 2013-08-31  8:47           ` Christian Moe
  2013-08-31 16:53             ` Achim Gratz
  2013-08-31  8:54           ` Carsten Dominik
  1 sibling, 1 reply; 14+ messages in thread
From: Christian Moe @ 2013-08-31  8:47 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode



> There is nothing to do here.  The "legacy" defcustoms are built into
> Emacs and are not easy to remove as there is no official interface to do
> this.  I have code that tries to do clean things up, but it may have
> unwanted side-effects depending on how the startup files are organized.

Hi, Achim

Could you give a pointer to your code? I'd like to try it.

Yours,
Christian

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  7:26         ` Achim Gratz
  2013-08-31  8:47           ` Christian Moe
@ 2013-08-31  8:54           ` Carsten Dominik
  2013-08-31 10:16             ` Jambunathan K
  1 sibling, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2013-08-31  8:54 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode


On 31.8.2013, at 09:26, Achim Gratz <Stromeko@nexgo.de> wrote:

> Carsten Dominik writes:
>> can someone please summarize this discussion for me and tell me what action is required?
> 
> There is nothing to do here.  The "legacy" defcustoms are built into
> Emacs and are not easy to remove as there is no official interface to do
> this.  I have code that tries to do clean things up, but it may have
> unwanted side-effects depending on how the startup files are organized.
> Eric Abrahamsen wanted to check some things but I haven't heard back.

Thank you very much Achim.

- Carsten

> 
> 
> Regards,
> Achim.
> -- 
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> 
> SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
> http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  8:54           ` Carsten Dominik
@ 2013-08-31 10:16             ` Jambunathan K
  0 siblings, 0 replies; 14+ messages in thread
From: Jambunathan K @ 2013-08-31 10:16 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Achim Gratz, emacs-orgmode


Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 31.8.2013, at 09:26, Achim Gratz <Stromeko@nexgo.de> wrote:

>> There is nothing to do here.

The new variables can and must be put in to a new groups.  

> Thank you very much Achim.

If you cannot kill someone just ostracize them.  Segregation CAN and
MUST be done.

Jambunathan K.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: odt export version conflict on emacs for mac os x
  2013-08-31  8:47           ` Christian Moe
@ 2013-08-31 16:53             ` Achim Gratz
  0 siblings, 0 replies; 14+ messages in thread
From: Achim Gratz @ 2013-08-31 16:53 UTC (permalink / raw)
  To: emacs-orgmode

Christian Moe writes:
> Could you give a pointer to your code? I'd like to try it.

Here it is again:

--8<---------------cut here---------------start------------->8---
;;
;; Kill any old org remnants
;;

;; clean load-path
(setq load-path
      (delq nil (mapcar
		 (function (lambda (p)
			     (unless (string-match "lisp/org$" p)
			       p)))
		 load-path)))
;; remove property lists to defeat cus-load and remove autoloads
(mapatoms (function  (lambda (s)
		       (let ((sn (symbol-name s)))
			 (when (string-match "^\\(org\\|ob\\|ox\\)-?" sn)
			   (setplist s nil)
			   (when (autoloadp s)
			     (unintern s)))))))
--8<---------------cut here---------------end--------------->8---

After this Emacs should behave like it had never heard of Org at all.
As I said, use at your own risk - the intention is to do this as early
as possible, before any other initializations have taken place so that
these then can set up Org on a clean slate.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-31 16:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-11 13:50 odt export version conflict on emacs for mac os x Skip Collins
2013-08-19 20:09 ` Skip Collins
2013-08-20  7:53   ` Christian Moe
2013-08-20 17:05     ` Skip Collins
2013-08-29  5:05   ` Jambunathan K
2013-08-29 18:25     ` Skip Collins
2013-08-31  6:04       ` Carsten Dominik
2013-08-31  6:28         ` Jambunathan K
2013-08-31  7:26         ` Achim Gratz
2013-08-31  8:47           ` Christian Moe
2013-08-31 16:53             ` Achim Gratz
2013-08-31  8:54           ` Carsten Dominik
2013-08-31 10:16             ` Jambunathan K
2013-08-29  4:55 ` Jambunathan K

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).