Re: [O] odt exporter on mixed org setup

2014-01-23 Thread Achim Gratz
Jambunathan K writes:
 I have my reservations.  With stock Emacs Snapshot (i.e., without any
 separate Org installation - git or elpa) at Bzr version 116124, at line
 16, I am seeing

 ;;;###autoload
 (defvar org-odt-data-dir /usr/share/emacs/etc/org
   The location of ODT styles.)

 I hard-coded path, on a platform-independent file, makes me cringe?

That's the result of using Emacs' build system, not Org's.  I was only
talking about the latter and if you configure it as recommended on Worg
for the various platforms then installing Org will set this up
correctly.  If you find it does not, then that's a bug I'll try to fix.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




Re: [O] odt exporter on mixed org setup

2014-01-23 Thread Jambunathan K

Achim Gratz strom...@nexgo.de writes:

 That's the result of using Emacs' build system, not Org's.

Someone has to fix it...

It should either be

nil

or
(expand-file-name ./org/ data-directory)

If that path is wrong, the ODT exporter is really not usable.  I think
nil may be a good idea.








Re: [O] odt exporter on mixed org setup

2014-01-22 Thread Jambunathan K
Achim Gratz strom...@nexgo.de writes:

 Bzzt. Wrong.

I have my reservations.  With stock Emacs Snapshot (i.e., without any
separate Org installation - git or elpa) at Bzr version 116124, at line
16, I am seeing

;;;###autoload
(defvar org-odt-data-dir /usr/share/emacs/etc/org
  The location of ODT styles.)

I hard-coded path, on a platform-independent file, makes me cringe?




Re: [O] odt exporter on mixed org setup

2014-01-18 Thread Jambunathan K
Rustom Mody rustompm...@gmail.com writes:

 Currently I have a setq on org-mode-hook

I don't run make install, I just do make.

Here is what I have in .emacs.

DO NOT do an explicit (require 'ox-backend).  Instead customize
`org-export-backends' and the ODT exporter there.

Here is the sequence I have in my .emacs.

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

(add-to-list 'load-path ~/src/org-mode/contrib/lisp/)

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

(custom-set-variables
 '(org-export-backends
   (quote (ascii html icalendar latex odt org)))







Re: [O] odt exporter on mixed org setup

2014-01-18 Thread Rustom Mody
Thanks

On Sun, Jan 19, 2014 at 12:23 AM, Jambunathan K  wrote:
 The following message is a courtesy copy of an article
 that has been posted to gmane.emacs.orgmode as well.

 Rustom Mody rustompm...@gmail.com writes:

 Currently I have a setq on org-mode-hook

 I don't run make install, I just do make.

 Here is what I have in .emacs.

 DO NOT do an explicit (require 'ox-backend).  Instead customize
 `org-export-backends' and the ODT exporter there.

 Here is the sequence I have in my .emacs.

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

Ok That require did it (I think!)
ie on my machine works for emacs 23 and 24


 (add-to-list 'load-path ~/src/org-mode/contrib/lisp/)

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

 (custom-set-variables
  '(org-export-backends
(quote (ascii html icalendar latex odt org)))

I dont have a custom; just a setq. Hope thats ok??

(setq org-export-backends '(ascii html odt))

[I would like to avoid custom if I can; wont make a fuss if I cant :-) ]

Thanks
Rusi



Re: [O] odt exporter on mixed org setup

2014-01-18 Thread Rustom Mody
On Sun, Jan 19, 2014 at 8:57 AM, Rustom Mody rustompm...@gmail.com wrote:
 Thanks

 On Sun, Jan 19, 2014 at 12:23 AM, Jambunathan K  wrote:
 The following message is a courtesy copy of an article
 that has been posted to gmane.emacs.orgmode as well.

 Rustom Mody rustompm...@gmail.com writes:

 Currently I have a setq on org-mode-hook

 I don't run make install, I just do make.

 Here is what I have in .emacs.

 DO NOT do an explicit (require 'ox-backend).  Instead customize
 `org-export-backends' and the ODT exporter there.

 Here is the sequence I have in my .emacs.

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

 Ok That require did it (I think!)
 ie on my machine works for emacs 23 and 24

On second thoughts, Ive replaced that require with a load-file with
explicit path
since
- I prefer an explicit error to unexpected weirdness
- that file tends to get removed by build processes
- there are multiple org-loaddefs.el files and I DONT want the others

Now I can verify that
- after a make clean starting emacs gives me errors on startup
- after a make compile that error goes away



Re: [O] odt exporter on mixed org setup

2014-01-18 Thread Jambunathan K

Rustom Mody rustompm...@gmail.com writes:

 On second thoughts

Don't disturb it
So long as it works
Scribble the notes somewhere
Tuck it in a safe place
(So that)
When times are bad
And things go awry
Revisit the memories
(And) Set things right again.








Re: [O] odt exporter on mixed org setup

2014-01-18 Thread Jambunathan K
Rustom Mody rustompm...@gmail.com writes:

 On second thoughts

Added few more lines, Sundays after Harvest season are the best :-)

Don't disturb it
So long as it works
Scribble the notes somewhere
Tuck it in a safe place

So that,
When times are bad
And things go awry
Revisit the memories
(And) Things are right again

Still if,

Things are beyond repair
Or gears rusted
Shout out my name
From the darkest corridors
Will come a repair-man.





Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Jambunathan K
Rustom Mody rustompm...@gmail.com writes:

 Ended with: ox-odt cannot find factory style files

You need

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

Modify the path.  If the *Messages* say that it is not able to find the
styles dir, it really means that it is not able to find the styles
files.

 Checked that it comes back it I use emacs23; goes away if I use
 emacs24 Checked that the messages when it works in emacs24 are like
 thus:

ODT exporter (and hence the style files) made it's appearance in
Emacs24.  (i.e., There is ALWAYS a styles file that the exporter can
safely fallback to.)  The styles file that the ODT exporter ACTUALLY
USES may come from stock Emacs and which may trail behind the git repo
over a period of time.

There is no ODT exporter in stock Emacs23.  So fallback MAY fail.



Stock Emacs has styles file under:

C-h v data-directory

If you installed Org as a standalone package, use apt to find out where
it is located.



Someone reported a bug on ox-odt.el paths not being modified when the
ODT exporter moved from contrib/ to lisp/ directory in git repo.
(Interested people can investigate and propose a patch.)  I don't have a
link to that post right now.



The way make system treats `org-odt-data-dir' is a bit flaky.  I didn't
pursue the issue further because I felt it is pointless arguing with
some people.





Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Miguel Ruiz
This is my setup in .emacs; it runs without problems version after version.


;;
;; Remove Org remnants built into Emacs
;;
;; from Achim Gratz
;; https://github.com/emacsmirror/org/blob/master/testing/org-batch-test-init.el

;; clean load-path
(setq load-path
  (delq nil (mapcar
   
      (function (lambda (p)
             (unless (string-match lisp\\(/packages\\)?/org$ p)
               p)))
         load-path)))
;; remove property list 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 (eq 'autoload (car-safe s))
            
 (unintern s)))

;; we should now start from a clean slate

;;(setq myorg master)
(setq myorg maint ) ;; I have several directories under ~/org-mode/ with 
different
              ;; versions so I can change easily

;;(add-to-list 'load-path (concat ~/org-mode/ myorg /testing/lisp))
;;(add-to-list 'load-path (concat ~/org-mode/ myorg /testing))
(add-to-list 'load-path (concat ~/org-mode/ myorg /contrib/lisp))
(add-to-list 'load-path (concat ~/org-mode/ myorg /lisp))


(require 'info)
(setq Info-directory-list
  (cons (expand-file-name (concat ~/org-mode/ myorg /doc))
    Info-default-directory-list))

(setq org-odt-data-dir (expand-file-name (concat ~/org-mode/ myorg /etc)))

(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))

(global-set-key \C-cl 'org-store-link)
(global-set-key \C-cc 'org-capture)
(global-set-key \C-ca 'org-agenda)
(global-set-key \C-cb
 'org-iswitchb)

HTH




El Jueves 16 de enero de 2014 6:47, Rustom Mody rustompm...@gmail.com 
escribió:
 
Just helped a friend to install and upgrade to latest org.
Method summary:
$ git clone
$ make update
combined with setup of load-paths

Ended with: ox-odt cannot find factory style files

I remember that I too had this problem
http://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00341.html
and it had recently disappeared.

Checked that it comes back it I use emacs23; goes away if I use emacs24
Checked that the messages when it works in emacs24 are like thus:

Debug (ox-odt): Searching for OpenDocument styles files...
Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
Debug (ox-odt): Trying ~/pdsw/etc/styles/...
Debug (ox-odt): Trying ~/pdsw/org-mode/lisp/etc/styles/...
Debug (ox-odt): Trying /usr/share/emacs/24.3/etc/org/...
Debug (ox-odt): Using styles under /usr/share/emacs/24.3/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

So evidently my 'working' odt export is working because its using the
builtin emacs odt exporter and not the
 latest one

Looking at org-odt-* stuff I see almost a dozen files and directories
and file lists and what not.

All attempts so far at doing
         (setq org-odt-styles-dir ~/pdsw/org-mode/etc/styles)
in various places, hooks etc have not changed the fact that it gets
the builtin one

Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Jambunathan K
Rustom Mody rustompm...@gmail.com writes:

 I could check that org-odt-data-dir is coming in bound to
 /usr/share/emacs/etc/org (which is non-existent) before the defvar in
 ox-odt.el, so that defvar is not happening

 And changing the prefix in local.mk does not seem to do anything

Don't worry about the make file.  (It is difficult for the make file to
cater to different distributions, different installations - git, release
tar file etc)

The most easiest setup will be ELPA or using ox-odt that ships with
Emacs proper.




Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Jambunathan K
Rustom Mody rustompm...@gmail.com writes:

 org-odt-data-dir is coming in bound to /usr/share/emacs/etc/org (which
 is non-existent)

Open a bug against the packager.  (ox-odt.el is an exception.  It is
uncommon for Emacs libraries to come with auxiliary support files).

The distributors need to make sure

1. Style files are bundled correctly.
2. `org-odt-data-dir' is configured to point to (1).

I don't know much about the build system.




Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Achim Gratz
Jambunathan K writes:
 Rustom Mody rustompm...@gmail.com writes:

 I could check that org-odt-data-dir is coming in bound to
 /usr/share/emacs/etc/org (which is non-existent) before the defvar in
 ox-odt.el, so that defvar is not happening

 And changing the prefix in local.mk does not seem to do anything

 Don't worry about the make file.  (It is difficult for the make file to
 cater to different distributions, different installations - git, release
 tar file etc)

Bzzt. Wrong.

The defaults are set up to work out-of-the box for most free systems
with minimal fuzz.  Instructions on how to change them if your system
looks different are included both in the manual and on Worg (which the
manual points to for details).  If people would stop listening to bad
advice and actually installed Org in the standard location, then they
wouldn't even need to modify their init files.

ELPA packages do as much as the current state of Emacs' packager allows,
but Org really isn't a good fit to it at the moment.  That said, a
recent Emacs combined with ELPA does work just fine.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Achim Gratz
Rustom Mody writes:
 I could check that
 org-odt-data-dir is coming in bound to /usr/share/emacs/etc/org (which
 is non-existent) before the defvar in ox-odt.el, so that defvar is not
 happening

 And changing the prefix in local.mk does not seem to do anything

What do you expect it to do if you don't actually install Org?


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] odt exporter on mixed org setup

2014-01-16 Thread Rustom Mody
On Thu, Jan 16, 2014 at 8:22 PM, Jambunathan K  wrote:
 Rustom Mody  writes:

 org-odt-data-dir is coming in bound to /usr/share/emacs/etc/org (which
 is non-existent)

 Open a bug against the packager.

Dunno what you mean... I am using org fresh-cooked off git!
And anyway your setq to org-odt-data-dir has settled the issue as far
as I can see.

The only question I have (not so much an org question as emacs/elisp)
is where to put that setq and whether defvar would be better than
setq.

Currently I have a setq on org-mode-hook



Re: [O] odt exporter on mixed org setup

2014-01-15 Thread Andreas Leha

Rustom Mody rustompm...@gmail.com writes:

 Just helped a friend to install and upgrade to latest org.
 Method summary:
 $ git clone
 $ make update
 combined with setup of load-paths

 Ended with: ox-odt cannot find factory style files

 I remember that I too had this problem
 http://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00341.html
 and it had recently disappeared.

 Checked that it comes back it I use emacs23; goes away if I use emacs24
 Checked that the messages when it works in emacs24 are like thus:

 Debug (ox-odt): Searching for OpenDocument styles files...
 Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
 Debug (ox-odt): Trying ~/pdsw/etc/styles/...
 Debug (ox-odt): Trying ~/pdsw/org-mode/lisp/etc/styles/...
 Debug (ox-odt): Trying /usr/share/emacs/24.3/etc/org/...
 Debug (ox-odt): Using styles under /usr/share/emacs/24.3/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

 So evidently my 'working' odt export is working because its using the
 builtin emacs odt exporter and not the latest one

 Looking at org-odt-* stuff I see almost a dozen files and directories
 and file lists and what not.

 All attempts so far at doing
  (setq org-odt-styles-dir ~/pdsw/org-mode/etc/styles)
 in various places, hooks etc have not changed the fact that it gets
 the builtin one

I did have problems with that one as well.  Setting this in .emacs
worked for me, though.  But it was not considered the 'definite'
solution back then [fn:1].

Regards,
Andreas


Footnotes:

[fn:1]
See here:
http://news.gmane.org/find-root.php?message_id=m21u3b5a3j.fsf%40uio.no

Quote:
,
|  That was the correct pointer.  org-odt-styles-file is indeed nil,
|  and org-odt-styles-dir is pointing to the wrong directory!  I
|  gather that it is derived from org-odt-styles-dir-list.  That
|  list contains the correct directory, but only at the third
|  position. (...)
|  Isn't that supposed to be set automagically during the install process?
| 
| It is set when ox-odt is loaded, ultimately based on info from the
| install, I guess, but making a number of guesses about other possible
| locations to look. Org-odt-styles-dir will then look for the first
| directory in the list that contains the two required files
| (OrgOdtStyles.xml, OrgOdtContentTemplate.xml). The order of the
| directories listed shouldn't matter, as long as you don't have more than
| one directory containing files with the right names. Not sure I can help
| with this.
| 
|  I have now a
|  (setq org-odt-styles-dir 
/home/andreas/local/emacs/org-mode-install/etc/styles)
|  in my .emacs
|  Is that the correct fix here?
| 
| For now, if it works...
`